dev@glassfish.java.net

[Fwd: Some notes about maven repository]

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 20 Feb 2007 14:18:16 -0800

An FYI... These notes were sent to the persistence alias, and I thought they can
be useful to a wider audience.

regards,
-marina

-------- Original Message --------
From: Wayne Fay <waynefay_at_gmail.com>
To: persistence_at_glassfish.dev.java.net

A few comments...

1. Once you've published files into your Maven repo, you should
*never* change them. This is a big deal as Maven never checks for
updates to artifacts except for Snapshots. If you start changing your
published artifacts, you can run into situations where half your users
have version 35 (with an error) and the other half have version 35
(with the error fixed). Maven will not know about the updated file, so
all your users will have to dig into their repositories and delete the
files manually, etc which is a nightmare.

2. Given #1 above, if you find a problem in a released file, rather
than replacing the bad file with an updated correct file, you should
just bump the version (ie 1.2.1 becomes 1.2.1.1) and push out a new
release. This applies to poms (with missing or incorrect depdencies
etc) and jars (compiled code, sources, and javadocs).

3. Also given #1 above, you should not "manually relocate" your old
files. Instead, leave them where they are, and just start publishing
the new files under the new groupId. You will want to send some
notifications out so people know about the location of your new
artifacts, of course.

Is there any interest in perhaps adopting the Maven2 layout for your
Java.net repo, in combination with some Apache rewriting to support
your existing Maven1 users, similar to what Maven is doing with their
own repositories? I don't have the complete technical details right
now but this configuration allows them to deploy artifacts to only one
repo (with support for the advanced M2 repo layout/configuration) but
continue to make artifacts available to both groups of users. Just
thought I'd throw that out since we're talking about M1 and M2...
Perhaps its a better question for Kohsuke or someone else?

Thanks.
Wayne