ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmass...@pivolis.com>
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 [mailto:DDevienne@lgc.com]
> Sent: 24 May 2004 18:20
> To: 'Ant Users List'
> Subject: RE: How to create paths that depend on a condition?
> 
> > From: Vincent Massol [mailto:vmassol2@pivolis.com]
> > With this solution, there is no need to do "if" to build each
project.
> > Combined with Ant 1.6 import/macrodef/presetDef the individual
build.xml
> > should also be quite empty.
> >
> > Any take on this?
> 
> Well, that's certainly a possibility, but don't you still need a
top-level
> build that delegates to the sub-builds conditionally, and still needs
to
> checks for the various j2ee versions? Otherwise the user has to
manually
> go
> in the appropriate directories and run the builds, no? That's putting
the
> 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
  </zip>

</target>

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
possible)

> 
> So it seems to me that with either layout, you still need the
conditional,
> either to decide which sub-builds to kick off, or which source
directories
> to compile. Your new layout is likely more flexible if you'll do more
than
> just partition your sources, and have specific tests, resources,
etc...
> 
> 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.

Thanks!
-Vincent



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message