[
https://issues.apache.org/jira/browse/IVY-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603823#action_12603823
]
Xavier Hanin commented on IVY-830:
----------------------------------
The problem comes from the fact that ivy:settings is a datatype, not a task.
The consequence is that it is "executed" only when needed by another ivy task.
We have discussed several times the issues behind choosing a datatype or a task
on dev list, and last time we agreed to undeprecate the configure task, and
make it the default way to load settings again. This would solve this issue,
maybe it's time to actually proceed with this change.
> ivy.dep.file property unavailable before first <ivy:resolve> call, despite
> <ivy:settings> being called
> ------------------------------------------------------------------------------------------------------
>
> Key: IVY-830
> URL: https://issues.apache.org/jira/browse/IVY-830
> Project: Ivy
> Issue Type: Bug
> Components: Ant
> Environment: Windows
> Reporter: Greg St.Onge
> Fix For: 2.0.0-beta-1
>
>
> The following test script:
> <ivy:settings/>
> <echo message="ivy.dep.file = ${ivy.dep.file}"/>
> <ivy:resolve/>
> <echo message="ivy.dep.file = ${ivy.dep.file}"/>
> Produces this output:
> [echo] ivy.dep.file = ${ivy.dep.file}
> [ivy:resolve] :: Ivy 2.0.0-beta2-local-20080108025749 - 20080108025749 ::
> http://ant.apache.org/ivy/ ::
> :: loading settings :: file = C:\svn\ARCH-TOOL\ivy\hss-ivysettings.xml
> [ivy:resolve] :: resolving dependencies :: hss#ef.srv;[EMAIL PROTECTED]
> [ivy:resolve] confs: [compile, war, schema, spec-pdf, spec-html, javadocs]
> [ivy:resolve] :: resolution report :: resolve 172ms :: artifacts dl 0ms
> [echo] ivy.dep.file = ivy.xml
> Interestingly, the deprecated <ivy:configure> works properly:
> <ivy:configure/>
> <echo message="ivy.dep.file = ${ivy.dep.file}"/>
> <ivy:resolve/>
> <echo message="ivy.dep.file = ${ivy.dep.file}"/>
> Produces output:
> [ivy:configure] ivy:configure is deprecated, please use the data type
> ivy:settings instead
> [echo] ivy.dep.file = ivy.xml
> no settings file found, using default...
> [ivy:resolve] :: Ivy 2.0.0-beta2-local-20080108025749 - 20080108025749 ::
> http://ant.apache.org/ivy/ ::
> :: loading settings :: url =
> jar:file:/C:/svn/ARCH-TOOL/ivy/apache.ivy_2.0.0.beta2_20080108025749.jar!/org/apache/ivy/core/settings/ivysettings.xml
> [ivy:resolve] :: resolving dependencies :: hss#ef.srv;[EMAIL PROTECTED]
> [ivy:resolve] confs: [compile, war, schema, spec-pdf, spec-html, javadocs]
> [ivy:resolve] :: resolution report :: resolve 125ms :: artifacts dl 0ms
> [echo] ivy.dep.file = ivy.xml
> I encountered this problem when trying to use the ivy.dep.file property as a
> default value in macros.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.