Ali
Ali

Reputation: 838

Cannot resolve dependency using ivy

I'm having problems with ivy not resolving some of my dependencies. Here is how I replicated the issue:

I have an empty java project in eclipse. I've added ivy.xml to my project :

<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
    <info
        organisation=""
        module=""
        status="integration">
    </info>
    <dependencies >
        <dependency org="org.drools" name="drools-core" rev="5.5.0.Final"/>
    </dependencies>
</ivy-module>

This works fine and ivy is able to resolve and download drools.

If I change the revision to 6.3.0.Final (http://mvnrepository.com/artifact/org.drools/drools-core/6.3.0.Final) It won't work and I see an error:

unresolved dependency: org.drools#drools-core;6.3.0.Final: not found

The only difference that I can see between these two versions is that 6.3.0 is bundle. In eclipse, when I go to Properties for Ivy -> classpath -> I have checked Read OSGI metadata & Accepted types = jar,bundle,ejb,maven-plugin

I've also googled around and found this (which might be completely unrelated to this issue): http://mail-archives.apache.org/mod_mbox/ant-dev/201501.mbox/%3CCAC_RtEZx=bqk+N3MrtH-Y-zCqDfm5=eA3rYOa7hLLYC_u82S9g@mail.gmail.com%3E

Upvotes: 2

Views: 3422

Answers (2)

wooki
wooki

Reputation: 448

Not sure how Ivy works but if you can add additional repositories there, adding https://repository.jboss.org should do the trick. This should solve the issue of non-existing org.jboss.dashboard-builder that was already indicated by Mark to be the source of the problem.

Following helped for the same problem while using Gradle for dependency management.

repositories {
    maven {
        url "https://repository.jboss.org"
    }
}

Upvotes: 2

Mark O&#39;Connor
Mark O&#39;Connor

Reputation: 77951

Appears to be a Maven repository problem. Looks like there is a missing dependency in one of the parent POM files.

The ivy resolution prints the following warning messages:

[ivy:resolve] :::: WARNINGS
[ivy:resolve]   io problem while parsing ivy file: https://repo1.maven.org/maven2/org/kie/kie-platform-bom/6.3.0.Final/kie-platform-bom-6.3.0.Final.pom (java.io.IOException: Impossible to import module for file:/home/mark/.ivy2/cache/org.kie/kie-platform-bom/ivy-6.3.0.Final.xml.original. Import=org.jboss.dashboard-builder#dashboard-builder-bom;6.3.0.Final)
[ivy:resolve]   io problem while parsing ivy file: https://repo1.maven.org/maven2/org/kie/kie-parent-with-dependencies/6.3.0.Final/kie-parent-with-dependencies-6.3.0.Final.pom (java.io.IOException: Impossible to import module for file:/home/mark/.ivy2/cache/org.kie/kie-parent-with-dependencies/ivy-6.3.0.Final.xml.original. Import=org.kie#kie-platform-bom;6.3.0.Final)
[ivy:resolve]   io problem while parsing ivy file: https://repo1.maven.org/maven2/org/drools/drools/6.3.0.Final/drools-6.3.0.Final.pom (java.io.IOException: Impossible to load parent for file:/home/mark/.ivy2/cache/org.drools/drools/ivy-6.3.0.Final.xml.original. Parent=org.kie#kie-parent-with-dependencies;6.3.0.Final)
[ivy:resolve]   io problem while parsing ivy file: https://repo1.maven.org/maven2/org/drools/drools-core/6.3.0.Final/drools-core-6.3.0.Final.pom (java.io.IOException: Impossible to load parent for file:/home/mark/.ivy2/cache/org.drools/drools-core/ivy-6.3.0.Final.xml.original. Parent=org.drools#drools;6.3.0.Final)
[ivy:resolve]       module not found: org.drools#drools-core;6.3.0.Final

The following parent module:

Has a POM file dependency

<dependency>
  <groupId>org.jboss.dashboard-builder</groupId>
  <artifactId>dashboard-builder-bom</artifactId>
  <type>pom</type>
  <version>${version.org.jbpm.dashboard-builder}</version>
  <scope>import</scope>
</dependency>

That does not seem to exist in Maven Central

Upvotes: 2

Related Questions