apache / apache/maven

[MNG-8113] Inconsistent way of overriding core components from extensions

Open
#10,507 1 comment 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-8113](https://issues.apache.org/jira/browse/MNG-8113?redirect=false)** and commented

Problem: "let's have a (core) extension that is overriding some component X in Maven Core".

Doing this is very inconsistent, and depends HOW core component is defined in the first place.

IF core component is JSR330, then is simple: just define an own JSR330 component (w/ some higher than zero Priority) and done. This can be loaded from `.mvn/extensions.xml` just fine.

IF core component is Plexus, then is not simple:
* using JSR330 – could not do it
* using Plexus annotation + XML – does not works when JAR is in `.mvn/extensions.xml` !
* using Plexus annotation + XML – works only when using `-Dmaven.ext.class.path` w/ JAR enlisted here.

---

1 votes, 3 watchers

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the JSR330 and Plexus cases through .mvn/extensions.xml and -Dmaven.ext.class.path, then trace Maven Core extension loading. Done means core components can be overridden consistently from an extension regardless of how the component is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.