You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Juerg Wanner <ju...@pyx.ch> on 2003/01/08 09:29:00 UTC

Re: Antcall and undefined parameters

[ On Monday, December 9, 2002 at 11:40:23 (+0100), Eric Jain wrote: ]
> Subject: Antcall and undefined parameters
>
 > A possible solution may be to use <reference> rather than <parameter>, but I
 > am not sure how this would work in the example below.
 > 
 >  <target
 >   name="all"
 >  >
 >   <uptodate
 >    property="alpha.skip"
 >    srcfile="${alpha.source}"
 >    targetfile="${alpha.output}"
 >   />
 >   <antcall target="xml">
 >    <param name="xml.source" location="${alpha.source}"/>
 >    <param name="xml.output" location="${alpha.output}"/>
 >    <param name="xml.skip" value="${alpha.skip}"/>
 >   </antcall>
 >   ...
 > </target>
 > 
 >  <target
 >   name="xml"
 >   unless="xml.skip"
 >  >
 >   <!-- Never executed! -->
 >  </target>

Sorry, this is a little late, but you can do the following:

Within antcall don't pass the value of alpha.skip but simply the name:

    <param name="xml.skip" value="alpha.skip"/>

And in the xml target define the unless attribute as the value of xml.skip:

    <target name="xml" unless="${xml.skip}">

This works (at least in 1.5.1)

-- 
Jürg Wanner		Mail: juerg@pyx.ch, wanner@acm.org
Pyx Engineering AG 	Fuchsiastrasse 14, CH-8048 Zürich



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>