Re: version:set-property doesn't seem to pick up -Dproperty and -DnewVersion user properties

Tamás Cservenák <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.user
Message-ID <CAPLpRQLWHGW2mUJZmJ=g-jzLKOiGo6AcZM10RinOeAfzQ08urg@mail.gmail.com>
Howdy,

for start https://issues.apache.org/jira/browse/MNG-8012
Basically BOM _should not_ be used within a reactor (in other words,
in a reactor where BOM is being built, it must/should not be
referenced).
Maven "managed dependencies" should be handled the "usual way" instead.

The idea for BOM is as follows: you manage your dependencies “as
usual”, and then generate BOM (or even multiple BOMs) as you like them
(skinny- reactor only or fat - full bill of materials of stack) for
downstream consumers.

Check out plugin we use in mvn4 build:
https://maveniverse.eu/docs/bom_builder_maven_plugin/

Or an interesting (not done yet, is still being "figured out") experiment:
https://lists.apache.org/thread/9cr4mt40qypf54xrrswz6xsr8mx248mj

HTH
T

On Sun, Aug 31, 2025 at 5:32 PM Steinar Bang <[email protected]> wrote:
>
> >>>>> Steinar Bang <[email protected]>:
>
> >>>>> Mirko Friedenhagen <[email protected]>:
> >> 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...?
>
> Digging into what I did back in 2021:
>  - I wanted to have a BOM defining lots of version numbers
>  - I wanted projects using my parent POM(s) to be able to use that BOM
>    in their dependencyManagement
>  - Using the BOM needed a version for the BOM
>  - The version would always be the same as for the parent POM
>  - But it is impossible to find the version for your top pom's parent in
>    a maven project
>  - I can't (or won't) put the BOM in <dependencyManagement> of the
>    parent pom project, because that would unintentionally "poison" any
>    BOM projects inheriting from the parent pom would like to create (all
>    of the parent BOM's dependencies would be made part of that BOM as
>    well and confusion would follow)
>
> So what I did was to have a property bang-bom.version that "shadows" the
> parent pom project version.
>
> I did the shadowing by:
>  1. Defining the property in the paremt pom project's top pom
>      https://github.com/steinarb/bang-bompom/blob/20d12dd29b2d3758f1c237b3c29df98ecc9125f8/pom.xml#L33
>  2. Setting the property's value to the current pom project value when
>     doing a release
>      https://github.com/steinarb/bang-bompom/blob/20d12dd29b2d3758f1c237b3c29df98ecc9125f8/pom.xml#L82
>
> And now that 2021 hack has come back to bite me...
>
> Anyone with a better idea of how to get the BOM version to a child
> project?
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.