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
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Pheotis! Please use /close or the Close 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.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st2mo ago
What exactly do you want to replace with what and why?
Pheotis
PheotisOP2mo ago
I want to omit -${git.commit.id.abbrev} for all branches other than nightly
dan1st
dan1st2mo ago
Is that for usage in the CI?
Pheotis
PheotisOP2mo ago
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
Pheotis
PheotisOP2mo ago
😮 that is a lot easier than my attempted solution
dan1st
dan1st2mo ago
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
Pheotis
PheotisOP2mo ago
This was my attempted solution
No description
dan1st
dan1st2mo ago
btw for similar things, you might want to consider profiles
Pheotis
PheotisOP2mo ago
perfect! Thanks!
JavaBot
JavaBot2mo ago
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.
JavaBot
JavaBot2mo ago
Post Closed
This post has been closed by <@928755449665298432>.
Want results from more Discord servers?
Add your server