You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by James Poli <Ja...@sas.com> on 2013/02/14 22:37:56 UTC

Ant command line override not working?

Hello,

I'm trying to override the property ivy.cache.ttl.default on the Ant command line but it doesn't seem to work?
I'm using:

-Divy.cache.ttl.default=5h

and always get the following message in the Ant output with debug on:

Setting Override ignored for property "ivy.cache.ttl.default"

Thanks in advance,
Jim


Re: Ant command line override not working?

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 15 févr. 2013 à 17:42, James Poli <Ja...@sas.com> a écrit :

> Thanks Nicolas.  I do see in the Ant log that the message does come out after the default Ivy settings file is loaded.  FWIW, I do have an Ivy settings file that gets loaded but the default value of 10s always appears in Ant's debug for the property.  Can this property be overridden on the command line or does it need to be set in the settings file?

This can be set on the command line. But if you put that property in the ivysettings too, the one in the ivysettings will win.

> 
> Snippets of the Ant log:
> 
> Apache Ant(TM) version 1.8.2 compiled on December 20 2010
> ...
> Setting ro project property: ivy.cache.ttl.default -> 5h
> ...
> [ivy:configure] Loading jar:file:/C:/EclipseDevelopment/DM-DMV-TEST-REORG/DMWeb/ifabs/ant_home/lib/ivy.jar!/org/apache/ivy/core/settings/ivy.properties
> Override ignored for property "ivy.configurations"
> Override ignored for property "ivy.cache.ttl.default"

This confirms what I thought. Ant is telling that "ivy.cache.ttl.default" is already set, the property from the ivy.properties file is ignored.

> ...
> [ivy:configure] setting 'ivy.cache.ttl.default' to '10s'
> ...
> ivy.cache.ttl.default.ivy.instance -> 10s
> ...
> BUILD SUCCESSFUL
> Total time: 25 seconds
> 
> -----Original Message-----
> From: Nicolas Lalevée [mailto:nicolas.lalevee@hibnet.org] 
> Sent: Friday, February 15, 2013 11:07 AM
> To: ivy-user@ant.apache.org
> Subject: Re: Ant command line override not working?
> 
> 
> Le 14 févr. 2013 à 22:37, James Poli <Ja...@sas.com> a écrit :
> 
>> Hello,
>> 
>> I'm trying to override the property ivy.cache.ttl.default on the Ant command line but it doesn't seem to work?
>> I'm using:
>> 
>> -Divy.cache.ttl.default=5h
>> 
>> and always get the following message in the Ant output with debug on:
>> 
>> Setting Override ignored for property "ivy.cache.ttl.default"
> 
> If you're using the default ivysettings, which is loading the file ivy.properties in Ivy's jar, what you are seeing is that Ivy ignore the property found is that property file and keep the one you have set on the command line.
> 
> Nicolas
> 
> 
> 


RE: Ant command line override not working?

Posted by James Poli <Ja...@sas.com>.
Thanks Nicolas.  I do see in the Ant log that the message does come out after the default Ivy settings file is loaded.  FWIW, I do have an Ivy settings file that gets loaded but the default value of 10s always appears in Ant's debug for the property.  Can this property be overridden on the command line or does it need to be set in the settings file?

Snippets of the Ant log:

Apache Ant(TM) version 1.8.2 compiled on December 20 2010
...
Setting ro project property: ivy.cache.ttl.default -> 5h
...
[ivy:configure] Loading jar:file:/C:/EclipseDevelopment/DM-DMV-TEST-REORG/DMWeb/ifabs/ant_home/lib/ivy.jar!/org/apache/ivy/core/settings/ivy.properties
Override ignored for property "ivy.configurations"
Override ignored for property "ivy.cache.ttl.default"
...
[ivy:configure] setting 'ivy.cache.ttl.default' to '10s'
...
ivy.cache.ttl.default.ivy.instance -> 10s
...
BUILD SUCCESSFUL
Total time: 25 seconds

-----Original Message-----
From: Nicolas Lalevée [mailto:nicolas.lalevee@hibnet.org] 
Sent: Friday, February 15, 2013 11:07 AM
To: ivy-user@ant.apache.org
Subject: Re: Ant command line override not working?


Le 14 févr. 2013 à 22:37, James Poli <Ja...@sas.com> a écrit :

> Hello,
> 
> I'm trying to override the property ivy.cache.ttl.default on the Ant command line but it doesn't seem to work?
> I'm using:
> 
> -Divy.cache.ttl.default=5h
> 
> and always get the following message in the Ant output with debug on:
> 
> Setting Override ignored for property "ivy.cache.ttl.default"

If you're using the default ivysettings, which is loading the file ivy.properties in Ivy's jar, what you are seeing is that Ivy ignore the property found is that property file and keep the one you have set on the command line.

Nicolas




Re: Ant command line override not working?

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 14 févr. 2013 à 22:37, James Poli <Ja...@sas.com> a écrit :

> Hello,
> 
> I'm trying to override the property ivy.cache.ttl.default on the Ant command line but it doesn't seem to work?
> I'm using:
> 
> -Divy.cache.ttl.default=5h
> 
> and always get the following message in the Ant output with debug on:
> 
> Setting Override ignored for property "ivy.cache.ttl.default"

If you're using the default ivysettings, which is loading the file ivy.properties in Ivy's jar, what you are seeing is that Ivy ignore the property found is that property file and keep the one you have set on the command line.

Nicolas