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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to