ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From imihov <>
Subject Inconsistent resolve behavior of dependencies with a classifier
Date Fri, 05 Jun 2009 01:56:14 GMT

We ran across this issue originally by using Ivy to read a POM and generate a
respective .ivy file. Rather than trying to explain the original setup, I
created a small test which demonstrates the problem.

The scenario consists of two artifacts where depends on
org:bar:bar:1.0.1, however, bar has a classifier. When doing a resolve with
an empty local cache, the resove fails as expected. However, subsequent
resolve attemps succeed and retrieve a local artifact which does not have
the classifier in it.

I understand that the .ivy file resulting from the POM conversion might not
be ideal with the 'artifact' element inside a dependency and that
configurations should be used instead. 

There are a couple of reasons for posting this:

 - Making sure we are not making a mistake in the ivysettings we have.

 - Seeking to understand the behavior where subsequent resolve succeeds
after an unsuccessful initial run.

 - Reporting a potential problem

[Ivy version]:

  <settings defaultResolver="sandbox"/>
checkUpToDate="true" lockStrategy="artifact-lock"/>
    <filesystem name="sandbox" m2compatible="true" local="true">

  <info organisation="" module="foo" revision="1.0.0"/>
    <conf name="default" visibility="public" extends="master"/>
    <conf name="master" visibility="public" />
    <conf name="compile" visibility="public"/>
    <conf name="runtime" visibility="public"/>
    <artifact name="foo" type="jar" conf="master"/>
    <dependency org="org.bar2" name="bar2" rev="1.0.1" force="true"
	  <artifact name="bar2" type="jar" ext="jar" conf="" e:classifier="jdk15"/>

  <info organisation="org.bar2" module="bar2" revision="1.0.1"/>
    <conf name="default" visibility="public" description="Default
configuration maps to master (the artifact itself)." extends="master"/>
    <conf name="master" visibility="public" description="Contains the
artifact published by this module itself, with no transitive dependencies"/>
    <conf name="source" visibility="public" description="Contains the source
artifact of this module, if any."/>
    <conf name="compile" visibility="public"/>
    <conf name="runtime" visibility="public"/>

To see the problem:

 - expand the tar.gz
 - cd into work/eclipse/workspace/ivy-classifier
 - java -jar ivy-2.0.0.jar -settings ivysettings.xml -dependency foo
View this message in context:
Sent from the ivy-user mailing list archive at

View raw message