apache / apache/maven

[MNG-8080] Make maven structure respect module building

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

Description

**[Anders](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER304348)** opened **[MNG-8080](https://issues.apache.org/jira/browse/MNG-8080?redirect=false)** and commented

When trying to build a (Java) module based application or service that include a standard maven component, it very quickly becomes apparent that this is not possible.

This is because the package structure in the components violates pretty much every single rule there is in regards to (Java) modules. The worst(?) offender is maven-embed which incidentally also contains the components that are necessary to launch maven from code. This one even contains a package declaration from slf4j.

Now, when there is a new major maven version on the horizon which generally means breaking changes, is the correct time to clean up this structure. It means breaking changes since the package names change in the various maven components but on the other side, it is a very easy task for anyone to just update package names.

Target for this ticket should be that each maven component is (at least) declared with an automatic module name in MANIFEST.MF.

---

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

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the package structure in maven-embed and the other Maven components, with attention to the embedded slf4j declaration and Java module constraints. Then inspect how each component produces MANIFEST.MF; done means every Maven component declares at least an automatic module name.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.