Regex on `finalName`
Currently my pom's finalName is
ProjectName-${project.version}-${git.branch.caps}-${git.commit.id.abbrev}
I want to run a regex replacement on the resolved version of that string before the project builds. Is this possible?13 Replies
⌛
This post has been reserved for your question.
Hey @Pheotis! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
What exactly do you want to replace with what and why?
I want to omit
-${git.commit.id.abbrev}
for all branches other than nightlyIs that for usage in the CI?
also whenever anyone builds it manually
I figure that the maven git commit id plugin already knows the branch, so it should be possible to control the name of the jar to avoid confusion
https://www.mojohaus.org/build-helper-maven-plugin/regex-property-mojo.html
you can set it in a property
😮 that is a lot easier than my attempted solution
If you have a Maven problem, there's probably a plugin solving it
also you could just add
-Dproperty=value
if you are ok with cli options instead
or -PnightlyBuild
This was my attempted solution
btw for similar things, you might want to consider profiles
perfect! Thanks!
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@928755449665298432>.