Skip to content

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

@benrushcc

Description

@benrushcc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions