How to process a maven version:set with exact version

730 Views Asked by At

I'm trying to change the version of the maven application that I'm currently working. For that I executed the below command:

mvn versions:set -DnewVersion=9.0.174.33-SNAPSHOT -DprocessAllModules

I want to change the version to 9.0.174.33-SNAPSHOT. But while running the command, the version has been changed to 9 in the pom.xml and throws an error as well.

Here is the error is throws:

[ERROR] Unknown lifecycle phase ".0.174.33-SNAPSHOT". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin
-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, gene
rate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resource
s, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, d
eploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
1

There are 1 best solutions below

0
On

It is solved now. I did a minor mistake. The command should be like this:

mvn versions:set -DnewVersion="9.0.174.33-SNAPSHOT" -DprocessAllModules