On Mar 19, 2009, at 7:37 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
Hi,
So far we've used the strategy of using a "xwiki" classifier when we
mad changes to artifacts or their poms (we actually forgot to do that
for some but that's another story...). The problem is that classifier
don't work since:
* there's a single pom file for all classifiers
* the pom is retrieved before the artifact
* if there's another remote repo before the xwiki repo and that pom
file exists in this other remote repo it'll be used instead of ours
For the record we had 2 problems with jfreechart and jackrabbit which
caused this issue to appear.
Solution:
I propose to publish modified artifacts (the artifact itself of its
pom) into our own groupId (best practice) and I propose to prefix
them
with "xwiki.".
For example for "org.apache.jackrabbit" that would become
"xwiki.org.apache.jackrabbit".
I've done that for jfreechart and jackrabbit here:
http://maven.xwiki.org/externals/xwiki/
WDYT?
First of all, why do we have these modified dependencies?
We have quite a few of them. It would be too long to explain here.
Just look at the pom.xml, there are comments for each modified
artifacts explaining why we had to do this. What should be done is
that we need to periodically review to see if whatever issue there was
is solved to drop our custom artifacts.
I don't like changing the group Id. I know that
using a classifier
doesn't work, but we can use a keyword in the version
(<version>1.0-xwiki</version>). This should work, and it prevents
duplicate jars. For example, if we package a dependency that is also
used by another transitively, we'd have to manually exclude it.
That was the other option but I consulted withe maven gurus before
proposing the groupId. As I mentioned this is the best practice in the
maven community it seems. When you modify an artifact it becomes yours
and the groupId is the way to signal an artifact is yours.
Thanks
-Vincent