You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by teknokrat <ig...@nomura.com> on 2011/09/22 16:08:29 UTC

How do I get dependecies out of a maven repo?

We store a number of supplementary artifacts with out main one in our 
maven repo. For the life of me I cannot get Ivy to ever resolve them. 
I use the following in my Ivy file:

<dependency name="module" rev="latest.integration">
  <artifact name="module" conf="config" type="config" ext="jar"
e:classifier="config"/>
  <artifact name="module"/>
</dependency>

config is a configuration defined in the configurations section. 
I expect this to download module.jar and module-config.jar, but 
only new versions of module.jar are ever downloaded. 
Even though module-config.jar has changed as well.

What is the correct way to do this?

Thanks


Re: How do I get dependecies out of a maven repo?

Posted by teknokrat <te...@yahoo.com>.
On 22/09/2011 15:17, Geoff Clitheroe wrote:
> You most probably need to set your resolvers to be Maven compatible
> (in your settings file) e.g.,
>
> 	<property name="ivy.shared.m2.ivy.pattern"
> 		value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
> 		override="false"/>
>
> 	<property name="ivy.shared.m2.artifact.pattern"
> 		value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
> 		override="false"/>
>
> 		<url name="java.net" m2compatible="true">
> 			<ivy pattern="http://download.java.net/maven/2/${ivy.shared.m2.ivy.pattern}"/>
> 			<artifact pattern="http://download.java.net/maven/2/${ivy.shared.m2.artifact.pattern}"/>
> 		</url>
>
> http://ant.apache.org/ivy/history/latest-milestone/resolver/url.html
>
> There is a complete settings file here
>
> http://codegeo.org/repos/codegeo/build/trunk/ivysettings.xml
>

Thanks but I am using the ibiblio resolvers and everything else works 
perfectly. I do not publish the Ivy file however, instead I create a POM 
and publish that. My publications element is of the form:

<publications>
    <artifact/>
    <artifact type="pom" ext="pom" />
    <artifact type="config" conf="config" ext="jar" e:classifier="config"/>
</publications>

It seems to me that Ivy for some reason is looking for module-config.pom 
and when it cannot find it refuses to download the updated config jar. 
Yet it downloads the sources and javadoc fine.

The log always shows the config jar as NOT REQUIRED, in spite of showing 
the correct url where the jar resides.


Re: How do I get dependecies out of a maven repo?

Posted by Geoff Clitheroe <g....@gmail.com>.
You most probably need to set your resolvers to be Maven compatible
(in your settings file) e.g.,

	<property name="ivy.shared.m2.ivy.pattern"
		value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
		override="false"/>

	<property name="ivy.shared.m2.artifact.pattern"
		value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
		override="false"/>

		<url name="java.net" m2compatible="true">
			<ivy pattern="http://download.java.net/maven/2/${ivy.shared.m2.ivy.pattern}"/>
			<artifact pattern="http://download.java.net/maven/2/${ivy.shared.m2.artifact.pattern}"/>
		</url>

http://ant.apache.org/ivy/history/latest-milestone/resolver/url.html

There is a complete settings file here

http://codegeo.org/repos/codegeo/build/trunk/ivysettings.xml

Cheers,
Geoff





On Fri, Sep 23, 2011 at 2:08 AM, teknokrat <ig...@nomura.com> wrote:
> We store a number of supplementary artifacts with out main one in our
> maven repo. For the life of me I cannot get Ivy to ever resolve them.
> I use the following in my Ivy file:
>
> <dependency name="module" rev="latest.integration">
>  <artifact name="module" conf="config" type="config" ext="jar"
> e:classifier="config"/>
>  <artifact name="module"/>
> </dependency>
>
> config is a configuration defined in the configurations section.
> I expect this to download module.jar and module-config.jar, but
> only new versions of module.jar are ever downloaded.
> Even though module-config.jar has changed as well.
>
> What is the correct way to do this?
>
> Thanks
>
>