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.0-test-SNAPSHOT
mvn deploy -Dproject.version=1.0-test-SNAPSHOT
My pom.xml is:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>just.another.company.name</groupId>
<artifactId>my-pom</artifactId>
<version>1.3-SNAPSHOT</version>
<name>My Module</name>
<packaging>jar</packaging>
<description>POM Project for My Module</description>
</project>
<version>${env.SOME_VARIABLE}</version>
, then$ SOME_VARIABLE="1.0.0-SNAPSHOT" mvn ...
Check out my answer below.