apache / apache/maven-compiler-plugin

Maven cannot automatically detect "provide javax.annotation.processing.Processor with ... " when using annotation processors

Open
#962 4 comments 0 reactions 0 assignees View on GitHub
3.x bug
Dominant language
Java
Stars
261
Forks
191
Avg merge
1d 5h
Merged PRs (30d)
8

Description

### Affected version

latest version

### Bug description

`module mod.processor {
requires java.compiler;
provides javax.annotation.processing.Processor with mod.processor.Proc;

exports mod.processor;
}`

`module mod.user {
exports mod.user;
requires mod.processor;
}
`

When declaring two modules, mod.processor as an annotation processor module, and mod.user as a application module, using processor in would be failing because maven cannot automatically detect it.

The current fix would be adding META-INF/services to manually expose the SPI interface.

I know it's a particular maven issue because when using javac and jar command directly would succeed without META-INF/services provided.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.