Description
It seems that using ivy;settings or ivy:configure task when you havn't initialized ivy.instance property doesn't work
Here is my ivy:configure
<ivy:configure settingsId="ivy.instance.project" file="${common.dir}/ivysettings.xml" />
I'm using my own ivysettings.properties instead of the one given by ivy. My ivysettings.properties doesn't contains ivy.instance property.
Here is part of my ivysettings.xml
<ivysettings> <properties file="${common.dir}/ivysettings.properties" override="false"/> ... </ivysettings>
And running this in debug mode i can see "Skipped because property 'ivy.instance' not set."
Consequences are, when i'm trying to use any ivy task that use this instance, i have a build failed with a message like "Reference ivy.instance.project not found."
Exemple try to use ivy:resolve
<ivy:resolve file="${ivy.file}" useCacheOnly="${ivy.use.cache.only}" settingsRef="ivy.instance.project"/>
The result is :
BUILD FAILED /home/neoverflow/work/sg/sogera-git/common/common.xml:124: Reference ivy.instance.project not found. at org.apache.tools.ant.types.Reference.getReferencedObject(Reference.java:115) at org.apache.ivy.ant.IvyTask.getIvyInstance(IvyTask.java:76) at org.apache.ivy.ant.IvyTask.prepareTask(IvyTask.java:256) at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:276) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Adding this property to my own ivysettings.properties, everything seems ok.
I think that when you give an settingsId (in ivy:configure) or an id in (ivy:instance) you doesn't need to use ivy.instance property.