I don't think it is a big deal right now but it just seems odd. I wouldn't want to package test dependencies in my application's jar so by the same thought I wouldn't want run to include them either. I would vote to remove that and if someone needs it they can add it to the buildfile. I think flashing red lights would be going off if my application needed test dependencies to run.
-russ On Thu, Mar 8, 2012 at 2:41 PM, Antoine Toulme <[email protected]>wrote: > No particular thought. Others I think expressed the reverse opinion. Is it > a big deal for you ? > > > On Thu, Mar 8, 2012 at 13:07, Russ Teabeault <[email protected]>wrote: > >> And as a follow up question: In buildr/run.rb when the run task is setup >> you see this: >> >> after_define(:run => :test) do |project| >> project.run.with project.test.compile.dependencies >> project.run.with project.test.compile.target if >> project.test.compile.target >> end >> >> Why would the test compile dependencies and test target dir automatically >> be added to the classpath? If I am running my application I don't want the >> test dependencies. It seems like this should be added by the user if they >> want it but not imposed by the build system. >> >> Thoughts? >> >> -russ >> >> On Thu, Mar 8, 2012 at 12:44 PM, Antoine Toulme >> <[email protected]>wrote: >> >>> I think you are correct. >>> >>> On Thu, Mar 8, 2012 at 11:40, Russ Teabeault <[email protected] >>> >wrote: >>> >>> > If you look at the source code for the JavaRunner >>> > >>> > def run(task) >>> > fail "Missing :main option" unless task.options[:main] >>> > cp = project.compile.dependencies + [project.path_to(:target, >>> :classes)] >>> > + task.classpath >>> > Java::Commands.java(task.options[:main], { >>> > :properties => >>> jrebel_props(project).merge(task.options[:properties] || >>> > {}), >>> > :classpath => cp, >>> > :java_args => jrebel_args + (task.options[:java_args] || []) >>> > }) >>> > end >>> > >>> > You see that it automatically adds the projects compile dependencies >>> and >>> > the target/classes directory to the classpath. Should it also not add >>> > target/resources to classpath? >>> > >>> > Thanks, >>> > >>> > Russell Teabeault >>> > >>> >> >> >
