You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2023/01/05 13:24:43 UTC

[GitHub] [maven-mvnd] oehme commented on pull request #764: Fix core export provider

oehme commented on PR #764:
URL: https://github.com/apache/maven-mvnd/pull/764#issuecomment-1372212690

   The underlying reason why the default logic doesn't work is because the [discovery method](https://github.com/apache/maven/blob/fc2d94f0777998000f7b886d45efb88c28fc09cd/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java#L83) calls [ClassRealm.loadResourcesFromImport](https://github.com/codehaus-plexus/plexus-classworlds/blob/master/src/main/java/org/codehaus/plexus/classworlds/realm/ClassRealm.java#L526), which does not handle `META-INF` entries from imported realms. It looks up the name `META-INF/maven/extension.xml` and matches that against the import realms. The[ matching logic](https://github.com/codehaus-plexus/plexus-classworlds/blob/b17db1eae685abd72e2f2f0aad5a40c3bc09fd15/src/main/java/org/codehaus/plexus/classworlds/realm/Entry.java#L71) only accounts for classes/resources in packages, but doesn't account for META-INF. So it never never finds the extension.xml entries.
   
   maven-embedder has the [same problem](https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L594) now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org