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 Anthony D <an...@gmail.com> on 2010/10/08 19:46:15 UTC

IvyDE fails to resolve transitive dependencies in workspace

Hi,

Someone on our team ran into a little snag with resolving dependencies in
workspace. Let me give you the scenario:

- Eclipse is globally set to resolve dependencies in workspace
- Project A depends on Project B depends on Project C
- All projects are Ivy enabled and stored in an Ivy repository

The developer was working on Project A in his Eclipse workspace. He also
needed to make changes to Project C, so he imported that project into his
workspace. 

To our surprise Project A's ivy.xml container still referred to Project C
from the repository, even after an Ivy | Resolve.

I thought the point of setting "resolve dependencies in workspace" is to
transcend versioning and simply link a project with the same org and name?
It doesn't seem to flow through transitive dependencies if one of the
"middle" projects is not in the workspace.

Is this by design?

The work-arounds are:
1) Import each project in between into the workspace
2) Or add Project C into Project A's ivy.xml as a dependency

-- 
View this message in context: http://old.nabble.com/IvyDE-fails-to-resolve-transitive-dependencies-in-workspace-tp29917031p29917031.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: IvyDE fails to resolve transitive dependencies in workspace

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 8 oct. 2010 à 19:46, Anthony D a écrit :

> 
> Hi,
> 
> Someone on our team ran into a little snag with resolving dependencies in
> workspace. Let me give you the scenario:
> 
> - Eclipse is globally set to resolve dependencies in workspace
> - Project A depends on Project B depends on Project C
> - All projects are Ivy enabled and stored in an Ivy repository
> 
> The developer was working on Project A in his Eclipse workspace. He also
> needed to make changes to Project C, so he imported that project into his
> workspace. 
> 
> To our surprise Project A's ivy.xml container still referred to Project C
> from the repository, even after an Ivy | Resolve.
> 
> I thought the point of setting "resolve dependencies in workspace" is to
> transcend versioning and simply link a project with the same org and name?
> It doesn't seem to flow through transitive dependencies if one of the
> "middle" projects is not in the workspace.
> 
> Is this by design?
> 
> The work-arounds are:
> 1) Import each project in between into the workspace
> 2) Or add Project C into Project A's ivy.xml as a dependency

I had the same issue. I thought it was a bug in IvyDE [1] . But the fix I did was messing up the setup of other use case [2].
So actually what you just need to do is to make Ivy itself resolve dynamically the revision: look into the defaultResolveMode of "settings" in the ivysettings [3].
Basically you'll just need to add this in your ivysettings.xml:
<settings defaultResolveMode="dynamic" />

Nicolas

[1] https://issues.apache.org/jira/browse/IVYDE-212
[2] https://issues.apache.org/jira/browse/IVYDE-236
[3] http://ant.apache.org/ivy/history/latest-milestone/settings/settings.html