[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho and dependencyManagement

>>> Ummm... I am pretty sure Maven will handle such indirectly
>>> configured repositories correctly.
>> 
>> How ? afaik, it will use *all* repositories defined in my and any
>> transitive dependent projects to try and resolve dependencies which
>> causes nondeterministic resolution.
>> 
>> Thats at least what
>> http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/
>> talks about and what i've seen everytime I've used projects that had
>> repositories listed in their pom's.
>> 
> 
> Maven is expected to scope <repository> elements defined in pom.xml to
> resolve dependencies of that pom.xml only. Project-local repositories
> should not leak.

yes, but doesn't that mean it will go look for it's dependency first in this project-local repo
rather than what I have defined in my aggregator project ?

Meaning the resolution of dependencies will leak, i.e. I depend on A and B and A also depend on B.
When resolving A it goes to A which resolves B which uses its A.repositories meaning
when it resolves B in my project context it will say "hey - I already got that...moving on".

Even though it is not present in the repositories I have setup in my project.

That's at least what I saw/noticed last time I fought this problem.
 
>>> Unless you use mirrorOf=* (or external:*) in settings.xml, which is
>>> exactly the reason I avoid mirrorOf.
>> 
>> Afaik this is the only way to actually work around this problem of
>> foreign repositories get into your build ? do you know of something
>> better ? :)
>> 
> 
> yes, https://github.com/etesla/nexus-mirror-selector ;-)

That seem to require a sever side mechanism that doesn't exist yet ? :)

/max