buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Hugo Borja <vic.bo...@gmail.com>
Subject Re: Download dependency
Date Thu, 18 Feb 2010 17:56:00 GMT
Anders,

On Thu, Feb 18, 2010 at 2:01 AM, Anders Janmyr <anders.janmyr@jayway.com>wrote:

>    task :run => :compile do
>      classpath =
>
> "#{path_to('target/classes')}:#{project('cli').compile.dependencies.join(':')}"
>      cmd = "java -cp #{classpath} words.cli.WordsCli #{ENV['args']}"
>      puts cmd
>      system cmd
>    end
>

Just a style note on this, you can execute a java program with something
like this [1]:

       Java::Commands.java 'words.cli.WordsCli', *ENV['args'].split,
:classpath => compile.dependencies + [compile.target, resources.target]

[1]  http://buildr.apache.org/rdoc/classes/Java/Commands.html#M000145


-- 
vic

Quaerendo invenietis.

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