apache / apache/maven

[MNG-8009] BOM peculiarities with build ordering

Open
#10,857 4 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)** opened **[MNG-8009](https://issues.apache.org/jira/browse/MNG-8009?redirect=false)** and commented

Maven 3.9.6 and 4.0.0-alpha-11-SNAP (current master), Java 21.

After this commit: https://github.com/apache/maven/commit/f1c53cbfdfc99cfc6e1521a450adeeb817b89345

Executing from top level command `mvn spotless:apply` does NOT work: plugin is not found!

If you checkout commit before that one, it works.

Diffing the debug output from two executions, the "good" one (before given commit) has this line:

> Resolved plugin prefix spotless to com.diffplug.spotless:spotless-maven-plugin from POM org.apache.maven:maven-bom:pom:4.0.0-alpha-11-SNAPSHOT

Meaning, plugin is resolved from BOM??? And as given commit _changes_ the BOM parent from maven-parent (that has spotless defined) to ASF parent (that does not have it), makes plugin not resolvable?

Despite root POM of Maven parent maven-parent defines it, and even top level POM _redefines it_?

---

**Affects:** 3.9.6, 4.0.0-alpha-10

**Issue Links:**
- [MNG-8003](https://issues.apache.org/jira/browse/MNG-8003) Maven BOM should have a cleaner parent
(_**"is caused by"**_)
- [MNG-8191](https://issues.apache.org/jira/browse/MNG-8191) [reactor build order] modules used in dependencyManagement-section with scope import should be ordered first

- [MNG-8012](https://issues.apache.org/jira/browse/MNG-8012) Warn on BOM import within same reactor

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.