I try to include the git commit hash in the artifact name to distinguish between Snapshot-Versions in an CI scenario. The git hash is successfully included in the target/ folder of my project, but in the last maven step it copies the artifact into my HOME/.m2/repositories folder and changes the name to ARTIFACTID-VERSION-mta.jar.
How can I keep the file name from the target/ folder that includes the commit hash?
I had a look at the maven-install-plugin, but couldn't find a "finalName" property or something like this.
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ projectname ---
[INFO] Installing PROJECTDIR/pom.xml to ~/.m2/repository/GroupIdDir/projectname/1.0.1/projectname-1.0.1.pom
[INFO] Installing PROJECTDIR/target/projectname-1.0.1-d054c42-mta.jar to ~/.m2/repository/GroupIdDir/projectname/1.0.1/projectname-1.0.1-mta.jar
I would like the last line to be
[INFO] Installing PROJECTDIR/target/projectname-1.0.1-d054c42-mta.jar to ~/.m2/repository/GroupIdDir/projectname/1.0.1/projectname-1.0.1-d054c42-mta.jar
Controlling maven final name of jar artifact does not solve the problem because it modifies the output folder.