You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add git commit hash as a suffix to my jar file using git-commit-id-maven-plugin and then deploy it to artifactory using artifactory-maven-plugin.
I'm able to produce a local jar file with a git commit hash in the target folder. But when I run mvn deploy it gets published to artifactory with the default version (no git commit hash).
This specific behaviour is basically not intended / not supported by maven-install-plugin and/or maven-deploy-plugin (https://issues.apache.org/jira/browse/MINSTALL-1 / https://issues.apache.org/jira/browse/MDEPLOY-93). The naming format in the remote repo seems to be always $artifactId-$version-$classifier by default and thus any generated property will not end up inside the artifact being installed/deployed.
However I need to stress that this might not be something fully supported or intended by the maven eco-system. So use this at your own risk. I will also not provide further support on this matter.
Description
I would like to add git commit hash as a suffix to my jar file using
git-commit-id-maven-plugin
and then deploy it to artifactory usingartifactory-maven-plugin
.I'm able to produce a local jar file with a git commit hash in the
target
folder. But when I runmvn deploy
it gets published to artifactory with the default version (no git commit hash).I tried to follow solution mentioned in the FAQ, but don't know if this workaround can be used for artifactory maven plugin.
Expected behavior
I would like to be able to publish to artifactory jar file with version and git commit hash.
Additional context
3.8.2
5.0.0
3.2.3
mvn clean deploy
The text was updated successfully, but these errors were encountered: