ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <>
Subject RE: How to create paths that depend on a condition?
Date Tue, 25 May 2004 06:15:53 GMT

> -----Original Message-----
> From: Dominique Devienne []
> Sent: 24 May 2004 18:20
> To: 'Ant Users List'
> Subject: RE: How to create paths that depend on a condition?
> > From: Vincent Massol []
> > With this solution, there is no need to do "if" to build each
> > Combined with Ant 1.6 import/macrodef/presetDef the individual
> > should also be quite empty.
> >
> > Any take on this?
> Well, that's certainly a possibility, but don't you still need a
> build that delegates to the sub-builds conditionally, and still needs
> checks for the various j2ee versions? Otherwise the user has to
> go
> in the appropriate directories and run the builds, no? That's putting
> burden on the user to know what needs to be built.

True. The user has to know what he wants to build (J2EE 12, 13, 14 or
all). But that's normal. We can't guess that for him... :-)

The top level build.xml would simply say (for building them all):

<target name="j2ee-13">
  <ant buildfile="j2ee-12-13-14/build.xml" target="dist"/>
  <ant buildfile="j2ee-13-14/build.xml" target="dist"/>
  <ant buildfile="j2ee-13/build.xml" target="dist"/>

and then (this is the hard part) build the master zip files:

  <zip zipfile="cactus-12-zip">
    <zipfileset [...] j2ee-12-13-14.jar
    <zipfileset [...] j2ee-12.jar


There's no more "if".

But I agree I need to think more about it. The issues I have are:
- the need to aggregate all reports, like javadoc into one. Reports are:
javadoc, clover, etc. If I don't aggregate then I need to create a
master report page linking to the other single reports...
- the need to aggregate the generated jars (but the solution above is

> So it seems to me that with either layout, you still need the
> either to decide which sub-builds to kick off, or which source
> to compile. Your new layout is likely more flexible if you'll do more
> just partition your sources, and have specific tests, resources,
> I hope this helps. Salut, --DD

I think it helps because the dependencies are not the same, tests are
not the same and sources are possibly not the same. 

I'll experiment with it.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message