Well, apparently the attachments were scrubbed by the list-software, so
here they are inline:
build.xml:
<project name="Dependencies Bug" default="bug"
xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="bug">
<ivy:retrieve pathid="cp.deps"
pattern="[organisation]/[module]/[revision]/[artifact].[ext]"
conf="compile"/>
<debug_path refid="cp.deps"/>
</target>
<macrodef name="debug_path">
<attribute name="refid" description="The id of the path to
debug"/>
<sequential>
<local name="path.for.output"/>
<pathconvert refid="@{refid}" property="path.for.output"
pathsep=" "/>
<echo message="Path @{refid}: ${path.for.output}"/>
</sequential>
</macrodef>
</project>
---
ivy.xml:
<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="
http://ant.apache.org/ivy/schemas/ivy.xsd" version="2.0">
<info organisation="de.gebit" module="ivy-dependencies-bug">
<license name="ASF 2.0" url="
https://www.apache.org/licenses/LICENSE-2.0"/>
</info>
<configurations>
<conf name="compile" description="for compilation of this
module itself"/>
</configurations>
<dependencies>
<dependency org="javax.servlet" name="javax.servlet-api"
rev="3.0.1" conf="compile->master"/>
<dependency org="org.seleniumhq.selenium"
name="selenium-server" rev="2.29.0" conf="compile->default"/>
</dependencies>
</ivy-module>
Cheers
Carsten
From: [email protected]
To: [email protected]
Date: 24.01.2013 12:46
Subject: order of dependencies undefined when using retrieve task?
Hi,
I'm using Ivy 2.3.0 and noticed that the depencencies specified in an
ivy.xml are not the same
as those in the path that I get using <ivy:retrieve
pathid="my.classpath"/>
You can see this yourself by putting the attached files into a directory
and calling ant. I would expect
javax.servlet-api.jar to be the first entry in the resulting classpath,
however it is only somewhere
in the middle of the classpath.
This is especially a problem here because the second dependency provides
org.mortbay.jetty/servlet-api-2.5.jar
which contains the same packages as javax.servlet-api, but in a different
version.
I can fix this specific problem by adding an <exclude> for
org.mortbay.jetty here, but I'd expect the dependencies
order to be respected. This might otherwise lead to unexpected runtime
errors.
Thanks
Carsten