Ok, thanks for the tip.

Anders

On Thu, Feb 18, 2010 at 6:56 PM, Victor Hugo Borja <vic.bo...@gmail.com> wrote:
> Anders,
>
> On Thu, Feb 18, 2010 at 2:01 AM, Anders Janmyr 
> <anders.jan...@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.
>



-- 
http://anders.janmyr.com/

Reply via email to