You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Moser, Christian" <cm...@metrohm.com> on 2010/11/11 21:07:12 UTC

Maven overrides up to date artifacts

I've got the following problem with maven 3.0 and artifactory 2.2.3 (2.2.1 won't let maven 3.0 deploy without legacy-mode flag --> metadata problem).
Project A depends on Project B. I created a new class in Project B and installed it into my local repository so I can use the class in project A. After importing the new class I'd like to install Project A into my local repo (without -U) but it fails because the compiler cannot find the new created class in Project B. A quick look in the maven output shows that at the beginning of the build maven downloads an old, already deployed version of Project B into the local repo and overrides in the process the version of project B with the new class installed --> so build fails!
Maven also reports he cannot found maven-metadata.xml in the local repo. The scenario mentioned above it's not easy to reproduce.

Why is it downloading at all? and why is my up to date artifact beeing overriden by an out of date version in the repo?
I guess it's an artifactory problem, please help.

Greez Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: Maven overrides up to date artifacts

Posted by "Moser, Christian" <cm...@metrohm.com>.
Yes, it is a SNAPSHOT dependency. I've solved the issue, the snapshot repository hosted with artifactory was configured as followed:

Advanced/Maven Snapshot Version Behavior: Deployer - 5 Max Unique Snapshots. After changing to non-unique and deploying the projects again, maven didn't override the newer versions. 

It seems like maven 3.0 has problems to resolve unique snapshots.

-----Ursprüngliche Nachricht-----
Von: Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Gesendet: Freitag, 12. November 2010 09:52
An: Maven Users List
Betreff: Re: Maven overrides up to date artifacts

2010/11/11 Moser, Christian <cm...@metrohm.com>:
> I've got the following problem with maven 3.0 and artifactory 2.2.3 (2.2.1 won't let maven 3.0 deploy without legacy-mode flag --> metadata problem).
> A quick look in the maven output shows that at the beginning of the build maven downloads an old, already deployed version of Project B into the local repo and overrides in the process the version of project B with the new class installed --> so build fails!

Curious. Can you post the dependency here? Is it a snapshot dependency?
Did you try using -o parameter?

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven overrides up to date artifacts

Posted by Antonio Petrelli <an...@gmail.com>.
2010/11/11 Moser, Christian <cm...@metrohm.com>:
> I've got the following problem with maven 3.0 and artifactory 2.2.3 (2.2.1 won't let maven 3.0 deploy without legacy-mode flag --> metadata problem).
> A quick look in the maven output shows that at the beginning of the build maven downloads an old, already deployed version of Project B into the local repo and overrides in the process the version of project B with the new class installed --> so build fails!

Curious. Can you post the dependency here? Is it a snapshot dependency?
Did you try using -o parameter?

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org