ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: Macrodef in import file having same behaviour as targets?
Date Tue, 04 Jan 2005 17:43:02 GMT
galenboyerdev@hotpop.com wrote:

>Martin Cooper <martinc@apache.org> writes:
>
>    > You may be running into a bug that has been fixed but is not yet in a
>    > release. 
>
>Does anybody know if this is true? 
>
No, it is not true.

> I'm guessing there is still some
>work to get ant working the way I was hoping. 
>
Yes, it would be a good bit of work.

macrodef and import were developed at the same time independently of
each other. The "override" feature of imports were not implemented (or even
thought of) in macrodefs.

> But, I would at least
>like to override the macrodefs in the importing files.  Is there
>anyway to get ant to not show me the warning:
>
>"trying to override old definition ..."
>  
>
Not at the moment.
This is a feature that people have been asking for. In netbeans, they
have implemented this by suppressing the warning message.

Peter

>
>    > Try putting your macrodefs inside targets, and using the appropriate
>    > depends to ensure those targets are invoked first.
>    > 
>    > --
>    > Martin Cooper
>    > 
>    > 
>    > On Thu, 30 Dec 2004 galenboyerdev@hotpop.com wrote:
>    > 
>    > >
>    > > HERE IS MY EXAMPLE IMPORT FILE:
>    > >
>    > >    <project name="exampleimport" default="">
>    > >
>    > >       <macrodef name="drink">
>    > >         <sequential>
>    > >           <echo message="coffee!"/>
>    > >         </sequential>
>    > >       </macrodef>
>    > >
>    > >    </project>
>    > >
>    > > HERE IS MY EXAMPLE FILE DOING THE IMPORTING:
>    > >
>    > >    <project name="exampleimporter" default="">
>    > >
>    > >       <import file="exampleimport.xml"/>
>    > >
>    > >       <macrodef name="drink">
>    > >         <sequential>
>    > >           <exampleimport.drink/>
>    > >           <echo message="with sugar and cream!"/>
>    > >         </sequential>
>    > >       </macrodef>
>    > >
>    > >       <target name="drinkThatFails">
>    > >         <drink/>
>    > >       </target>
>    > >
>    > >   </project>
>    > >
>    > > See how I would like to make a call back to the imported definition of
>    > > the macro like I can with a target?
>    > >
>    > > Is there anyway to do this or is it being thought about for the future?
>    > >
>    > > --
>    > > Galen Boyer
>    > >
>    > >
>    > > ---------------------------------------------------------------------
>    > > 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
>
>
>
>  
>


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


Mime
View raw message