Reputation: 3263
Me as a Maven newbie, I am playing around with my own local Sonartype Nexus. I have configured my maven installation to use it as a proxy and it works fine for a simple test project in resolving the following dependency in my pom.xml
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
Next, I tried a similar project with Ivy having
in the ivy.xml
. Ivy is using the same Nexus server as proxy (configured in ivysettings.xml
)
<ivysettings>
<settings defaultResolver="default"/>
<property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" />
<resolvers>
<chain name="default">
<ibiblio name="public" m2compatible="true" root="http://localhost:2281/nexus/content/groups/public"/>
</chain>
</resolvers>
</ivysettings>
However, when running ant, it fails to resolve hibernate-validator-4.2.0-Final
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] module not found: org.hibernate#com.springsource.org.hibernate.validator;4.2.0.Final
[ivy:retrieve] ==== public: tried
[ivy:retrieve] http://localhost:2281/nexus/content/groups/public/org/hibernate/com.springsource.org.hibernate.validat
or/4.2.0.Final/com.springsource.org.hibernate.validator-4.2.0.Final.pom
[ivy:retrieve] -- artifact org.hibernate#com.springsource.org.hibernate.validator;4.2.0.Final!com.springsource.org.hi
bernate.validator.jar:
[ivy:retrieve] http://localhost:2281/nexus/content/groups/public/org/hibernate/com.springsource.org.hibernate.validat
or/4.2.0.Final/com.springsource.org.hibernate.validator-4.2.0.Final.jar
[ivy:retrieve] [NOT FOUND ] javax.activation#activation;1.0.2!activation.jar (0ms)
[ivy:retrieve] ==== public: tried
[ivy:retrieve] http://localhost:2281/nexus/content/groups/public/javax/activation/activation/1.0.2/activation-1.0.2.j
ar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: org.hibernate#com.springsource.org.hibernate.validator;4.2.0.Final: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: FAILED DOWNLOADS ::
[ivy:retrieve] :: ^ see resolution messages for details ^ ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: javax.activation#activation;1.0.2!activation.jar
I already tried to add more remote repositories to the Nexus installation, such as SpringSource Enterprise Bundle Repository (http://maven.springframework.org/release/) or JBoss public (https://repository.jboss.org/nexus/content/repositories/releases/) but this did not help.
In principle, Ivy seems to work as well as it fetches a lot of other dependencies before failing.
My questions: 1) Why does Maven not fail for the same reason? Is hibernate-validator kind of optional and Ivy has another resolve strategy as Maven?
2) I am curious about the artifact name it tries to resolve: org.hibernate#com.springsource.org.hibernate.validator;4.2.0.Final
(BTW if I add <dependency org="org.hibernate" name="hibernate-validator" rev="4.2.0.Final" />
it works, but for the Spring case,
it requires artifact com.springsource.org.hibernate.validator
?
Upvotes: 1
Views: 1846
Reputation: 3263
Ok, the solution is that I missed to assign all the new repositories (spring, jboss) to the public group repository /nexus/content/groups/public
which actually was given as only repository in ivysettings.xml
.
Upvotes: 1