buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Maas <pfmm...@gmail.com>
Subject Re: running scala application from buildr
Date Fri, 13 Nov 2009 14:59:56 GMT
Yeah, I figured out something similar:

  task :run => :compile do
  	Java::Commands.java('com.log4p.Main', :classpath => compile.dependencies + [compile.target.to_s])
  end


On Nov 13, 2009, at 3:54 PM, Daniel Spiewak wrote:

> I generally create a task something like the following (warning: off the top
> of my head and untested):
> 
> define 'my-project' do
>  ...
> 
>  task :run => compile do
>    cp = (compile.dependencies + compile.into).map(&:to_s).join
> File::PATH_SEPARATOR
>    system 'java', '-cp', cp, 'com.company.app.Main'
>  end
> end
> 
> Invoke this task using `buildr my-project:run` and everything should be
> dandy.
> 
> Daniel
> 
> On Fri, Nov 13, 2009 at 4:35 AM, Peter Maas <pfmmaas@gmail.com> wrote:
> 
>> Hi all,
>> 
>> I'm experimenting with scala 2.8 / buildr 1.4.0 a bit... and am really
>> pleased with the results. I wondered however whether it is possible to start
>> my scala application via buildr using a classpath provided by buildr.
>> 
>> Any thoughts? Anyone done this before?
>> 
>> regards,
>> 
>> Peter


Mime
View raw message