No suggestions ? I'm realy stuck with this.

Tomas

> -----Original Message-----
> From: Roos Tomas [mailto:tomas.r...@mpsbroadband.com]
> Sent: den 15 december 2010 14:36
> To: Ant Users List
> Subject: RE: Fixed default target
> 
> I did this now according to Davids recommendation.
> This seem to be an ok workaround, though we are almost there, there is
one
> thing missing.
> 
> <project xmlns:ivy="antlib:org.apache.ivy.ant"
> xmlns:antcontrib="antlib:net.sf.antcontrib" basedir="."
name="modules">
>       <property name="build-infrastructure.dir" value="build" />
>       <property file="branch.properties" />
>       <import
> file="${build-infrastructure.dir}/branch-build-common.xml" />
> 
>       <target name="-delegate">
>               <run-module-builds>
>                       <targets>
>                               <antcontrib:for
> list="${ant.project.invoked-targets}" param="target">
> 
>       <sequential>
> 
>       <target name="@{target}"
> />
> 
>       </sequential>
>                               </antcontrib:for>
> 
>                       </targets>
>               </run-module-builds>
>       </target>
> 
>       <target name="publish" depends="-delegate" />
> 
>       <target name="integration" depends="-delegate" />
>       <target name="milestone" depends="-delegate" />
>       <target name="final" depends="-delegate" />
> 
>       <target name="local" depends="-delegate" />
>       <target name="shared" depends="-delegate" /> </project>
> 
> That's how it works at the moment.
> 
> As you can see in the -delegate method, it try to get every target as
a single
> target name, I want this to become
> 
> <targets>
> <target name="target1" />
> <target name="target2" />
> <target name="target3" />
> </targets>
> 
> Instead, targets (which is an element)
>       <macrodef name="run-module-builds">
>               <element name="targets" />...
> 
> And since <targets> doesn't accept antcontrb:for as an element. I
Wonder
> how to group this to a <targets> tag which I can include in the
> 
> <element name"targets" />
> <antcontrib:for list="${ant.project.invoked-targets}" param="target">
> 
> <sequential>
> //Append this target to the element on the targets element with
<target
> name="@{target}" /> </sequential>
> </antcontrib:for>
> 
> <run-module-builds>
> <targets />
> </run-module-builds>
> 
> Any ideas?
> 
> Thanks everyone for the help so far!
> 

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

Reply via email to