Closed don-vip closed 6 years ago
Options are passed to plugins by separating them with spaces in the same argument as the -Xplugin
:
<compilerarg value="-Xplugin:ErrorProne -Xep:CatchAndPrintStackTrace:OFF …" compiler="modern" />
Thanks a lot! I confirm it works now :)
What version of Error Prone are you using?
2.3.1
Does this issue reproduce with the latest release?
Yes
What did you do?
We have to maintain our Ant build working with Java 8 and later versions. As I saw error_prone is supposed to work with Java 10 (https://github.com/google/error-prone/issues/860#issuecomment-411463532) I gave it a try in our build:
This build works with Java 8 and 9 by replacing the javac compiler.
What did you expect to see?
The build working on Java 10 by using the javac plugin.
What did you see instead?
javac
seems happy with the new options (-XDcompilePolicy=simple
,-processorpath ${error_prone_ant.jar}
and-Xplugin:ErrorProne
) but fails with error_prone specific options (-Xep:*
):