>>>>> Steinar Bang <s...@dod.no>:

>> https://github.com/steinarb/bang-bompom/blob/20d12dd29b2d3758f1c237b3c29df98ecc9125f8/pom.xml#L96
>> When you set a configuration parameter via XML, you may not override it 
>> anymore with the property in my experience. 

> Thanks! According to the git history, this seems to be a trick I did
> back in 2021 to set an inherited property to the value of the parent
> pom's version...?

> Why did I do it in this manner I wonder? There has to be a simpler way...?

I found this stackoverflow answer: https://stackoverflow.com/a/66453563

I did the same thing in my project (moved the versions-maven-plugin
config into a profile activated by "mvn release:prepare" of the bompom
project and deleted the rest of the versions-maven-plugin):
 
https://github.com/steinarb/bang-bompom/commit/a1d83c4388e3c5eb8e67df3adb12e4540b29e61f

The resulting config
 1. swizzles the bang-bom.version property to match the current pom
    version when doing "mvn release:prepare"
 2. allows setting properties with "mvn versions:set-property" from my
    script

One remaining worry is if any of the versions-maven-plugin config will
creep into projects using one of my parent poms when doing releases...?
I think not because the profile name is pretty specific and the config
of maven-release-plugin is not inherited by other projects.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to