Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Ant: using antcall with different parameters sent to construct a pathid

Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, so, this is where I'm trying to put things together conveniently.....

In another thread, I got my build targets to work, with their slightly different classpath requirements, by doing the following (and of course, in this case, Project-1 MUST be compiled before Project-2):

All well and good. However, what I'd ideally like to do is something like this:

Note the commented out stuff - all the somehow do somethings... Is it possible to do what I want without this being an enormous mess? Or is it just easier to do the classpath as I've done in the first example, and not bother with the antcall stuff in this case.
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To maintain sanity, build only one artifact (that is, a single jar or war) within a single build.xml. The build.xml should be in the base directory of the project, and only files related to that projects should be in that same directory and its subdirectories. If you want to build multiple artifacts at once, write a master build.xml script (in yet another directory) that invokes the other build.xml scripts. At least, this is what I used to do years ago, I had some really complicated master build.xml scripts that did all kinds of magic. In your case, I can see three level - the lowest level for the individual jar files, the next level up build a build.xml that builds the artifacts for a project, and the third level being a master build.xml that invokes the two project's build.xml files.

The better way is to use Maven to build each artifact, Nexus to store the built artifacts, and Jenkins to fire off the builds in the desired order (if you really must do that, I've found it's not always needed - why rebuild a project that hasn't change?).
He's giving us the slip! Quick! Grab this tiny ad!
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic