You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mike Blake <mi...@viafone.com> on 2000/08/01 01:18:22 UTC
Retting a property
Hi,
Can I reset/change a property name once it's been set?
When I run the target below this doesn't seenm to work....
<target name="ejb" depends="share">
<property name="ejbName" value="SessionManagerBean" />
<property name="ejbDirectory" value="sessionmanager" />
<ant antfile="ejbBuild.xml" dir="${basedir}" />
<property name="ejbName" value="AppManagerBean" />
<property name="ejbDirectory" value="appmanager" />
<ant antfile="ejbBuild.xml" dir="${basedir}" />
</target>
Re: Retting a property
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "MB" == Mike Blake <mi...@viafone.com> writes:
MB> Hi, Can I reset/change a property name once it's been set?
No, not in Ant 1.1. This has been one of the major changes, properties
cannot be changed by subsequent <property> constructs.
MB> When I run the target below this doesn't seenm to work....
Rewrite this as
<target name="ejb" depends="share">
<ant antfile="ejbBuild.xml" dir="${basedir}">
<property name="ejbName" value="SessionManagerBean" />
<property name="ejbDirectory" value="sessionmanager" />
</ant>
<ant antfile="ejbBuild.xml" dir="${basedir}">
<property name="ejbName" value="AppManagerBean" />
<property name="ejbDirectory" value="appmanager" />
</ant>
</target>
<ant> has a nested <property> subelement. These properties are treated
by the subbuild just like properties you had defined on the command
line. These properties will not be available to the top level project.
Stefan