Pregunta

Considering the following ivy dependencies,

<dependency org="org.fusesource.restygwt" name="restygwt" rev="1.3"
 conf="gwtcompile->default; compile->default"/>

<dependency org="org.jboss.resteasy" name="resteasy-jaxrs" rev="2.3.4.Final"
 conf="compile->compile(*),runtime(*);runtime->runtime(*)"/>

They depend on public maven repos mirrored by

http ://myivyserver:8888/mirrored/ .

as specified by the ivysettings resolver chaining to ...

<url name="mirrored" m2compatible="true">
  <artifact
    pattern="http://myivyserver:8888/mirrored/${maven2.artifact.pattern}" />
</url>

Where I can see the mirrored directory completely replicating the artefacts of remote maven repos.

I am used to Maven and the seeing the buildpath on eclipse showing maven dependencies.

Now, I am creating Ivy-dependency for a project. I am expecting to see similar, and I do see, a similar Ivy dependency node showing all the jars due to the Ivy eclipse pluggin.

However, the Ivy dependency node in eclipse buildpath does not show any jars transitively specified by the mirrored poms.

For example,

<dependency org="org.fusesource.restygwt" name="restygwt" rev="1.3"
 conf="gwtcompile->default; compile->default"/>

<dependency org="org.jboss.resteasy" name="resteasy-jaxrs" rev="2.3.4.Final"
 conf="compile->compile(*),runtime(*);runtime->runtime(*)"/>

both dependencies’ pom specify dependency on javax.ws.rs (jsr311-api)

<dependency>
  <groupId>javax.ws.rs</groupId>
  <artifactId>jsr311-api</artifactId>
  <version>1.1</version>
  <scope>provided</scope>
</dependency>

However javax.ws.rs(jsr311-api) does not show up on the buildpath library of the ivy managed project, as a Maven managed one would.

What further more would I have to do to get ivy plugin to resolve transitive dependencies that are due to maven poms?

Thank you.

¿Fue útil?

Solución

URL resolver considers maven layout but not pom dependencies. When I was implementing this functionality ibiblio resolver was able to resolve pom's dependencies.

http://ant.apache.org/ivy/history/latest-milestone/resolver/ibiblio.html
<ibiblio name="maven2" m2compatible="true" root="http://myivyserver:8888/mirrored">

I haven't used it long because I preferred non-transitive dependencies in my code so I've finished with using pure url resolver.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top