I packaging my java project with maven, using the M2 Plug in Eclipse
I need to provide a value for the following pom property (module_version), for local packaging this will have a value like “local-SNAPSHOT”
<groupId>com.group</groupId>
<artifactId>server</artifactId>
<packaging>jar</packaging>
<version>${module_version}</version>
Run config env variables don't seem to work...
I am assuming that you need to specify the property module_version
via the command line. In that case you can do so by typing:
$> mvn -Dmodule_version=local-SNAPSHOT package
Another way is to take it from the environment assuming you have exported the enviromnemt varialble by typing
$>export module_version=local-SNAPSHOT
An in your pom you can use:
<groupId>com.group</groupId>
<artifactId>server</artifactId>
<packaging>jar</packaging>
<version>${env.module_version}</version>