Skip to content

Bom#134

Open
glelouet wants to merge 5 commits into
phax:masterfrom
glelouet:BOM
Open

Bom#134
glelouet wants to merge 5 commits into
phax:masterfrom
glelouet:BOM

Conversation

@glelouet
Copy link
Copy Markdown
Contributor

@glelouet glelouet commented Mar 1, 2026

Note : this PR depends on #131 .

This PR integrates the incoming notion of POM-BOM in maven 4.
https://maven.apache.org/whatsnewinmaven4.html

  1. A "bom" project (submodule) is created below root.
  2. This bom project, type pom, only specifies dependencies and plugins management that are provided by the (jcodemodel) project. Once maven 4 is released, we can just change its type from POM to BOM.
  3. each other project below root has its parent changed from root-pom to bom, relativePath also changed.
  4. The deps/plugin managements specified in root-pom are removed (moved to the bom)

Usage :

Most user should not have anything to do, they will keep importing jcodemodel . For the ones who need several several of the proposed projects, they should import the BOM, as explained in the readme

@phax phax changed the base branch from master to bom-target May 7, 2026 16:54
@phax phax changed the base branch from bom-target to master May 7, 2026 16:56
@phax
Copy link
Copy Markdown
Owner

phax commented May 7, 2026

In my other projects, the parent POM is directly my BOM. What is the idea of separating those two?

@glelouet
Copy link
Copy Markdown
Contributor Author

glelouet commented May 7, 2026

I forgot to link the doc …

@glelouet
Copy link
Copy Markdown
Contributor Author

glelouet commented May 7, 2026

@phax
Copy link
Copy Markdown
Owner

phax commented May 9, 2026

I think there are two things break the BOM contract:

  1. <pluginManagement> only propagates through <parent>, not through <scope>import</scope>. The block for jcodemodel-maven-plugin therefore does nothing for external consumers of the BOM — it should stay in jcodemodel-parent-pom.
  2. Using the BOM as the <parent> of every internal module conflates the BOM role (published, dependency-only) with the parent-POM role (non-published, build/plugin config). Please keep the modules' parent as jcodemodel-parent-pom and let the BOM be a leaf with <dependencyManagement> only.

Minors:

  • rename the artifactId to jcodemodel-bom (matches jcodemodel-parent-pom, jcodemodel-maven-plugin)
  • add a trailing newline to bom/pom.xml

@glelouet
Copy link
Copy Markdown
Contributor Author

glelouet commented May 9, 2026

hoo that sucks. I want to be able to specify the plugin versions too as bom :'( So people could just use the plugin and TADAAAAA correct plugin version and correct plugin dependencies.

Yes in the maven 4 we won't need to specify the version of the siblings anymore. The parent=bom is here to avoid duplicating spec ( I hate data duplication :P ) so will be useless in maven 4.

Remember this is to prepare maven 4 :)

Also maybe I misunderstood your previous question. If that's the case, this is not a hurry we can wait a bit for specs to be stable (audible sound horse) .

@phax
Copy link
Copy Markdown
Owner

phax commented May 9, 2026

Yes okay - so we leave this one open for now

@phax phax self-assigned this May 9, 2026
@phax phax added enhancement Build System Everything build system related labels May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build System Everything build system related enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants