Sure, I agree with both of you that there are conflicts in the various
repos, but neither of you gave any suggestions/answers for my
practical question. Brian & others, do you think its better to keep
the extra repos in a profile, always use them if build requires some
dependencies from the extra repos or insist that users manually
resolve the missing dependencies (by running their own proxy and
configuring it correctly)? See the second paragraph below.

Kalle


On Mon, Nov 16, 2009 at 1:39 AM, Jörg Schaible <joerg.schai...@gmx.de> wrote:
> Stephen Connolly wrote at Montag, 16. November 2009 09:41:
>
>> 2009/11/16 Kalle Korhonen <kalle.o.korho...@gmail.com>:
>>> There's been quite a few threads on declaring Maven repos in poms,
>>> most of them referring to Brian's blog post
>>>
> http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/.
>>> I agree with that 100%, but as you mention Brian, it's not black and
>>> white for open source projects. I ran into the same issue again while
>>> working on http://bamboo.ci.codehaus.org/browse/TYNAMO-SEEDENTITY-1.
>>> The module depends on some artifacts located in Jboss repo. Their repo
>>> is not synched to repo1 but artifacts originating from JBoss may or
>>> may not be deployed to repo1 depending on version and project. I'm
>>> naturally running my own nexus instance for my team's needs but
>>> anybody else just checking out the module from svn or a CI system that
>>> I'm not in control of (as in this case, it's Codehaus Bamboo instance)
>>> will have a problem building this module.
>>>
>>> To avoid "burning the entries forever into my released POMs" I figured
>>> I could just the declare the repositories in a profile, for example
>>> named "repositories". Technically they would still be in the pom but
>>> wouldn't be used in normal dependency resolution, only if the user
>>> specifically activated it. Since I typically never depend on external
>>> snapshots, the profile would only be needed roughly once per set-up,
>>> and it would also be easy to document and users to use. Brian, others,
>>> do you think this would be a good idea for best practice? Better than
>>> declaring them by default or not declaring them at all (and thus
>>> either trying to strictly use only modules available in repo1,
>>> lobbying required libs to be deployed to repo1 or just having to
>>> document this for users and lobbying CI administrators to proxy
>>> additional Maven repos)?
>>
>> The issue is that some repositories have different versions of
>> artifacts deployed for the same version number.
>>
>> If you download the artifact from repoA it will never be re-downloaded
>> even if repoA is no longer in your list of repositories and repoB has
>> a different binary.
>>
>> This is especially an issue with java.net, but other (non
>> repo1.maven.org) repositories have the same issue.
>
> Especially the jboss repos have this issue also, because - as I understood -
> they build all artifacts themselves from the source i.e. they also publish
> a lot of stuff not directly originating from them and that is also
> available in central. While they *should* produce the same things, you
> actually can never be sure.
>
> [snip]
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to