buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: Run task dependencies
Date Tue, 12 Jan 2010 01:12:28 GMT
On Mon, Jan 11, 2010 at 7:49 PM, Nicholas Andrews <noandrews@gmail.com>wrote:

> I am new to buildr and have a best practice question.  My Scala
> project has several dependencies, which are also required when running
> the project.  For instance:
>
> 'org.scala-lang:scala-library:jar:2.7.7'
>
> The Quick Start gives an example of how to run using a task :run
> definition:
>
> task :run => :compile do
>    system 'java -cp CLASSPATH ...'
> end
>
> The classpath will need to include many of the same dependencies as
> the compilation task, but the format string is not quite the same.  Is
> there an easy way to map the compile.with dependencies to something
> 'java -cp' will understand?  Or even better some automagic way to have
> run tasks pick this up?
>

Yes.

Java.java "com.example.Main",
  :classpath => [ compile.dependencies, compile.target ],
  :java_args => ["-server", "-Xmx1024m"]

And an actual Buildfile<http://github.com/aboisvert/stopwatch/blob/master/Buildfile>
.

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message