laeubi commented on issue #13223:
URL: https://github.com/apache/maven/issues/13223#issuecomment-6057986777
I must confess that the
```
<exportedPackages>...</exportedPackages>
<exportedArtifacts>...</exportedArtifacts>
```
always is/was confusing here as they most often seem to match and there is
no clear whats the difference.
I therefore would propose to not reuse that pattern and maybe just treat
this as legacy and maybe allow a more semantic thing like
```
<exports>
<artifact>
...
<packages>
<package>...</package>
<packages>
</artifact>
</exports>
```
The same applies to imports, with an important distinction. While now I can
declare *that* I want to import something but
- Why do I need to know the artifact and not only package name?
- What if two extension both export the same artifact/package what one will
win or can I even control with something like `provider=G:A`
Next thing that is not considered right now at all:
I found it always limiting that the *plugin* needs to declare the export
(and it must be declared as an extension) leading to the quite strange
situation that Tycho has a
[tycho-maven-plugin](https://github.com/eclipse-tycho/tycho/tree/main/tycho-maven-plugin)
that sole purpose is to be added as a "plugin" but never is providing a mojo
or do anything more than being responsible for the exports.
Instead it would be much more sensible if the jar itself could declare such
descriptor (e.g. in case of Tycho
[tycho-spi](https://github.com/eclipse-tycho/tycho/tree/main/tycho-spi)) that
then would be shared. This would allow a plugin to declare a spi artifact that
then can be used to share the classes. At best just having it as a dependency
then would give me appropriate automatic imports somehow (maybe generated or in
runtime).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]