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

Suggest maven-compiler-plugin 3.11.0 in docs #4162

Closed

Conversation

msridhar
Copy link
Contributor

I found that with 3.10.1, Error Prone (and NullAway) warnings aren't even printed (!). Some related discussion at uber/NullAway#830. I created a relevant sample repo:

https://github.com/msridhar/ep-maven-test-warnings

You can compare running mvn clean compile as is with changing this line to be 3.10.1; with the latter version many fewer warnings are printed, and no Error Prone warnings are printed as far as I can see.

I'm open to adding text that warns users off of versions earlier than 3.11.0 if we think that is warranted.

@cushon
Copy link
Collaborator

cushon commented Oct 25, 2023

I think this is explained by https://issues.apache.org/jira/browse/MCOMPILER-457, when enables <showWarnings> by default in 3.11.0.

With your repro if I switch back to 3.10.1 and set <showWarnings>true</showWarnings> I see warnings:

diff --git a/pom.xml b/pom.xml
index fab2fc8..437a101 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,11 +20,12 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
-        <version>3.11.0</version>
+        <version>3.10.1</version>
         <configuration>
           <source>11</source>
           <target>11</target>
           <encoding>UTF-8</encoding>
+          <showWarnings>true</showWarnings>
           <compilerArgs>
             <arg>-XDcompilePolicy=simple</arg>
             <arg>-Xlint:all</arg>

@msridhar
Copy link
Contributor Author

@cushon does something else need to happen for this PR to land? No hurry on my end, just curious if a step got missed.

@cushon
Copy link
Collaborator

cushon commented Oct 29, 2023

@cushon does something else need to happen for this PR to land? No hurry on my end, just curious if a step got missed.

The automation to import it had gotten stuck, I have it a nudge. It should land in the next day or so.

@msridhar msridhar deleted the change-mvn-compiler-plugin-version branch February 16, 2024 23:30
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

Successfully merging this pull request may close these issues.

2 participants