You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/06/04 11:19:09 UTC

[GitHub] [activemq-artemis] gemmellr commented on a change in pull request #3161: Java 11

gemmellr commented on a change in pull request #3161:
URL: https://github.com/apache/activemq-artemis/pull/3161#discussion_r435175726



##########
File path: pom.xml
##########
@@ -922,6 +928,34 @@
             </plugins>
          </build>
       </profile>
+      <profile>
+          <id>java9on</id>
+          <activation>
+              <jdk>[9,)</jdk>
+          </activation>
+          <properties>
+              <maven.compiler.source>8</maven.compiler.source>
+              <maven.compiler.target>11</maven.compiler.target>

Review comment:
       Profile for 9+ but target for 11 seems odd?
   
   I get why its targeting 11 just now since we unfortunately cant use the -release config at the moment to compile for 8, and so would instead need to edit the sources to have things work on 8 when compiled with 9+. 
   
   I'd probably just use enforcer to prevent use of 9 and 10 at this point given I dont think it ever built on them and they are already long EOL.

##########
File path: pom.xml
##########
@@ -1396,34 +1430,15 @@
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- version 3.2 is having problems with the APT processor resulting in
                     java.lang.IllegalStateException: endPosTable already set  -->
-               <version>3.1</version>
+               <version>3.8.1</version>
                <!-- Enable Google's Error-Prone https://github.com/google/error-prone -->
                <configuration>
-                 <showWarnings>true</showWarnings>
-                 <forceJavacCompilerUse>true</forceJavacCompilerUse>
-                 <compilerId>${javac-compiler-id}</compilerId>
-                 <compilerArgs>
-                    <arg>-Xep:MissingOverride:ERROR</arg>
-                    <arg>-Xep:NonAtomicVolatileUpdate:ERROR</arg>
-                    <arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
-                    <arg>-Xep:StaticAccessedFromInstance:ERROR</arg>
-                    <arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
-                    <arg>-Xep:WaitNotInLoop:ERROR</arg>
-                    <arg>-Xdiags:verbose</arg>
-                 </compilerArgs>
+                   <showWarnings>true</showWarnings>
+                   <compilerArgs combine.children="append">
+                       <arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar -Xep:MissingOverride:ERROR -Xep:NonAtomicVolatileUpdate:ERROR -Xep:SynchronizeOnNonFinalField:ERROR -Xep:StaticAccessedFromInstance:ERROR -Xep:SynchronizeOnNonFinalField:ERROR -Xep:WaitNotInLoop:ERROR</arg>

Review comment:
       The error prone installation docs say this only works on 8, so seems like it should be profiled as they show? There is a JDK8-specific profile further up the pom already.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org