2

I have some annotation processors generating source-files within a maven project. This worked as expected but I am trying to migrate to java9 and now they are not executed anymore, or so I think.

The Annotation processor is registered via

import com.google.auto.service.AutoService;
...
@AutoService(Processor.class)
public class AutoBuilderProcessor extends StandardProcessor {
    ...
}

and provided in the module-info.java like

import de.verlinked.msb.common.annotations.processors.AutoBuilderProcessor;
import de.verlinked.msb.common.annotations.processors.FieldBasedMetaModelGenerator;

import javax.annotation.processing.Processor;

module apigateway.common {
    ...
    exports de.verlinked.msb.common.annotations.processors;
    provides Processor with AutoBuilderProcessor, FieldBasedMetaModelGenerator;
}

but its not working. Do I have to do some additional stuff with maven in java9 or should it work just like this and I may have some other error?

Magnus Lutz
  • 558
  • 3
  • 12
  • 1
    Well, Java 9 changes modified bytecode generation pretty heavily. Have you tried updating auto-service lib? – Mikhail Kholodkov May 21 '18 at 14:57
  • the parsers work when compiling everything using java9/10 without module-info, but as soon as I add a module-info.java to one of the submodule's java code, the annotation parsers wont work anymore, so I would assume it doesnt help upgrading the auto-service lib. I will try though – Magnus Lutz May 22 '18 at 08:45
  • hm, I tested it and it did not resolve the problem sadly – Magnus Lutz May 22 '18 at 11:17
  • @MagnusLutz: Hi. Polite ping, were you able to resolve this issue? I'm facing similar issue. – Rohan Kumar Apr 03 '20 at 09:43

0 Answers0