ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: adding the same manifest to all jars
Date Wed, 26 May 2004 08:10:31 GMT
Ah, I see.
antcall does open a new scope (a), so
the example will not work.

It looks like using ant-contrib's case  would be the answer:
     <ac:switch value="${which-mf}">
      <ac:case value="mf">
        <presetdef name="echo.preset">
          <echo message="default-mf"/>
        </presetdef>
      </ac:case>
      <ac:case value="other">
        <presetdef name="echo.preset">
          <echo message="other-mf"/>
        </presetdef>
      </ac:case>
      <ac:default>
        <presetdef name="echo.preset">
          <echo message="Unknown mf -'${which-mf}'" />
        </presetdef>
      </ac:default>
    </ac:switch>
    <echo.preset/>

Peter
Jan.Materne@rzf.fin-nrw.de wrote:

>I need the other direction: main uses <antcall> for the definition.
>
>a) - antcall opens new scope
>   - antcall copies all definitions from main into child
>   - child defines myjar
>   - child ends
>   --> main has no access to myjar
>
>b) - antcall does not open a new scope for definitions
>   - antcall does not has to copy definitions
>   - child defines myjar in common scope
>   - child ends
>   --> main has access to myjar
>
>Jan
>
>
>  
>
>>-----Original Message-----
>>From: Peter Reilly [mailto:peter.reilly@corvil.com]
>>Sent: Wednesday, May 26, 2004 9:49 AM
>>To: Ant Users List
>>Subject: Re: adding the same manifest to all jars
>>
>>
>>Jan.Materne@rzf.fin-nrw.de wrote:
>>
>>    
>>
>>>I´m not sure whether the <antcall> works or whether it opens 
>>>      
>>>
>>a new scope for
>>    
>>
>>>definitions.
>>> 
>>>
>>>      
>>>
>>Definitions get copied to the child projects (always) so the antcall 
>>will work for
>>your example.
>>
>>Peter
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>    
>>
>
>
>  
>


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


Mime
View raw message