ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wolfgang häfelinger <whaefelin...@gmail.com>
Subject Re: conflict-managers
Date Fri, 11 Jul 2014 10:51:25 GMT
"force = 'true'" worked also for me.

Nevertheless, Ivy demonstrates very nicely that even excellent software is
nothing without proper documentation.



On Tue, Jul 8, 2014 at 8:41 PM, Archie Cobbs <archie@dellroad.org> wrote:

> Try using <dependency force="true" .... > .. this works for me.
>
> -Archie
>
>
> On Tue, Jul 8, 2014 at 1:26 PM, wolfgang häfelinger <
> whaefelinger@gmail.com>
> wrote:
>
> > Hello there,
> >
> > I'm about to download certain dependencies in a local folder (M2 layout).
> > For example:
> >
> > == ivy.xml ==
> > <ivy-module version="2.0">
> >     <info organisation="org.demo" module="demo"/>
> >     <dependencies>
> >       <dependency org="org.springframework" name="spring-context"
> > rev="4.0.6.RELEASE" />
> >       <dependency org="org.springframework" name="spring-context"
> > rev="3.2.9.RELEASE" />
> >     </dependencies>
> > </ivy-module>
> >
> > $ java -jar ivy-2.3.0.jar -ivy ivy.xml -retrieve
> > "lib/[orgPath]/[artifact]/[revision]/[artifact]-[revision].[ext]"
> >
> > This works except that version 4.0.6.RELEASE is favored over
> 3.2.9.RELEASE.
> >
> > This is not what I want. I want that Ivy downloads each and every
> > (transitive) dependency (and also javadoc and source jars if available -
> > but that's another story).
> >
> > How can I do this?
> >
> > According to Ivy's documentation (*), I should be able to plugin a
> > conflict-manager named "all" [1]. So I gave this settings file a try:
> >
> > == ivysettings.xml ==
> > <ivysettings>
> >     <conflict-managers>
> >       <all />
> >     </conflict-managers>
> > </ivysettings>
> >
> > This gave me the somewhat unexpected error:
> >
> > *Exception in thread "main" java.text.ParseException: failed to load
> > settings from file:settings.xml: no appropriate method found for adding
> all
> > on class org.apache.ivy.core.settings.IvySettings*
> >
> > To see whether I understood the documentation, I tried to get going with
> > conflict manager "latest-revision". This conflict manager seems to exist.
> > However, I'm getting now:
> >
> > *:: org.springframework#spring-context;4.0.6.RELEASE: no resolver found
> for
> > org.springframework#spring-context: check your configuration*
> >
> > Aha, obviously there is no resolver plugged in. In other words, a given
> > settings file is not merged with the default setting but taken as the
> > ultimate authority.
> >
> > Did I miss something or is there a way to "merge" a settings file? What
> do
> > do now? Pull the ivysettings.xml out of the jar and override it?
> >
> > Why do I need to put a conflict-manager into settings.xml at all? Why not
> > putting it into ivymodule.xml where it would override the default that
> > comes from settings.xml?
> >
> > Honestly, I don't why there is a need for such a settings file. Why not
> > having a singular ivy.xml?
> >
> > [1]
> > http://ant.apache.org/ivy/history/2.3.0/settings/conflict-managers.html
> >
> > (*) Sorry, but this documentation is close to useless.
> >
> >
> >
> > --
> > Wolfgang Häfelinger
> >
>
>
>
> --
> Archie L. Cobbs
>



-- 
Wolfgang Häfelinger

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