ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc De Boeck <mdeb...@gmail.com>
Subject Re: Ivy cache doesn't handling extra attributes as expected
Date Thu, 16 Jan 2014 21:13:27 GMT
Did you update the artifactpattern of your ivy-cache ? You should add your
extra attribute in the same way as you have to update the patterns in your
resolvers.
See http://ant.apache.org/ivy/history/latest-milestone/settings/caches.html

Regards,
Marc


2014/1/16 opatry <olivier.patry@gmail.com>

> Hi,
>
> I already found a similar question:
>
> http://apache-ivy.996301.n3.nabble.com/quot-extra-quot-attributes-lost-when-dependencies-are-placed-into-cache-td3092.html
>
> It's a pretty old question and has not so many answers (useful).
>
> So to resume the issue:
>
> let's say I have a first module defining 3 artifacts with the name/type/ext
> but with an extra attribute named "os".
>
>     <publications>
>       <artifact type="lib" ext="zip" extra:os="windows" conf="windows"/>
>       <artifact type="lib" ext="zip" extra:os="linux" conf="linux"/>
>       <artifact type="lib" ext="zip" extra:os="mac" conf="mac"/>
>       <artifact type="lib" ext="zip" extra:os="android" conf="android"/>
>     </publications>
>
> Now I have two modules that depend on this first one and express the
> dependency to fetch only one of the published artifact (depending on the
> targeted OS)
>
> module 2:
>
>       <dependency org="myteam" name="module1" rev="1.2.+">
>       <artifact name="module1" type="lib" ext="zip" extra:os="ios" />
>
> module 3:
>
>       <dependency org="myteam" name="module1" rev="1.2.+">
>       <artifact name="module1" type="lib" ext="zip" extra:os="android" />
>
> The first resolve/retrieve gives me the expected publication, the ios one.
> The second one tell me that everything goes fine and that
> module1-lib-android.zip is available but in fact, it has been resolved with
> the -ios.zip one.
>
> When I look at the Ivy (2.3.0) cache on my system, the repository layout
> doesn't reflect the [os] attribute (the resolver I use do so). So there is
> only one zip available in cache.
>
> The resolved XML files looks good to me (myteam-module2-ios-default.xml,
> myteam-module3-android.xml) even if the attribute is transformed as
> extra-os="" instead of the XML namespace notation extra:os=""
>
> It sounds like a bug to me, but maybe I'm not using the extra attributes
> properly?
> This SO question seems encouraging but…
>
> http://stackoverflow.com/questions/2280578/how-does-ivypublish-use-the-classifier-attribute/2297379#2297379
>
> I also have associated a conf to the publication (extra:os="android"
> conf="android") of module1 and used them in module 2 and 3 (dependency…
> conf="default->android") but nothing better here.
>
>
>
>
> --
> View this message in context:
> http://apache-ivy.996301.n3.nabble.com/Ivy-cache-doesn-t-handling-extra-attributes-as-expected-tp9591.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message