cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfred Nathaniel <>
Subject Re: XSP block dependencies
Date Thu, 07 Feb 2008 16:11:02 GMT
On Mon, 2007-11-26 at 08:45 +0100, Reinhard Poetz wrote:
> The problem is that the groupId of the Avalon framework changed and that's the 
> root of all evil in this case. We ever never need a dependency on Avalon 4.1.3 
> but how to express this in the managedDependencies section?
> The only chance for us is configuring "exclusions" but first you have to figure 
> out that you have to do it at all (here the dependency module comes into play).
> I have also experienced very strange behaviour of the dependency resultion 
> mechanism e.g. I exclude avalon-framework from being pulled in by 
> commons-logging but then, when I use commons-beanutils, which pulls in 
> commons-logging, the avalon-framework dependency is used again.
> TBH, I have no idea why the dependency resolution is still buggy after such a 
> long time after the first final Maven 2 release :-/

I now added exclusion rules to all our explicit dependencies which pick
up the old avalon-framework through transitive dependencies.

Although that brings us out of jar hell for the moment, it is only a
stop-gap solution.  Any new explicit dependencies could bring back the

For once, it is not a fault of m2.  It is doing the right thing.  The
problem is in the avalon-framework poms changing groupId and artefactId
between versions.  Maven should, however, provide a mechanism to deal
with this globally in a parent pom.

Here is the pedestrian approach I used to find the places where the
exclusions needed to be inserted:

1.) rm -r $M2_REPO/avalon-framework
2.) fgrep avalon-framework-4 `find trunk -name .classpath`
3.) cd to first project directory containing a matching .classpath
4.) mvn -X eclipse:clean eclipse:eclipse
5.) Identify the explicit dependency with triggers the download of
6.) Add exclusion rule to that explicit dependency, e.g.:

+      <exclusions>
+        <exclusion>
+          <groupId>avalon-framework</groupId>
+          <artifactId>avalon-framework</artifactId>
+        </exclusion>
+      </exclusions>

7.) mvn eclipse:clean eclipse:eclipse
8.) Rinse and repeat.

Cheers, Alfred.

View raw message