[ https://issues.apache.org/jira/browse/MCOMPILER-435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Slawomir Jaranowski updated MCOMPILER-435: ------------------------------------------ Fix Version/s: (was: waiting-for-feedback) > Plugin does not report actual error from ErrorProne when toolchain is used > -------------------------------------------------------------------------- > > Key: MCOMPILER-435 > URL: https://issues.apache.org/jira/browse/MCOMPILER-435 > Project: Maven Compiler Plugin > Issue Type: Bug > Affects Versions: 3.8.1 > Environment: Windows, Maven 3.6.3 > Reporter: Rocher Suchard > Priority: Critical > Attachments: maven-compiler-plugin-3.13.0-error-prone.zip, > maven-compiler-plugin-3.8.1-error-prone.zip > > > Hello, > I followed ErrorProne installation > ([http://errorprone.info/docs/installation] and > [http://errorprone.info/docs/patching]) but I did not provide a > {{-XepPatchCheck}} which result in an error that {{maven-compiler-plugin}} > fails to report when a toolchain is used: > Without a toolchain, I get this error which is what I expect, eg: something > that helps! > {code:java} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile > (default-compile) on > project maven-compiler-plugin-error-prone: Fatal error compiling: > -XepPatchChecks and -XepPatchLocation must be specif > ied together -> [Help 1] > {code} > With a JDK 11 toolchain, the error won't help, neither the (huge) stacktrace > when using {{-e}}. > {code:java} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile > (default-compile) on > project maven-compiler-plugin-error-prone: Compilation failure -> [Help 1] > {code} > {{maven-compiler-plugin}} is unable to report correctly the > {{com.google.errorprone.InvalidCommandLineOptionException}} thrown by > ErrorProne when a toolchain is used (in this case, the toolchain is useless, > but I have profile with Java 15). > The attached file contains a sample project: > - To test the case when it reports the ErrorProne exception, simply do > {{./mvnw clean install}} > - To test the case with a JDK 11 toolchain, simply do {{./mvnw > -Puse-toolchain clean install}} > Java 11 is both required to build, and as a toolchain. -- This message was sent by Atlassian Jira (v8.20.10#820010)