I have a strange problem with the Versions Maven Plugin. I released yesterday a new version of a my Ueber Parent. Now I would like to update several other POMs which use a previous snapshot version of this parent.
Without having a ~/.m2/settings.xml
running mvn versions:update-parent
does not update the used parent to the latest release of it. I don't understand why?
An example POM might look like this:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.buschmais.jqassistant</groupId>
<artifactId>jqa-uber-parent</artifactId>
<version>1.2.0-RC2-SNAPSHOT</version>
</parent>
<repositories>
<repository>
<snapshots><enabled>true</enabled></snapshots>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
</project>
The crazy stuff is if I add Maven central repository explicitly to the POM the latest released version of the parent POM is found by the Versions Plugin.
<repository>
<id>central</id>
<url>https://repo1.maven.apache.org/maven2</url>
</repository>
Does any one know why?