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 Zmaj <mu...@gmx.de> on 2007/08/03 13:38:05 UTC

m2compatible attribute and url resolver

Hi,

lets say i define my resolvers like this :
  <resolvers>    
    <filesystem name="shared">
      <ivy
pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
      <artifact
pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}"
/>
    </filesystem>
  <url name="mav2" m2compatible="true">
   <ivy
pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[module]/[revision]/ivy-[revision].xml"
/>
   <artifact
pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
   <artifact
pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[module]/[revision]/[artifact].[ext]"
/>
  </url> 
     <chain name="default" returnFirst="true" dual="true">
    <resolver ref="shared"/>
    <resolver ref="mav2" />
    <ibiblio name="ibiblio"  m2compatible="true"/>    
  </chain>    
    <chain name="test">
    <resolver ref="mav2"/>
     <resolver ref="shared"/>
  </chain>
  </resolvers>

 and i have a install task like this : 

  <ivy:install organisation="commons-httpclient" module="commons-httpclient"
revision="3.0" 
					  	overwrite="true" from="ibiblio" to="shared"/>

When i use ibiblio in the from attribute to copy from than the delivered
file-ivy.xml has resolved all dependencies of the commons-httpclient-3.0.jar
like their defined in the pom.xml in the ibiblio repository.

But when i use mav2 ( <ivy:install .. from="mav2" to="shared"/> ) to resolve
the jar then the dependencies are not resolved properly - i mean they're not
resolved at all in the incoming file-ivy.xml.

Is there something special about using m2compatible="true" with a <url> -
resolver ? 
What confused me about this is the following : 
When i use ibiblio to download from the i can see that the jar is downloaded
from
http://repo1.maven.org/maven2/commons-httpclient/...
but when i point my <url> - resolvers ivy and artifact pattern to this url
the dependencies still aren't resolved.  :confused: how come ? 
thx ivan

And let me say this quick .  i(vy) love it

-- 
View this message in context: http://www.nabble.com/m2compatible-attribute-and-url-resolver-tf4212066.html#a11981696
Sent from the ivy-user mailing list archive at Nabble.com.


Re: m2compatible attribute and url resolver

Posted by Jing Xue <ji...@digizenstudio.com>.
On Fri, Aug 03, 2007 at 04:38:05AM -0700, Zmaj wrote:
<snip>
> Is there something special about using m2compatible="true" with a <url> -
> resolver ? 
> What confused me about this is the following : 
> When i use ibiblio to download from the i can see that the jar is downloaded
> from
> http://repo1.maven.org/maven2/commons-httpclient/...
> but when i point my <url> - resolvers ivy and artifact pattern to this url
> the dependencies still aren't resolved.  :confused: how come ? 
<snip>

See the 'usepoms' attribute of the ibiblio resolver. Problem is ibiblio
is the only resolver supporting it, so other resolvers such as
filesystem or url won't know to use the pom files even with
m2compatible="true". Xavier gave me a tip that worked - replace the
"[ext]" in the ivy pattern with "pom". You might give it a try.

Here's the related JIRA issue:
https://issues.apache.org/jira/browse/IVY-561

HTH.
-- 
Jing Xue

RE: m2compatible attribute and url resolver

Posted by Gilles Scokart <gs...@gmail.com>.
You might have to check the doc, but if I remember well, there is a usepom
attribute.  Try maybe to play with that.



Gilles

> -----Original Message-----
> From: Zmaj [mailto:mungoparks@gmx.de]
> Sent: vendredi 3 août 2007 13:38
> To: ivy-user@incubator.apache.org
> Subject: m2compatible attribute and url resolver
> 
> 
> Hi,
> 
> lets say i define my resolvers like this :
>   <resolvers>
>     <filesystem name="shared">
>       <ivy
> pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
>       <artifact
> pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}
> "
> />
>     </filesystem>
>   <url name="mav2" m2compatible="true">
>    <ivy
> pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[mod
> ule]/[revision]/ivy-[revision].xml"
> />
>    <artifact
> pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[mod
> ule]/[revision]/[artifact]-[revision].[ext]"
> />
>    <artifact
> pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[mod
> ule]/[revision]/[artifact].[ext]"
> />
>   </url>
>      <chain name="default" returnFirst="true" dual="true">
>     <resolver ref="shared"/>
>     <resolver ref="mav2" />
>     <ibiblio name="ibiblio"  m2compatible="true"/>
>   </chain>
>     <chain name="test">
>     <resolver ref="mav2"/>
>      <resolver ref="shared"/>
>   </chain>
>   </resolvers>
> 
>  and i have a install task like this :
> 
>   <ivy:install organisation="commons-httpclient" module="commons-
> httpclient"
> revision="3.0"
> 					  	overwrite="true"
from="ibiblio"
> to="shared"/>
> 
> When i use ibiblio in the from attribute to copy from than the delivered
> file-ivy.xml has resolved all dependencies of the commons-httpclient-
> 3.0.jar
> like their defined in the pom.xml in the ibiblio repository.
> 
> But when i use mav2 ( <ivy:install .. from="mav2" to="shared"/> ) to
> resolve
> the jar then the dependencies are not resolved properly - i mean they're
> not
> resolved at all in the incoming file-ivy.xml.
> 
> Is there something special about using m2compatible="true" with a <url> -
> resolver ?
> What confused me about this is the following :
> When i use ibiblio to download from the i can see that the jar is
> downloaded
> from
> http://repo1.maven.org/maven2/commons-httpclient/...
> but when i point my <url> - resolvers ivy and artifact pattern to this url
> the dependencies still aren't resolved.  :confused: how come ?
> thx ivan
> 
> And let me say this quick .  i(vy) love it
> 
> --
> View this message in context: http://www.nabble.com/m2compatible-
> attribute-and-url-resolver-tf4212066.html#a11981696
> Sent from the ivy-user mailing list archive at Nabble.com.