I was surprised today to observe that the ivy:info task can mutate Ant
properties, which are supposedly immutable.
In this snippet of Ant code, I hardcode some Ant properties. After a
call to ivy:info, these properties have changed, which should not occur
(as far as I understand).
Can anyone explain what's going on here?
<target name="ivy-mutability" depends="ivy-load-commonsettings">
<property name="ivy.organisation" value="foo.bar"/>
<property name="ivy.module" value="mutant"/>
<property name="ivy.revision" value="9.8"/>
<property name="ivy.status" value="beta"/>
<echo message="pre-info organization: ${ivy.organisation}"/>
<echo message="pre-info module: ${ivy.module}" />
<echo message="pre-info revision: ${ivy.revision}" />
<echo message="pre-info status: ${ivy.status}" />
<ivy:info settingsRef="module-settings"
file="${module.output.subdir}/ivy.xml" />
<echo message="post-info organization: ${ivy.organisation}" />
<echo message="post-info module: ${ivy.module}" />
<echo message="post-info revision: ${ivy.revision}" />
<echo message="post-info status: ${ivy.status}" />
</target>
This is the output:
test-mutability:
[echo] pre-info organization: foo.bar
[echo] pre-info module: mutant
[echo] pre-info revision: 9.8
[echo] pre-info status: beta
[ivy:info] :: Ivy 2.0.0-rc1 - 20080916082609 ::
http://ant.apache.org/ivy/ ::
:: loading settings :: file =
c:\allworkspaces\ebiz-1.6-rmtest\ivy-template\ivy-settings-common.xml
[echo] post-info organization: com.mycompany.myorg
[echo] post-info module: mymodule
[echo] post-info revision: 3.0-dev1
[echo] post-info status: integration
-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission. Thank you.
====================================================