maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NRO <nourredine.roui...@gmail.com>
Subject Parent SNAPSHOT not resolved Maven 2.2.1 - 3.0.4 - (Nexus repo)
Date Thu, 03 Oct 2013 08:33:13 GMT
A maven project which have a parent SNAPSHOT cannot be resolved when :

a) the Parent SNAPSHOT pom is not present in the local maven repository 
b) the Parent SNAPSHOT pom is deployed in a Nexus repository by another
developer.
c) settings.xml has a mirror redirecting all (*) to Nexus
d) there is no <repository> entry in the settings.xml file as Nexus is used
for all resolutions.

Easy to reproduce on Maven 2.2.1, 3.0.4 and probably earlier releases.

- If the SNAPSHOT parent is instead used as a dependency of the project then
maven can resolve the dependency and retrieve it from Nexus.

Work around:

If you add a dumb repo entry in the settings.xml file, then it works.

Exemple of such entry is a fake repository and it does not even have to be a
snapshot repo...

settings.xml

[...]
<repositories>
        <repository>
                <id>foo</id>
                <url>http://foo</url>
        </repository>
</repositories> 
[...]

simplest work around.

But to MHO, there is a bug in the Maven code when doing parent snapshot
resolution. If the parent snapshot is not present in the local repo AND
there is no <repository> entry in the settings.xml file, it simply fails. It
does not try the mirror. 




--
View this message in context: http://maven.40175.n5.nabble.com/Parent-SNAPSHOT-not-resolved-Maven-2-2-1-3-0-4-Nexus-repo-tp5772374.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Mime
View raw message