Alan, | $ javac --help | -processor <class1>[,<class2>,<class3>...] | Names of the annotation processors to run; bypasses default discovery process
Why does the "default discovery process" work with --classpath, but not with --processor-module-path? Is it simply an omission, or is this by design? With the current discovery process (ServiceLoader?), the number of processors and their class names are implementation details that the processor author is free to change. Do we really want to require users to have to deal with and keep track of the internal workings of their processors? Seems like a regression to me.. Cheers, Eirik. On Mon, Nov 21, 2016 at 9:22 AM, Alan Bateman <[email protected]> wrote: > On 21/11/2016 00:22, Eirik Bjørsnøs wrote: > > : >> >> $ javac --processor-module-path >> ~/.m2/repository/com/example/annotation-processor/1.0-SNAPSH >> OT/annotation-processor-1.0-SNAPSHOT.jar >> -sourcepath src/main/java src/main/java/module-info.java >> src/main/java/com/example/module/SomeClass.java -g -nowarn -target 1.9 >> -source 9 >> >> No output, the annotation-processor was not loaded. >> >> Is there some trick needed to load annotation processors as modules? >> >> I assume you also need to specify -processor so that javac knows which > annotation processors to run. > > -Alan. >
