I wonder if it is possible to override project.version/version variable in maven via command line?
The following doesn\'t work:
mvn deploy -Dversion=1.
Yes, you can override the project version by passing the required variable from the command line.
Make sure you are using the variable in your pom.xml
Eg:
mvn deploy -Dversion=1.0-test-SNAPSHOT
in pom.xml
${version}
This should get picked during runtime. If this approach does not works, can you please show how you are using them in your pom.xml
?