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

Ozgun OZ edited comment on MNG-7921 at 6/30/24 5:37 PM:
--------------------------------------------------------

A core extension is by definition something that we would like it to impact all 
plugins, or at least more than one. 
So IMHO allowing plugins to define their own extensions is not the way to go. 
We can maybe consider the other way around. Giving extensions the ability to 
target specific plugins.
Via configurations maybe like defined in MNG-5897

Or just specify a new config file for plugins to allow their classloader be 
created by exporting specific apis from the core class-loader. Smth like the 
below

 

!image-2024-06-30-19-37-28-275.png!


was (Author: ozgun):
A core extension is by definition something that we would like it to impact all 
plugins, or at least more than one. 
So IMHO allowing plugins to define their own extensions is not the way to go. 
We can maybe consider the other way around. Giving extensions the ability to 
target specific plugins.
Via configurations maybe like defined in 
[MNG-5897|https://issues.apache.org/jira/browse/MNG-5897]

Or just specify a new config file for plugins to allow their classloader be 
created by exporting specific apis from the core class-loader. Smth like the 
below 



> Allow plugins to control classpath extensions
> ---------------------------------------------
>
>                 Key: MNG-7921
>                 URL: https://issues.apache.org/jira/browse/MNG-7921
>             Project: Maven
>          Issue Type: Improvement
>          Components: Class Loading, Core
>    Affects Versions: 3.9.5
>            Reporter: Dave Syer
>            Priority: Major
>         Attachments: image-2024-06-30-19-37-28-275.png, 
> maven-classWorlds.drawio.png
>
>
> It's great that a plugin (or extension jar) can have `<exportedPackages>` 
> (specifically I want to use Google Guice in a plugin and this seems to be the 
> only way), but it can only be applied globally AFAIK, so all plugins get the 
> same exported packages and there might consequently be conflicts. It would be 
> nice if a plugin that declared it was an extension could elect to specify 
> exported packages independent of other plugins.



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

Reply via email to