-
Notifications
You must be signed in to change notification settings - Fork 742
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
Unable to use AllErrorsAsWarnings flag in Maven #1226
Comments
You're hit by a Java 8-specific issue, described in #1115. Possible fix: diff --git a/pom.xml b/pom.xml
index 9e25de2..2a9030b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,8 +35,7 @@
<target>8</target>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
- <arg>-Xplugin:ErrorProne
- -XepAllErrorsAsWarnings</arg>
+ <arg>-Xplugin:ErrorProne -XepAllErrorsAsWarnings</arg>
</compilerArgs>
<annotationProcessorPaths>
<path> Or if you plan to add many more flags: diff --git a/pom.xml b/pom.xml
index 9e25de2..77a6785 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,8 +35,8 @@
<target>8</target>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
- <arg>-Xplugin:ErrorProne
- -XepAllErrorsAsWarnings</arg>
+ <arg>-Xplugin:ErrorProne<!--
+ --> -XepAllErrorsAsWarnings</arg>
</compilerArgs>
<annotationProcessorPaths>
<path> |
I tried the first fix. It did get rid of the error, but the compilation did not show the DeadException as a warning. Do I need to add another flag to get the warning to show? |
I needed to add
I think that's all I needed, thanks! |
Description of the problem / feature request:
I am unable to downgrade all errors to warnings using the '-XepAllErrorsAsWarnings' flag (as seen here)
When I run
mvn compile
without the flag, I (correctly) get the following error:When I run with the flag, I get the following error:
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run
mvn compile
in the same directory as the pom.xml in the unzipped test-apptest-app.zip
What version of Error Prone are you using?
2.3.2
I am also using Maven version 3.5.4 and Java version 1.8.0_181 on OS X (updated to Mojave).
Have you found anything relevant by searching the web?
Unfortunately not. I'm guessing I'm just doing something wrong, since nobody else seems to be having this issue.
The text was updated successfully, but these errors were encountered: