ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: Problems with macrodef in Ant 1.6.2
Date Tue, 17 Aug 2004 18:10:07 GMT

I see the problem. You were correct in the analysis, it is the
same problem that the xdoclet task has. The same task object
gets used twice and the objects created/modified during the execute
call are not reset for the second call of execute. (a design that is asking
for bugs to happen!).

The following build.xml shows the problem:

  <macrodef name="set-properties">
    <element name="additional-properties" />
  <!-- Set the project properties -->   
  <target name="set-properties">
        <property name="foo" value="fubar" />
  <target name="clean" depends="set-properties"/>
  <target name="compile" depends="set-properties"/>

 > ant clean compile

I have a fix for this and it will be ant 1.6.3. I do not see a work-around
for the build script for ant 1.6.2 , other than making a clean.compile 


Charles Hudak wrote:

><sigh> Ok, try again (stupid virus scanners).
>Here are the 3 files. Create a new project directory and drop the source
>file in {new_project_dir}/src/test and the build files in the root of
>that directory.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message