You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Andrey Pavlenko <an...@googlemail.com> on 2010/08/13 12:35:31 UTC

New task contribution

Hi all,

I would like to contribute a task which, in my opinion, might be very
helpful for many people.
The sources and documentation are located here:
http://tools4j.googlecode.com/files/batchant.zip.

Cut from documentation:

This task is very similar to Subant but has the following features added:

Running sub-projects in multiple threads.
Exporting properties and references from a sub-project to its parent
project (see the export task).
Executing a set of tasks in context of each sub-project (see postbuild).
All sub-projects, identified by build file, base directory and target,
are executed only once.

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


Re: New task contribution

Posted by Jess Holle <je...@ptc.com>.
  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


Re: New task contribution

Posted by Jesse Glick <je...@oracle.com>.
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.


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