When i am trying to update internal version using mvn versions:set -DnewVersion i am getting below error.
In my automation CI/CD script i am trying to upgrade maven internal version. I am new to this, How can i fix this issue ?
Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.3:set (default-cli) on project top: Project version is inherited from parent. -> [Help 1]
<?xml version="1.0" encoding="UTF-8"?>
<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</groupId>
<artifactId>parent</artifactId>
<version>2023.0.0-SNAPSHOT</version>
<relativePath>****/pom.xml</relativePath>
</parent>
<artifactId>top</artifactId>
<packaging>pom</packaging>
<name> Suite</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<timestamp>${maven.build.timestamp}</timestamp>
</properties>
<modules>
<module>ab_initio</module>
<module>ab_initio/module</module>
<module>autoactions</module>
<module>cluster-access</module>
<module>common</module>
<module>config</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>parse-version</id>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/other</directory>
<includes>
<include>build.******.env.sh</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This is my parent pom file similarly i have multiple child pom's.I tried multiple ways to update but still seeing the same error.