Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javac compiler doesn't support --processor-module-path #53

Closed
ghost opened this issue May 31, 2018 · 1 comment
Closed

javac compiler doesn't support --processor-module-path #53

ghost opened this issue May 31, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented May 31, 2018

Maven builds fail if the following conditions are set:

  • Using Java 9 or 10
  • Using module-info.java
  • Build depends on the execution of annotation processors (like Lombok)

This results in using the module path instead of the class path of the javac compiler. Now the javac compiler also needs to be configured with --processor-module-path so that the compiler can find the required annotation processors in the processor module path. The latest version of plexus-compiler-javac only supports the --processorpath parameter of javac. This parameter is set by the maven-compiler-plugin to the default class path. But when using Java 9+ modules the class path doesn't seem to be used by javac to find the annotation processors. So, to use annotation processors in combination with Java 9+ modules, the plexus-compiler-javac needs to support the related parameter.

@scholzi100
Copy link
Contributor

scholzi100 commented Jul 2, 2019

I reproduced the problem with Java 12 too. --processor-module-path should be used with Java 9+ and only when a module-info file is created. There is also a related MCOMPILER-310.

Hotfix: set all processors manually in the annotationProcessors section of maven-compiler-plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant