I have 2 maven projects in- parent and child, both having 0.0.1-SNAPSHOT.
The pom of parent:
<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>
<groupId>com.tmn</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>parent</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
The pom of child:
<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>
<groupId>com.tmn</groupId>
<artifactId>child</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>com.tmn</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<name>child</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
I updated the version of the parent pom to some release version, say 1.0.0 and did mvn clean install on my parent. So, my maven local repo contains the released pom. Now, I want to update the parent.version and the version of my child pom. I run
mvn versions:update-parent -DparentVersion=1.0.0 -DgenerateBackupPoms=false -Dmaven.repo.local=/path/to/repo
I want it to blindly update the parent.version to the parentversion I supply in my command. But I get this WARNING and it is not updated.
artifact com.tmn:parent: checking for updates
[WARNING] Not updating version: could not resolve any versions
There is a similar issue logged here but I didn't understand the solution to this: https://github.com/mojohaus/versions-maven-plugin/issues/121