ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <je...@ptc.com>
Subject Re: New task contribution
Date Fri, 13 Aug 2010 13:56:42 GMT
  On 8/13/2010 7:52 AM, Jesse Glick wrote:
> 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.
>
> http://hg.netbeans.org/main-silver/diff/c01e2c997e19/java.j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl

>
>
> The lesson I draw is that Ant without <script> is ill suited to even 
> moderately complex builds.
Or at the very least Ant Contrib (http://ant-contrib.sourceforge.net/)...

--
Jess Holle


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


Mime
View raw message