The 'id' concept in Maven is fundamentally broken because it's not a unique ID. It should be something specified in the repository itself and validated against.

That said, the URL isn't a perfect replacement - for one it's longer, secondly it may not be unique (such as mirrors, eg. ibiblio & repo = central), and it doesn't allow you to ever move the repository URL (Which is the blocker).

We need to come up with the best solutions for what we have in the 2.0.x series and worry about more concise repository specification in future versions.

Nicolas', I liked change as it allows you to be more concise in settings while still getting all the benefits, though it does assume a 1-for-1 proxying of remote repositories in your repository manager, which is a good practice to follow anyway IMO. If you hit an id that you haven't accounted for, you'll likely hit a 404 in the repository manager, which is better than just sending them all to a default route and hoping they go to central or any other proxies configured. You can still special case that repository in your settings as you would now, so nothing is lost. Like Brian's proposal, it gives a bit more control today over a feature we know needs re-thought in the future.

Are you saying you are re-considering the feature, or do you still think it is worth having?

- Brett

On 16/03/2008, at 11:36 PM, nicolas de loof wrote:

2008/3/16, Joakim Erdfelt [EMAIL PROTECTED]:


The approach nicolas took in MNG-3407 is strange.  I don't understand
the whole {0} idea.  Wouldn't it make more sense to base mirrorOf on
host or url instead?
That way the mirror section can be wrangled in a more sane way?


The idea is to force users to use a centralized mirror for repository access
(like <mirrorOf>* does):  in a corporate env, many user don't like
uncontroled access to internet, without local controls and backups.

Using a "by ID" mirror for repositories, you can configure your favorite proxy (Archiva ?) to mirror all required repositories with a dedicated URI,
and with the appropriate proxying policy.

An URL based mirroring would be far better if the settings.xml <mirrorOf> element is configured with an URL and not with a repository ID: many maven projects use inconsistent IDs for public repos ("apache", "apache.snapshot",
"apache.snapshots"...) and force to set multiple <mirror> entries in
settings.xml.

Nico.

--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to