Le 4 janv. 2011 à 18:24, Romain Pelisse a écrit :

> Hi Ivy users,
> 
> I used Ivy as part of my deployment tools. Our apps are packaged as zip
> files and Ivy fetches them from a maven repository. So I have an ivysettings
> .xml file where I declare our local repository:
> 
> <ivysettings>
> 
> 
>  <settings defaultResolver="my-company" />
> 
> 
>  <resolvers>
> 
> 
>    <chain name="my-company">
> 
> 
>      <url name="my-company">
> 
> 
>        <ivy pattern="http://
> my-company.repo/nexus/content/repositories/hosted-snapshot/com/my-company/[module]_2.8.0/[revision]/[artifact]-[revision].zip"
> />
>        <artifact pattern="http://
> my-company.repo/nexus/content/repositories/hosted-snapshot/com/my-company/[module]_2.8.0/[revision]/[artifact]-[revision].zip"
> />
>      </url>
> ...
> 
> (look like a hack  if you ask me - especially the hard coded url prefix
> 'com/my-company' and the hard coded file type, but it was the only I find to
> have this working)

You should set the m2compatible attribute to true, it will transform the dots 
into slashes:
http://ant.apache.org/ivy/history/latest-milestone/resolver/url.html
Then your pattern would look like:
http://my-company.repo/nexus/content/repositories/hosted-snapshot/[organisation]/[module]_2.8.0/[revision]/[artifact]-[revision].[ext]

I don't know what "2.8.0" stands for since it seems different from the 
revision. It could be part of the module name for instance.

> And then I have such a configuration in the ivy.xml file:
> 
> <dependencies>
> 
> 
>  <dependency org="my-company" name="apps" rev="0.2.0-SNAPSHOT"/>
> 
> 
> </dependencies>

then your dependency would also look like:
<dependency org="com.my-company" name="apps" rev="0.2.0-SNAPSHOT"/>

Nicolas


> 
> Because of the "hackyness" feeling I get from the ivy-settngs.xml.
> 
> Am I missing something here ? Did I misunderstand the XML semantics of Ivy
> and end up writing a rather bizarre configuration ?
> 
> -- 
> Romain PELISSE,
> *"The trouble with having an open mind, of course, is that people will
> insist on coming along and trying to put things in it" -- Terry Pratchett*
> http://belaran.eu/wordpress/belaran

Reply via email to