Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idiomatic way to create a BOM in a Maven multi-module #326

Open
scordio opened this issue Nov 6, 2022 · 2 comments
Open

Idiomatic way to create a BOM in a Maven multi-module #326

scordio opened this issue Nov 6, 2022 · 2 comments

Comments

@scordio
Copy link

scordio commented Nov 6, 2022

I would like to add a BOM for AssertJ.

My current attempt is at assertj/assertj#2748 where I include in the dependencyManagement section what I'd like to have in the BOM and I configure the flatten-maven-plugin with the bom flatten mode.

However, if I don't specify resolve as element handling for dependencyManagement, ${project.version} does not get expanded.

The additional configuration parameter is not a problem but I am wondering if there is a more idiomatic way to add a BOM for a Maven multi-module.

@kjq
Copy link

kjq commented Apr 25, 2024

I have the same issue. I do not want the dependencies to be resolved and include all the transitive dependencies. It turns a 100 line POM into a 15,000 line pom.

I tried with a dummy variable and using interpolate but that Renovate has problems with that. Using FlattenDependencyMode with direct did not work either.

@hkampbjorn
Copy link

Here is what we do

        <configuration>
          <flattenMode>bom</flattenMode>

          <!-- Beside standard bom flatten mode, expand dependency version and remove the properties -->
          <pomElements>
            <build>remove</build>
            <dependencyManagement>resolve</dependencyManagement>
            <properties>flatten</properties>
          </pomElements>
        </configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants