I come to you looking for best practices on maven + version management.
I am trying to deploy a proyect to an artifact repository, but I'd like the version to be referred to the scm-version. I need to do this because I have many developers working against different "revisions" of the deployed library.
The pom configuration is the following:
<modelVersion>4.0.0</modelVersion>
<groupId>xxx.xxx.xxx</groupId>
<artifactId>xxx.xxx-parent</artifactId>
<version>${version}</version>
<packaging>pom</packaging>
<namexxxx Parent</name>
and when I do:
mvn deploy source:jar -Dversion=r203
the project is deployed correctly to the artifact repository..
The problem is, by adding the ${version} I am forcing everyone to use the -Dversion= when running any maven command.
I also thought of defining a property on the profiles.xml file but I am not sure this is the best way to do it.
What would you recommend to do on this situation?
Thanks a lot, Lucas
I'd suggest using the versions plugin for maven
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With