This is a much better way of doing it, I just didn't feel up to actually
looking up the API for Java::Commands.  Go with your solution rather than
mine!

Daniel

On Fri, Nov 13, 2009 at 8:59 AM, Peter Maas <[email protected]> wrote:

> 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 <[email protected]> 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
>
>

Reply via email to