buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Yang <>
Subject Running projects after compile/build
Date Tue, 21 Sep 2010 14:35:46 GMT

I know this has been discussed here (

But wanted to open up the issue again:

I've spent the last few years doing Ruby so I'm not super-familiar with how Java handles bundling
dependencies (most of what I have seen is Maven's system/local repos, haven't seen how ivy
handles anything).  

I have a project that has several deps both in Maven repos and from sub projects - the way
I run the Main class right now is:

  define 'router' do
    compile.with transitive(CAMEL, CAMEL_FTP, project('other-project'))
    package(:jar).with :manifest=>manifest.merge('Main-Class'=>'')
    task :run => :compile do
      deps = compile.dependencies + [] + []
      cp = deps.join(":")
      puts cp
      system "java -cp #{cp}"

Is this the right way to think about it?

Also, if I bundle resources with other projects in jar files, or in this project, how do I
add those to the classpath as well?

Sorry for the newbie questions - the above feels gross to me and I'm just wondering if there's
something obvious I'm missing.

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