ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Running multiple targets with 'ant' task
Date Tue, 24 Jun 2003 16:05:09 GMT
No, that wouldn´t work.
There are some bug-requests about that, but nothing is done in the CVS tree.

Workaround 1: create a new target in build2.xml which depends on the other
three
Workaround 2: use AntContrib´s <foreach> for iterating over a list of
targets
Workaround 3: use <exec>; Ant´s main class accepts multiple targets


Ant-Contrib:
  Homepage:   http://sourceforge.net/projects/ant-contrib/
  CVS-Source:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ant-contrib/ant-contrib/src/n
et/sf/antcontrib/
  CVS-Manual:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ant-contrib/ant-contrib/manua
l/index.html
	
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/ant-contrib/ant-co
ntrib/manual/tasks/index.html
  Binary:     http://gump.covalent.net/jars/latest/ant-contrib/


BugTracking

Allow <ant> to support multiple targets 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17071

Ant task - allow multiple targets 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5270

New <subant> task to execute sub-builds 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12368

Ability to pass several targets to Ant task 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8148



Jan


> -----Ursprüngliche Nachricht-----
> Von: Mike Cepek [mailto:mcepek@smsi.com]
> Gesendet am: Dienstag, 24. Juni 2003 18:00
> An: Ant Users
> Betreff: Running multiple targets with 'ant' task
> 
> Hi,
> 
> I would like to invoke a series of targets in another ant script.
> 
> I tried the following but it didn't work.  Is there another way to do
> this (using only the built-in Ant tasks)?
> 
> ----- build.xml -----
> 
> <project default="foo">
> <target name="foo">
>   <property name="targTest" value="tt"/>
>   <ant antfile="build2.xml" target="${targTest}"/>
>   <property name="targSet" value="one two three"/>
>   <ant antfile="build2.xml" target="${targSet}"/>
> </target>
> </project>
> 
> ----- build2.xml -----
> 
> <project default="two">
> 
> <target name="tt"> <echo message="test"/> </target>
> <target name="one">   <echo message="1"/> </target>
> <target name="two">   <echo message="2"/> </target>
> <target name="three"> <echo message="3"/> </target>
> 
> </project>
> 
> ----- output -----
> 
> Buildfile: build.xml
> 
> tt:
>      [echo] test
> 
> BUILD FAILED
> file:build.xml:7: Target `one two three' does not exist in 
> this project.
> 
> Total time: 2 seconds
> 
> ----- [END] -----
> 
> This issue was raised previously (and not answered) in this thread:
> 
> http://archives.apache.org/eyebrowse/BrowseList?listName=user@
ant.apache
.org&by=thread&from=253901

Thank you.


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message