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

[MNG-7879] Add a bom packaging #1242

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Sep 14, 2023

JIRA issue: https://issues.apache.org/jira/browse/MNG-7879
Doc PR: apache/maven-site#451

The purpose of the BOM packaging is to more cleanly identify POM that will be consumed as BOM from POM that will be used as parents. The BOMs can be turned into a consumer POM, whereas parents can not lose any information.

The purpose of the BOM packaging is to more cleanly identity POM that will be consumed as BOM from POM that will be used as parents.  The BOMs can be turned into a consumer POM, whereas parents can not loose any information.
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a correspnding update to https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms

I'm not sure how to manage that between 3.x/4.x and the two repos

@gnodet gnodet added this to the 4.0.0-alpha-8 milestone Sep 14, 2023
@gnodet
Copy link
Contributor Author

gnodet commented Sep 19, 2023

This requires a correspnding update to https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms

I'm not sure how to manage that between 3.x/4.x and the two repos

This is only a build time feature. The bom packaging is translated into a pom packaging at during the build/consumer transformation phase in order to keep full compatibility. This feature only targets Maven 4.x but will installed/deployed BOMs created with Maven 4 bom packaging will be consumed by Maven 3 with no problems.
The main goal of this feature has been explained in more details at #1160. The ability to differentiate between BOM that will be consumed and POM that will be used as parents is needed in order to translate the consumed poms to a compatible modelVersion 4.0.0.

We could definitely think about enhancing the consumer side so that this bom packaging would be installed / uploaded without the packaging translation, allowing the removal of the <scope>import</scope> weird thing. But that's out of scope for this specific PR.

@gnodet
Copy link
Contributor Author

gnodet commented Sep 19, 2023

@cstamas
Copy link
Member

cstamas commented Sep 21, 2023

How does this relate to #1247 ?

@gnodet
Copy link
Contributor Author

gnodet commented Sep 21, 2023

How does this relate to #1247 ?

#1247 is based on this PR. There's no easy way to stack PRs on top of each other in Github. A few months ago, I had a single PR for all those changes, but I ended up splitting them in several smaller PRs. Some of them still depend on each other though.

@gnodet gnodet merged commit 6bf55cf into apache:master Sep 22, 2023
18 checks passed
@gnodet gnodet deleted the MNG-7879-bom-packaging branch October 18, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants