user1584177
user1584177

Reputation: 31

Ivy resolve wrong dependency

I'm using Ivy to resolve dependency in a project.

The dependency in my ivy.xml

<dependency org="org.mule.tools" name="ibean-archetype" rev="3.1.0" 
            conf="compile;runtime"/>

I get the error message in console

[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve]           [NOT FOUND  ] org.mule.tools#ibean-archetype;3.1.0!ibean
-archetype.maven-archetype (16ms)
[ivy:resolve]   ==== public: tried
[ivy:resolve]     http://192.168.101.173:8080/nexus/content/groups/public/org/mule/tools/ibean-archetype/3.1.0/ibean-archetype-3.1.0.maven-archetype
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]           ::              FAILED DOWNLOADS            ::
[ivy:resolve]           :: ^ see resolution messages for details  ^ ::
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]           :: org.mule.tools#ibean-archetype;3.1.0!ibean-archetype.maven-archetype
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::

Why the ibean-archetype-3.1.0.jar was resolve to ibean-archetype-3.1.0.maven-archetype??? I am confused.

My ivy use the nexus and the information of ibean-archetype-3.1.0.jar in the nexus

<dependency>
  <groupId>org.mule.tools</groupId>
  <artifactId>ibean-archetype</artifactId>
  <version>3.1.0</version>
</dependency>

Upvotes: 1

Views: 830

Answers (1)

Joker
Joker

Reputation: 2463

I had the same problem...

For me, what fixed the problem was changing following line:

<dependency org="io.takari.junit" name="takari-cpsuite" rev="1.2.7"/>

to:

<dependency org="io.takari.junit" name="takari-cpsuite" rev="1.2.7">
        <artifact name="takari-cpsuite"/>
</dependency>

I didnt even need to specify ext or type attribute inside artifact-name to solve the problem.

I think Ivy mistakenly takes the content of the packaging-tag of the pom (of the resolved library) as extension...

Both of our library have this <packaging> tag in the .pom,

See ibean-archetype (for the library you used) and takari (for the library I used)

Upvotes: 1

Related Questions