You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by kr...@apache.org on 2019/03/28 13:31:41 UTC
[calcite-avatica] branch master updated: [CALCITE-2269] Enable
Error Prone checking
This is an automated email from the ASF dual-hosted git repository.
krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git
The following commit(s) were added to refs/heads/master by this push:
new 1b68d1f [CALCITE-2269] Enable Error Prone checking
1b68d1f is described below
commit 1b68d1fae721f45405e580582abb8fede9a6c028
Author: Kevin Risden <kr...@apache.org>
AuthorDate: Wed Apr 18 21:50:34 2018 -0500
[CALCITE-2269] Enable Error Prone checking
* https://errorprone.info
Signed-off-by: Kevin Risden <kr...@apache.org>
---
.travis.yml | 4 ++--
pom.xml | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 053ef99..35c45f4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,7 +21,7 @@ matrix:
fast_finish: true
include:
- env: IMAGE=maven:3-jdk-12
- - env: IMAGE=maven:3-jdk-11
+ - env: IMAGE=maven:3-jdk-11 ERRORPRONE="-P ErrorProne"
- env: IMAGE=maven:3-jdk-10
- env: IMAGE=maven:3-jdk-9
- env: IMAGE=maven:3-jdk-8
@@ -47,7 +47,7 @@ script:
# Print surefire output to the console instead of files
# Ensure that IBM JDK and Jetty work together - -Dcom.ibm.jsse2.overrideDefaultTLS=true
- unset _JAVA_OPTIONS
- - $DOCKERRUN $IMAGE mvn -Dsurefire.useFile=false -Djavax.net.ssl.trustStorePassword=changeit -Dcom.ibm.jsse2.overrideDefaultTLS=true verify javadoc:javadoc javadoc:test-javadoc
+ - $DOCKERRUN $IMAGE mvn -Dsurefire.useFile=false -Djavax.net.ssl.trustStorePassword=changeit -Dcom.ibm.jsse2.overrideDefaultTLS=true verify javadoc:javadoc javadoc:test-javadoc $ERRORPRONE
git:
depth: 10000
sudo: required
diff --git a/pom.xml b/pom.xml
index 95fb234..1693ae4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,6 +70,7 @@ limitations under the License.
<docker-maven-plugin.version>1.2.0</docker-maven-plugin.version>
<dropwizard-metrics.version>4.0.5</dropwizard-metrics.version>
<forbiddenapis.version>2.6</forbiddenapis.version>
+ <error_prone_core.version>2.3.3</error_prone_core.version>
<!-- We support guava versions as old as 14.0.1 (the version used by Hive)
but prefer more recent versions. -->
<guava.version>14.0.1</guava.version>
@@ -401,6 +402,7 @@ limitations under the License.
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
@@ -414,6 +416,7 @@ limitations under the License.
</executions>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- If you are looking to change source/target,
change the maven.compiler.{source,target} property -->
@@ -425,6 +428,7 @@ limitations under the License.
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
@@ -459,6 +463,7 @@ limitations under the License.
</dependencies>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
@@ -472,7 +477,7 @@ limitations under the License.
</execution>
</executions>
</plugin>
- <plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
@@ -855,5 +860,34 @@ limitations under the License.
</plugins>
</build>
</profile>
+ <profile>
+ <!-- This profile requires JDK 9+. There is no way to enforce that currently.
+ https://errorprone.info/docs/installation has details why JDK 8 is not supported -->
+ <id>ErrorProne</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven-compiler-plugin.version}</version>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:deprecation</arg>
+ <arg>-XDcompilePolicy=simple</arg>
+ <arg>-Xplugin:ErrorProne</arg>
+ </compilerArgs>
+ <failOnWarning>true</failOnWarning>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>com.google.errorprone</groupId>
+ <artifactId>error_prone_core</artifactId>
+ <version>${error_prone_core.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>