You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2024/07/10 13:23:00 UTC

[jira] [Commented] (MNG-8113) Inconsistent way of overriding core components from extensions

    [ https://issues.apache.org/jira/browse/MNG-8113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17864658#comment-17864658 ] 

Tamas Cservenak commented on MNG-8113:
--------------------------------------

This issue is not quite right, as proved by this polyglot PR:

[https://github.com/takari/polyglot-maven/pull/319]

Polyglot tends to replace two beans in Maven Core: DefaultProjectBuilder (plexus) and DefaultModelProcessor (JSR330). When loaded from .mvn/extensions.xml, it works flawlessly.

To make it work when copied to lib/ext, the PR is needed.

But still, as can be seen, a plexus and a JSR330 component is replaced. Hence, the issue is either incomplete or just plain wrong.

> Inconsistent way of overriding core components from extensions
> --------------------------------------------------------------
>
>                 Key: MNG-8113
>                 URL: https://issues.apache.org/jira/browse/MNG-8113
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tamas Cservenak
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)