On 7/3/06, Brad O'Hearne <[EMAIL PROTECTED]> wrote:
The detail I've posted prior in this thread shows at least one case where it appears that Maven doesn't do this. The fact that Maven wasn't choosing the proper version, or for that matter, any version (it was including them both), and the groupId's and and artifactId's were identical between my pom.xml and the dependency pom, shows that this doesn't seem to work in all cases. This not working properly is the reason for my original question.
All I can do is sympathize -- Maven is working the way it's supposed to, but it can only be as good as the data we give it. Even though _you_ think you're working with two versions of the "same" dependency, Maven doensn't agree. One of them moved and is now "different". The repository metadata is greatly improved over what it was, but there are still problems, and unfortunately, you found one. In this case, EHCache 1.2 should *not* have been relocated without also relocating the prior versions. In its defense, Maven *did* try to tell you: Downloading: http://repo1.maven.org/maven2/ehcache/ehcache/1.2/ehcache-1.2.pom 278b downloaded [WARNING] While downloading ehcache:ehcache:1.2 This artifact has been relocated to net.sf.ehcache:ehcache:1.2. There's a long thread on Jakarta commons-dev about this very thing, as they get ready to move all of their artifacts from the current commons-xxx groupIds to org.apache.commons.
This was only doable this way because ehcache:ehcache had just happened to be moved to net.sf.echcache:ehcache. Had this not been the case, this wouldn't have worked -- I would have had to try to include echcache:ehcache version 1.2 and exclude version 1.1.
No. It was only *necessary* because one of them happened to have moved. If both of them were in the same groupId, this would have worked perfectly from the beginning when you declared a dependency on EHCache 1.2. The <exclusion> is a workaround. The fix is to file a 'Maven Evangelism' issue and get the older EHCache versions relocated to the same place as v1.2. HTH, -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
