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 Ca...@gebit.de on 2013/01/24 12:45:48 UTC
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
Re: order of dependencies undefined when using retrieve task?
Posted by Ca...@gebit.de.
Bummer, but thanks for the pointer.
Oh, and congrats to the 2.3.0 release :-)
Cheers
Carsten
From: Maarten Coene <ma...@yahoo.com>
To: "ivy-user@ant.apache.org" <iv...@ant.apache.org>
Date: 24.01.2013 23:47
Subject: Re: order of dependencies undefined when using retrieve
task?
At the moment, Ivy doesn't respect the order as specified in your ivy.xml.
Cfr https://issues.apache.org/jira/browse/IVY-225
Maarten
________________________________
From: "Carsten.Pfeiffer@gebit.de" <Ca...@gebit.de>
To: ivy-user@ant.apache.org
Sent: Thursday, January 24, 2013 12:45 PM
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
Re: order of dependencies undefined when using retrieve task?
Posted by Maarten Coene <ma...@yahoo.com>.
At the moment, Ivy doesn't respect the order as specified in your ivy.xml.
Cfr https://issues.apache.org/jira/browse/IVY-225
Maarten
________________________________
From: "Carsten.Pfeiffer@gebit.de" <Ca...@gebit.de>
To: ivy-user@ant.apache.org
Sent: Thursday, January 24, 2013 12:45 PM
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
Re: order of dependencies undefined when using retrieve task?
Posted by Ca...@gebit.de.
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: Carsten.Pfeiffer@gebit.de
To: ivy-user@ant.apache.org
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