You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/09/06 18:27:10 UTC
DO NOT REPLY [Bug 12368] New: -
[PATCH] New task to execute sub-builds
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12368>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12368
[PATCH] New <subant> task to execute sub-builds
Summary: [PATCH] New <subant> task to execute sub-builds
Product: Ant
Version: 1.5.1Beta1
Platform: Other
OS/Version: Windows NT/2K
Status: NEW
Severity: Enhancement
Priority: Other
Component: Core tasks
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: ddevienne@lgc.com
Convenient task to call a set of ordered or not sub-builds using the regular
<ant> target. The same can currently be achieve with Ant-contrib's <foreach>
task, in conjunction with <ant>, but <subant> streamlines that, offering
automatic target name passing (based on the name of the target containing
<subant>), and avoiding the expense of the <antcall> of <foreach>.
<subant> takes traditional <ant> attributes and sub-elements (inheritAll,
etc...), and a build path (a regular Path) which can be defined either as sub-
elements (<subant> contains an implicit path, so
<fileset>/<dirset>/<filelist>/<buildpathelement> can appear directly inside
<subant>) or thru attributes (by reference or as a string), similarly to
<java>/<javac>.
Example usage:
<target name="init" depends="-buildmagic">
<path id="buildpath">
<pathelement location="core" />
<pathelement location="optional" />
</path>
</target>
<target name="clean" depends="init">
<subant buildpathref="buildpath" />
</target>
<target name="build" depends="init">
<subant buildpathref="buildpath" />
</target>
@todo: Allow a <style> sub-element to apply a stylesheet to be applied to the
build files precursor automatically, if out of date, to support the use case of
Myrmidon.
@toto: Add a fork="true" attribute that would allow to avoid memory problems by
repeated usage <ant>. Would likely retrict passage of references to sub-builds.
@todo: Make use of some dependency information between the project (like in the
Gump descriptors) to infer the proper order the sub-builds should be called,
instead of relying of explicit order of the buildpath.
@todo: Some tests ;-) I do have some tests (build.xml driven), but one has to
look at them to make sure they've run correctly, so not read unit tests.
I hope someones finds this useful. --DD
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>