On Tue, 21 Aug 2001, Leif Mortenson wrote:
> The problem that we are having is that the main project defines a property
> <property name="bin.dir" value="${basedir}/bin"/>
> Then the sub projects do the same. The sub projects build fine when ant
> is run on them as standalone builds, but when their builds are spawned
> using the ant task, the attempt to set the bin.dir property in the sub
> project is ignored as the property has already been set.
>
> Override ignored for bin.dir
>
> This results in build targets being placed in the wrong directories.
> I can think of a few workarounds to make this all work, but I was
> wondering what the recommended method for handling situations like this
> is for Ant.
Don't know about recommended, but I eventually used semi-unique prefixes
to separate namespaces.
Ant2 is supposed to(?) have better namespace separation.
However, you CAN override property values in the <ant> tag itself, using
nested <property> tags. The easiest way to do this is probably something
like this:
<ant antfile="subproject" target="blahblah...">
<property file="subproject.properties" />
</ant>
//Mikko