We have a project and in the pom.xml we did not specify the groupId becuase we inherit it from the parent pom.
If we then run mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion}
, we get an error:
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.2:set (default-cli) on project dbutils: Execution default-cli of goal org.codehaus.mojo:versions-maven-plugin:2.2:set failed. NullPointerException -> [Help 1]
I checked this is a bug from the maven versions plugin and there are workarounds e.g., using 2.1 instead of 2.2.
Do you know, how can I avoid this error using the build-helper plugin?
Thank you, Yashu
versions:set
is exactly the call of versions-maven-plugin goal. – khmarbaise