Skip to content

Commit

Permalink
update dependency exclusions and compilerArgs for errorProne (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhardy authored Jun 17, 2024
1 parent d22e315 commit dc83181
Showing 1 changed file with 40 additions and 13 deletions.
53 changes: 40 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- With Java 8 and the latest version of surefire, user.timezone is not read correctly. Reevaluate one day.
See https://issues.apache.org/jira/browse/SUREFIRE-1176 or
http://stackoverflow.com/questions/19121928/java-system-getproperty-user-timezone-does-not-work
http://stackoverflow.com/questions/19121928/java-system-getproperty-user-timezone-does-not-work
The COMPAT locale provider is used because the date formatter parsing has changed significantly
when using the CLDR locale provider, which is the default in JDK11.
https://www.oracle.com/technetwork/java/javase/documentation/java11locales-5069639.html
https://www.oracle.com/technetwork/java/javase/documentation/java11locales-5069639.html
-->
<surefire.argline>@{argLine} -Xmx1024m -Xms256m -Djava.locale.providers=COMPAT -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Djava.awt.headless=true</surefire.argline>
<surefire.argline>@{argLine} -Xmx1024m -Xms256m -Djava.locale.providers=COMPAT -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Djava.awt.headless=true</surefire.argline>
<surefire.forkCount>.5C</surefire.forkCount>
</properties>
<dependencyManagement>
Expand All @@ -121,10 +121,21 @@
<artifactId>gson</artifactId>
<version>${dep.gson.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${dep.errorprone.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${dep.guava.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Expand Down Expand Up @@ -472,6 +483,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-jetty</artifactId>
Expand Down Expand Up @@ -674,7 +690,7 @@
<!-- this combination of these two configurations
(failOnViolation=true and violationSeverity=error) means
any checks with severity=error will fail the build -->
<!-- TODO enforce more checkstyle categories as the build gets cleaned up -->
<!-- TODO enforce more checkstyle categories as the build gets cleaned up -->
<!-- As you fix checkstyle warning categories, change the severity of that category
to "error" so it will fail the build if new violations of that category get introduced. -->
<failOnViolation>true</failOnViolation>
Expand Down Expand Up @@ -1425,11 +1441,16 @@
<release>${maven.compiler.release}</release>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-Xmaxerrs</arg>
<arg>-1</arg>
<arg>-Xmaxwarns</arg>
Expand Down Expand Up @@ -1471,7 +1492,8 @@
<profile>
<id>eclipse</id>
<activation>
<!-- when eclipse runs a build, this system property is already present -->
<!-- when eclipse runs a build, this system property is already
present -->
<property>
<name>m2e.version</name>
</property>
Expand All @@ -1481,7 +1503,8 @@
<maven.compiler.release>11</maven.compiler.release>
</properties>
<build>
<!-- different build directory for eclipse, so running maven and clicking in IDE don't conflict -->
<!-- different build directory for eclipse, so running maven and
clicking in IDE don't conflict -->
<directory>${project.basedir}/target-eclipse</directory>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -1557,26 +1580,30 @@
<id>netbeans</id>
<activation>
<property>
<!-- You must add -Dnetbeans.ide as global option to the maven command for this to work
<!-- You must add -Dnetbeans.ide as global option to the
maven command for this to work
Could not find any property existing when Netbeans was running the build -->
<name>netbeans.ide</name>
</property>
</activation>
<build>
<!-- different build directory for netbeans, so running maven and clicking in IDE don't conflict -->
<!-- different build directory for netbeans, so running maven
and clicking in IDE don't conflict -->
<directory>${project.basedir}/target-netbeans</directory>
</build>
</profile>
<profile>
<id>intellij</id>
<activation>
<!-- when intellij runs a build, this system property is already present -->
<!-- when intellij runs a build, this system property is already
present -->
<property>
<name>idea.version</name>
</property>
</activation>
<build>
<!-- different build directory for intellij, so running maven and clicking in IDE don't conflict -->
<!-- different build directory for intellij, so running maven
and clicking in IDE don't conflict -->
<directory>${project.basedir}/target-idea</directory>
</build>
</profile>
Expand Down

0 comments on commit dc83181

Please sign in to comment.