Closed bannmann closed 3 years ago
I kind of need this for annotation processors.
@kohsuke and others might be thinking why would some one need META-INF/service
generation in a modular java world.
Well the issue is that Maven does not support [--processor-module-path
] and thus custom annotation processors still need to register a META-INF/service/javax.annotation.processing.Processor
.
The irony is this library and others like it are used very frequently by annotation processor libraries because of the ugly bootstrap issue of the compiler picking up the Processor in the currently compiled project.
The work around is to disable annotation processing for the library that is a processor but this isn't always desired.
Consequently metainf-services being a module would be useful.
This PR adds an automatic module name so that modularized Java applications can reliably declare a (compile-time only) dependency on this library. Without this, such applications get the following warning during compilation:
Neither classpath-based applications nor pre-Java 9 applications will be affected.
For more details, see the blog post Automatic-Module-Name: Calling all Java Library Maintainers.
Note: commit 617b79a is the actual change, the other commit only cleans up the POM formatting.