ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Gemis <>
Subject The old immutable properties trick
Date Mon, 10 Jun 2002 13:26:28 GMT

I just subscribed to the mailing list, but found this in the archive. I
would like to add my $-cent.

  <target name="test">
    <property name="p" value="ppp"/>
    <antcall target="test2" inheritAll="false">
      <param name="p" value="aaa"/>

  <target name="test2">
    <antcall target="test3" inheritAll="false">
      <param name="p" value="bbb"/>

  <target name="test3">

This gives in 1.4.1

     [echo] p=ppp

     [echo] p=aaa

     [echo] p=aaa

after removing both 'inheritAll'

it gives:

     [echo] p=ppp

     [echo] p=aaa

     [echo] p=bbb

In 1.5b2 it keeps on giving ppp/aaa/aaa

This is because the parameters set through <param> are considered 'user
properties' and those cannot be changed in the subproject (That's my
interpretation of the manual).

I have a similar problem. I'm trying to split data from logic, i.e. one
build script that reads project files which only data describing the
projects. In this project file, I list e.g. the dependencies on other

The build script detects this dependency property from the data file,
together with all other properties of the project. My idea was to construct
a build file that would recursively call itself, each time with the new
settings found in the data file. I pass the parameters through an ant-call
with nested properties (antcall with nested params gives the same result).
Targets are basicly doing the same as the above example.

This works for 1.4.1, since this is broken (on purpose ?) in 1.5b2
So far, I haven't found a work-around. Do I need to write my own
implementation of the and classes to work around
this ?

Is there another way to achieve the same result ? I think the new properties
mechanism is reducing the power of ant a lot.



P.S. I'm using 1.5 since I need some other tasks, and since I want to stay
in tune with the latest release.

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

View raw message