Hi all,

Now that CDI is gone we still have some leaking packages not in a (almost)
pure maven ecosystem:
https://github.com/apache/maven/blob/406c525ec45da466387dbf19f7fd8ed1d9885e66/maven-core/src/main/resources/META-INF/maven/extension.xml#L98

(pure kind of means plexus/maven/sonatype/aether even if not 100% accurate
but conflicts there are very very rare)

We keep javax annotation, inject and slf4j exported.

I fully understand dropping them would break a lot of apps without some
careness but I think, due to our architecture and plugin/ext system, it
would be sane for maven to never export something not considered internal
since we take the risk to conflict or limit plugins with the related
packages (ex slf4 event was not exported at some point or newer version
usages will have issues).

I assume we'll not target it for 3.x but it sounds a good design fix for
4.x.

One option to not break is to rewrite the related classes/annotations with
asm - at build time for mojo if possible and inject in plugin.xml a flag
saying "it is done" - or at run time - with a ClassFileTransformer in the
ClassRealm - for existing instances.

I'm not yet 100% sure which path is the sanest but hope the issue, at
least, is clear.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

Reply via email to