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

Romain Manni-Bucau commented on MNG-7620:
-----------------------------------------

Today exports are quite wrong from a design perspective and we leak way too 
much so v4 will clean up things and using extensions you are able to contribute 
artifacts in the same realm which will make the runtime more consistent and 
less error prone.

Using another classrealm intermediate can be not bad but then you will not be 
in core which is likely desired sometimes so let's keep it simple and enrich 
ext classrealm only and expose or not the libs to mojos.

> Rework how "exportedArtifacts" works
> ------------------------------------
>
>                 Key: MNG-7620
>                 URL: https://issues.apache.org/jira/browse/MNG-7620
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Christoph Läubrich
>            Priority: Major
>
> Recently there was a discussion about "exportedArtifacts" and how the work 
> here are the relevant code path:
> https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java#L302-L328
> https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java#L83-L87
> First the documentation is a bit misleading, as it says
> {code:java}
> Patterns of artifacts provided by maven core and exported via maven api realm
> {code}
> from some experiments, it seems that any core or project extension can also 
> define "exported" artifacts.
> Second is, that this simply adds the URL of an exported artifact and thus 
> always the same *jar* is used to load the class, but still different 
> classrealms can load the class.
> What came into my mind is that it actually should have an own realm where 
> such exported artifacts are loaded and this realm is then imported instead of 
> the URL.



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

Reply via email to