Skip to content

[MNG-7879] Add a bom packaging#1242

Merged
gnodet merged 1 commit into
apache:masterfrom
gnodet:MNG-7879-bom-packaging
Sep 22, 2023
Merged

[MNG-7879] Add a bom packaging#1242
gnodet merged 1 commit into
apache:masterfrom
gnodet:MNG-7879-bom-packaging

Conversation

@gnodet

@gnodet gnodet commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

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.

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

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

gnodet commented Sep 19, 2023

Copy link
Copy Markdown
Contributor Author

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

gnodet commented Sep 19, 2023

Copy link
Copy Markdown
Contributor Author

@cstamas

cstamas commented Sep 21, 2023

Copy link
Copy Markdown
Member

How does this relate to #1247 ?

@gnodet

gnodet commented Sep 21, 2023

Copy link
Copy Markdown
Contributor Author

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
@gnodet gnodet deleted the MNG-7879-bom-packaging branch October 18, 2023 08:45
@jira-importer

Copy link
Copy Markdown

Resolve #9033

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

Successfully merging this pull request may close these issues.

4 participants