ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12368] New: - [PATCH] New <subant> task to execute sub-builds
Date Fri, 06 Sep 2002 16:27:10 GMT
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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message