ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <>
Subject RE: Ivy can mutate Ant properties? What?
Date Thu, 13 Nov 2008 13:52:56 GMT
It really is something of a corner case, not something people would
normally run into.  I like that Ivy variables are mutable, just this
small inconsistency confused me.  

This would probably be a documentation issue more than anything, to
explicitly talk about how Ivy overrides immutability of Ant properties,
and in what cases this happens.

-----Original Message-----
From: Maarten Coene [] 
Sent: Thursday, November 13, 2008 2:15 AM
Subject: Re: Ivy can mutate Ant properties? What?

It's more for the properties are set after for instance a resolve, like
"ivy.organisation", "ivy.module", etc.
I don't think we need to change anything for the properties defined in
the settings.xml.


----- Original Message ----
From: Shawn Castrianni <>
To: "" <>
Sent: Thursday, November 13, 2008 12:13:40 AM
Subject: RE: Ivy can mutate Ant properties?  What?

If you change the current behavior, then it makes IVY less powerful.  If
you keep the current behavior, then people can always turn it off with
override="false".  So the current behavior satisfies both needs.

Shawn Castrianni

-----Original Message-----
From: Maarten Coene []
Sent: Wednesday, November 12, 2008 5:06 PM
Subject: Re: Ivy can mutate Ant properties? What?

Hi Carlton,

Ivy is indeed a very powerfull tool, it can even change Ant properties
... ;-) Just kidding and you are probably right, we should not modify
properties that were set outside Ivy. However, I think it could be a
difficult excercise to modify the current behaviour because the Ivy Ant
tasks use some properties to pass state (like resolve information for
instance). If Ivy cannot set/update these properties correctly,
unpredictable results can happen.

And as you already know, you can create a JIRA ticket if you want to see
this changed in some future release...


----- Original Message ----
From: "Brown, Carlton" <>
Sent: Wednesday, November 12, 2008 7:14:08 PM
Subject: RE: Ivy can mutate Ant properties?  What?

The ivy task mutated an Ant property in the Ant script, not in a
settings file.  Is that still expected behavior?  It's true that the
property coincided with a commonly used Ivy property, but I would not
expect Ivy to mutate any Ant property that was not set by Ivy itself.

-----Original Message-----
From: Shawn Castrianni []
Sent: Wednesday, November 12, 2008 1:02 PM
To: ''
Subject: RE: Ivy can mutate Ant properties? What?

Yes, this is default behavior.  IVY settings files can have properties
with the option to alter pre-existing properties.  The option is in the
"override" attribute.  If you set it to false, then you will not mutate
any ANT pre-existing properties.

Shawn Castrianni

-----Original Message-----
From: Brown, Carlton []
Sent: Wednesday, November 12, 2008 11:57 AM
Subject: Ivy can mutate Ant properties? What?

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=""/>
                <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}" />

This is the output:
     [echo] pre-info organization:
     [echo] pre-info module: mutant
     [echo] pre-info revision: 9.8
     [echo] pre-info status: beta
[ivy:info] :: Ivy 2.0.0-rc1 - 20080916082609 :: ::
:: loading settings :: file =
     [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.


View raw message