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 Wszeb <ws...@gmail.com> on 2008/10/03 15:17:23 UTC

ivy:settings - problem with properties in 'id' attribute

Hi!

I'm currently trying to switch from Ivy '2.0.0-beta2' to '2.0.0-rc1'. I have
problems with 'settings' task. I can't define settings 'id' via a property -
I think properties are not expanded correctly.

Here is my ant target:

<target name="ivy-set-settings">
		<echo>Setting Ivy settings for projects (settingsref =
'${ivy.project.settingsref}')...</echo>
		<ivy:settings id="ivy.project.settings"
file="${ivy.projects.settings.file}" />

		<echo>Setting Ivy settings for projects - with local repos only
(settingsref = '${ivy.project.only_local.settingsref}')...</echo>
		<ivy:settings id="${ivy.project.only_local.settingsref}"
file="${ivy.projects.only_local.settings.file}" />

		<echo>Setting Ivy settings for projects - with shared repos only
(settingsref = '${ivy.project.only_shared.settingsref}')...</echo>
		<ivy:settings id="${ivy.project.only_shared.settingsref}"
file="${ivy.projects.only_shared.settings.file}" />
</target>

And here is the output (debug mode):

ivy-set-settings:
     [echo] Setting Ivy settings for projects (settingsref =
'ivy.project.settings')...
Class org.apache.tools.ant.Project loaded from parent loader (parentFirst)
Adding reference: ivy.instance
Class java.net.URL loaded from parent loader (parentFirst)
Finding class org.apache.ivy.ant.IvyAntSettings$Credentials
Loaded from C:\Documents and
Settings\Administrator\.ivy2\ivy-itself-libs\ivy-2.0.0-rc1.jar
org/apache/ivy/ant/IvyAntSettings$Credentials.class
Class org.apache.ivy.ant.IvyAntSettings$Credentials loaded from ant loader
(parentFirst)
Finding class org.apache.ivy.Ivy
Loaded from C:\Documents and
Settings\Administrator\.ivy2\ivy-itself-libs\ivy-2.0.0-rc1.jar
org/apache/ivy/Ivy.class
Class org.apache.ivy.Ivy loaded from ant loader (parentFirst)
Class java.io.File loaded from parent loader (parentFirst)
Class java.util.Hashtable loaded from parent loader (parentFirst)
Adding reference: ivy.project.settings
     [echo] Setting Ivy settings for projects - with local repos only
(settingsref = 'ivy.project.only_local.settings')...
Adding reference: ivy.instance
Adding reference: ${ivy.project.only_local.settingsref}
     [echo] Setting Ivy settings for projects - with shared repos only
(settingsref = 'ivy.project.only_shared.settings')...
Adding reference: ivy.instance
Adding reference: ${ivy.project.only_shared.settingsref}

Any ideas? I'm doing something wrong or is it the bug? With 2.0.0-beta2 I
was using 'override=true' attribute. In rc1 this attribute disappears, so I
removed it. But I think it's not connected with properties issue.

Łukasz "Wszebor" Kurek
-- 
View this message in context: http://www.nabble.com/ivy%3Asettings---problem-with-properties-in-%27id%27-attribute-tp19797543p19797543.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: ivy:settings - problem with properties in 'id' attribute

Posted by Wszeb <ws...@gmail.com>.

Maarten Coene wrote:
> 
> This has already been reported:
> https://issues.apache.org/jira/browse/IVY-925
> ... and it is fixed in SVN trunk.
> 
> I think you can workaround it by using ivy:configure instead of
> ivy:settings and replace "id" with "settingsId".
> The "override" attribute has been moved from ivy:settings to
> ivy:configure.
> 

Thanks for your reply and explanations. Indeed, use of 'ivy:configure' with
'settingsId' solved the problem. I have missed that task - I thought it's
deprecated.

Łukasz "Wszebor" Kurek

-- 
View this message in context: http://www.nabble.com/ivy%3Asettings---problem-with-properties-in-%27id%27-attribute-tp19797543p19840171.html
Sent from the ivy-user mailing list archive at Nabble.com.