conflict-managers

2018-07-10 Thread sumeet tyagi
Please try below in ivy.xml not in ivysettings.xml as it works for me.


   


Sent from Mail for Windows 10



Re: conflict-managers

2014-07-11 Thread wolfgang häfelinger
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 arc...@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 
 whaefelin...@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


conflict-managers

2014-07-08 Thread wolfgang häfelinger
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


Re: conflict-managers

2014-07-08 Thread Archie Cobbs
Try using dependency force=true   .. this works for me.

-Archie


On Tue, Jul 8, 2014 at 1:26 PM, wolfgang häfelinger whaefelin...@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


Re: Overriding module-defined conflict managers

2014-06-24 Thread Zac Jacobson
latest-revision is already the default - just this one ivy file is
overriding that.

Have you tried, from your project's ivy file, excluding the modules in that
one latest-compatible ivy file, and including them as dependencies in your
own project file? Maybe a bit cumbersome, but you should be able to fetch
them under your conflict manager.




On Mon, Jun 23, 2014 at 10:42 AM, Matt Dee m...@palantir.com wrote:

 Hello,

 I’m not sure if this is the right mailing list, but I have a requirement
 and I am trying to determine if it is possible to without changing the Ivy
 source code.

 I have a project and I want it to resolve dependencies using the
 “latest-revision” strategy.  However, one of its dependencies, in its
 ivy.xml, specifies

 conflicts
 manager name=latest-compatible/
 /conflicts

 And so I am getting StrictConflictExceptions.  The behavior that I want is
 for it to resolve conflicts by always just taking the latest revision.
  Setting “latest-revision” to the default conflict manager in the
 ivysettings.xml does not work.  Is there any way to override the conflict
 managers defined in the ivy.xml?

 Thanks!



Overriding module-defined conflict managers

2014-06-23 Thread Matt Dee
Hello,

I’m not sure if this is the right mailing list, but I have a requirement and I 
am trying to determine if it is possible to without changing the Ivy source 
code.

I have a project and I want it to resolve dependencies using the 
“latest-revision” strategy.  However, one of its dependencies, in its ivy.xml, 
specifies

conflicts
manager name=latest-compatible/
/conflicts

And so I am getting StrictConflictExceptions.  The behavior that I want is for 
it to resolve conflicts by always just taking the latest revision.  Setting 
“latest-revision” to the default conflict manager in the ivysettings.xml does 
not work.  Is there any way to override the conflict managers defined in the 
ivy.xml?

Thanks!


Re: Conflict managers - using revConstraints?

2009-03-26 Thread Stephen Woods
Maarten,
I got really excited when I saw your message last night figuring that that
would make all the difference in the world... but alas... when I attempted
to do what you suggested, I received a java.lang.StackOverflowError.

I'm going to hook it up to a debugger and step through it to see what's
going on... I do think that's the right idea though. Thanks for pointing me
in the right direction!

Steve

On Wed, Mar 25, 2009 at 7:23 PM, Maarten Coene maarten_co...@yahoo.comwrote:


 Steve,

 I don't know if it will solve your problem, but could you set your
 resolveMode to dynamic? This will tell Ivy to use the revConstraint
 attribute rather than the revision attribute.
 ivy:resolve resolveMode=dynamic ... /

 Maarten




 - Original Message 
 From: Stephen Woods swoods...@gmail.com
 To: ivy-user ivy-user@ant.apache.org
 Sent: Wednesday, March 25, 2009 7:12:12 PM
 Subject: Conflict managers - using revConstraints?

 I have some questions about conflict managers...
 Here's my situation

   - Module A has a dependency to Spring revision [2.0.2, )... essentially
   indicating that it can use version 2.0.2 or later of Spring.
   - Module A is published to a shared repository, and the revision is
   set to 2.5.6 (because that is the latest in the repository at that
 time)
   with a revConstraint of [2.0.2,).
   - Module B is dependent on Module A
   - Module B has a dependency to Spring revision 2.0.2... essentially
   indicating that is can only be used with version 2.0.2.
   - I set a latestCompatible conflict manager on Spring

 Now, what I would hope that would happen is that Spring 2.0.2 would be
 ultimately selected since its the latest version that is compatible between
 both Module A and B. But that's not what happens... Instead, it appears
 that
 since the published Module A has a revision of 2.5.6, it gets blacklisted
 out right, and the build fails because Ivy says there are no compatible
 versions between Module A and B.

 So my questions are... is there another conflict manager that I should
 consider using (i.e. something that takes into consideration the
 revConstraint)? If not, is the Ivy conflict manager framework sufficiently
 flexible enough to allow me to write my own conflict manager to handle this
 situation (I stepped through the latestCompatible conflict manager with a
 debugger and it looked pretty hairy)? Is there any documentation out there
 that explains how conflict managers work (other than the code and the
 official ivy docs)?

 Though this may only be impacting me at the moment, I think this is a
 showstopper for anyone attempting to use Ivy in an environment with
 any transitive version conflicts.

 Any insight would be greatly appreciated. Thanks!

 Steve







Conflict managers - using revConstraints?

2009-03-25 Thread Stephen Woods
I have some questions about conflict managers...
 Here's my situation

   - Module A has a dependency to Spring revision [2.0.2, )... essentially
   indicating that it can use version 2.0.2 or later of Spring.
   - Module A is published to a shared repository, and the revision is
   set to 2.5.6 (because that is the latest in the repository at that time)
   with a revConstraint of [2.0.2,).
   - Module B is dependent on Module A
   - Module B has a dependency to Spring revision 2.0.2... essentially
   indicating that is can only be used with version 2.0.2.
   - I set a latestCompatible conflict manager on Spring

Now, what I would hope that would happen is that Spring 2.0.2 would be
ultimately selected since its the latest version that is compatible between
both Module A and B. But that's not what happens... Instead, it appears that
since the published Module A has a revision of 2.5.6, it gets blacklisted
out right, and the build fails because Ivy says there are no compatible
versions between Module A and B.

So my questions are... is there another conflict manager that I should
consider using (i.e. something that takes into consideration the
revConstraint)? If not, is the Ivy conflict manager framework sufficiently
flexible enough to allow me to write my own conflict manager to handle this
situation (I stepped through the latestCompatible conflict manager with a
debugger and it looked pretty hairy)? Is there any documentation out there
that explains how conflict managers work (other than the code and the
official ivy docs)?

Though this may only be impacting me at the moment, I think this is a
showstopper for anyone attempting to use Ivy in an environment with
any transitive version conflicts.

Any insight would be greatly appreciated. Thanks!

Steve