ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: New task contribution
Date Fri, 13 Aug 2010 12:52:20 GMT
On 08/13/2010 06:35 AM, Andrey Pavlenko wrote:
> Exporting properties and references from a sub-project to its parent project

This is something I struggled with in NetBeans-generated Java projects. I wanted to permit
build scripts to call dependencies recursively without reentering any 
dependencies during a single build (and maintaining locality of information: a script knows
only about its own direct dependencies). The natural idea is to just set a 
property mentioning ${basedir} when building one project and exit early if it is already set,
but this does not work since properties set in a child cannot be propagated 
to the parent. The ugly workaround I found was to create a properties file in a build dir
when building the topmost project, passing its location to children, and loading 
and saving it from each build. Obviously this involves otherwise unnecessary file I/O and
is very hard to follow, especially considering that it is tricky to load 
properties in an isolated namespace in Ant, and "if (...) return;" is impossible from the
dependency so a subbuild can be skipped only from the depending script.

The lesson I draw is that Ant without <script> is ill suited to even moderately complex

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

View raw message