Skip to content

Commit

Permalink
Updating dependencies and changes from NationalSecurityAgency#83
Browse files Browse the repository at this point in the history
  • Loading branch information
fbruton committed Apr 15, 2021
1 parent ad07731 commit ffefa7d
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 78 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Cache Maven Dependencies
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B package -Pcoverage,checkstyle,pmd,errorProne,dist --file pom.xml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ nbactions*.xml
.settings/
*.swp
*.checkstyle

# Formatter cache
.cache
153 changes: 78 additions & 75 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@
<dep.commons-lang.version>2.6</dep.commons-lang.version>
<dep.commons-logging.version>1.2</dep.commons-logging.version>
<dep.commons-pool.version>1.6</dep.commons-pool.version>
<dep.dropwizard.metrics.version>3.1.0</dep.dropwizard.metrics.version>
<dep.dropwizard.metrics.version>3.2.6</dep.dropwizard.metrics.version>
<dep.guava.version>30.1.1-jre</dep.guava.version>
<dep.hamcrest-junit.version>2.0.0.0</dep.hamcrest-junit.version>
<dep.httpclient.version>4.5.13</dep.httpclient.version>
<dep.httpcore.version>4.4.14</dep.httpcore.version>
<dep.jackson.version>2.12.2</dep.jackson.version>
<dep.jackson.version>2.12.3</dep.jackson.version>
<!-- jersey brings in 1.2; tika-parsers brings in 1.3.2; converge on latest -->
<dep.javax.annotation-api.version>1.3.2</dep.javax.annotation-api.version>
<dep.jaxb.runtime.version>3.0.0</dep.jaxb.runtime.version>
<dep.jcommander.version>1.58</dep.jcommander.version>
<dep.jdom.version>2.0.2</dep.jdom.version>
<dep.jersey.version>3.0.1</dep.jersey.version>
<dep.jetty.version>11.0.1</dep.jetty.version>
<dep.jetty.version>11.0.2</dep.jetty.version>
<dep.junit-jupiter.version>5.8.0-M1</dep.junit-jupiter.version>
<dep.junit-platform.version>1.8.0-M1</dep.junit-platform.version>
<dep.logback.version>1.3.0-alpha5</dep.logback.version>
<dep.maven-surefire-plugin.version>3.0.0-M5</dep.maven-surefire-plugin.version>
<dep.mockito-all.version>3.8.0</dep.mockito-all.version>
<dep.mockito-all.version>3.9.0</dep.mockito-all.version>
<dep.oro.version>2.0.8</dep.oro.version>
<dep.rhino.version>1.7.13</dep.rhino.version>
<dep.slf4j.version>2.0.0-alpha1</dep.slf4j.version>
Expand All @@ -68,8 +68,6 @@
<eclipseFormatterStyle>${project.basedir}/contrib/formatter.xml</eclipseFormatterStyle>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.javacErrorproneVersion>2.8.1</maven.javacErrorproneVersion>
<maven.min-version>3.3.9</maven.min-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -130,7 +128,7 @@
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
Expand Down Expand Up @@ -207,6 +205,11 @@
<artifactId>javax.annotation-api</artifactId>
<version>${dep.javax.annotation-api.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>net.spy</groupId>
<artifactId>spymemcached</artifactId>
Expand Down Expand Up @@ -823,7 +826,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.41</version>
<version>8.41.1</version>
</dependency>
</dependencies>
<executions>
Expand Down Expand Up @@ -913,7 +916,7 @@
<configuration>
<compilerCompliance>${maven.compiler.source}</compilerCompliance>
<compilerSource>${maven.compiler.source}</compilerSource>
<compilerTargetPlatform>${maven.compiler.target}</compilerTargetPlatform>
<compilerTargetPlatform>${maven.compiler.release}</compilerTargetPlatform>
<configFile>${eclipseFormatterStyle}</configFile>
<lineEnding>LF</lineEnding>
<overrideConfigCompilerVersion>true</overrideConfigCompilerVersion>
Expand Down Expand Up @@ -1006,7 +1009,7 @@
<includeTests>true</includeTests>
<minimumTokens>100</minimumTokens>
<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
<targetJdk>${maven.compiler.target}</targetJdk>
<targetJdk>${maven.compiler.release}</targetJdk>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -1407,14 +1410,6 @@
</build>
</profile>
<profile>
<!-- Turn on the error-prone static analyzer during compilation.
NOTE this requires the use of a Java 8 compiler. For
example:
$ JAVA_HOME=/path/to/jdk_11 mvn -PerrorProne clean test-compile
will analyze the main and test code, with the analyzer's
report given as compiler error/warning/note messages. -->
<id>errorProne</id>
<activation>
<property>
Expand All @@ -1426,73 +1421,81 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<!--<forceJavaCCompilerUse>true</forceJavaCCompilerUse>-->
<fork>true</fork>
<showWarnings>true</showWarnings>
<compilerArgs>
<!-- The compiler normally stops at 100 warnings, and
error-prone's static analysis warnings count
against that total. -->
<arg>-Xmaxwarns</arg>
<arg>5000</arg>
<arg>-XepDisableWarningsInGeneratedCode</arg>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne
-Xep:Var:OFF
-Xep:ConstantField:WARN
-Xep:RemoveUnusedImports:WARN
-Xep:WildcardImport:WARN
-Xep:ArrayToString:WARN
-Xep:ComparisonOutOfRange:WARN
-Xep:DeadException:WARN
-Xep:DefaultCharset:OFF
-Xep:DepAnn:WARN
-Xep:FormatString:WARN
-Xep:LongLiteralLowerCaseSuffix:WARN
-Xep:MethodCanBeStatic:WARN
-Xep:MixedArrayDimensions:WARN
-Xep:MultiVariableDeclaration:WARN
-Xep:MultipleTopLevelClasses:WARN
-Xep:NumericEquality:WARN
-Xep:PrivateConstructorForUtilityClass:WARN
-Xep:ThrowsUncheckedException:WARN
-Xep:TryFailThrowable:WARN</arg>
<!--<arg>-XepDisableWarningsInGeneratedCode</arg>-->
<!-- Enable experimental checks. -->
<arg>-XepAllDisabledChecksAsWarnings</arg>
<!--<arg>-XepAllDisabledChecksAsWarnings</arg>-->
<!-- Removed because it was not adding useful help -->
<arg>-Xep:ArgumentParameterMismatch:OFF</arg>
<!--<arg>-Xep:ArgumentParameterMismatch:OFF</arg>-->
<!-- This one is buggy and crashes the compiler. -->
<arg>-Xep:ArgumentParameterSwap:OFF</arg>
<!--<arg>-Xep:ArgumentParameterSwap:OFF</arg>-->
<!-- This one is super noisy, because it wants all
modifiable variables marked with @Var and
complains about the use of final everywhere else.
I'd be okay with adding the annotations, but
removing the finals is only safe if you can
guarantee you never use the compiler *without*
this add-on. -->
<arg>-Xep:Var:OFF</arg>
modifiable variables marked with @Var and
complains about the use of final everywhere else.
I'd be okay with adding the annotations, but
removing the finals is only safe if you can
guarantee you never use the compiler *without*
this add-on. -->
<!--<arg>-Xep:Var:OFF</arg>-->
<!-- By default this is considered a "suggestion" that
doesn't get counted as a warning. Change it to a
counted warning to make it easier to see how many
there are. -->
<arg>-Xep:ConstantField:WARN</arg>
<arg>-Xep:RemoveUnusedImports:WARN</arg>
<arg>-Xep:WildcardImport:WARN</arg>
doesn't get counted as a warning. Change it to a
counted warning to make it easier to see how many
there are. -->
<!--<arg>-Xep:ConstantField:WARN</arg>-->
<!--<arg>-Xep:RemoveUnusedImports:WARN</arg>-->
<!--<arg>-Xep:WildcardImport:WARN</arg>-->
<!-- By default these are set to errors. Change them
to warnings so that it doesn't stop the build
from continuing its analysis. -->
<arg>-Xep:ArrayToString:WARN</arg>
<arg>-Xep:ComparisonOutOfRange:WARN</arg>
<arg>-Xep:DeadException:WARN</arg>
<arg>-Xep:DefaultCharset:OFF</arg>
<arg>-Xep:DepAnn:WARN</arg>
<arg>-Xep:FormatString:WARN</arg>
<arg>-Xep:LongLiteralLowerCaseSuffix:WARN</arg>
<arg>-Xep:MethodCanBeStatic:WARN</arg>
<arg>-Xep:MixedArrayDimensions:WARN</arg>
<arg>-Xep:MultiVariableDeclaration:WARN</arg>
<arg>-Xep:MultipleTopLevelClasses:WARN</arg>
<arg>-Xep:NumericEquality:WARN</arg>
<arg>-Xep:ParameterPackage:WARN</arg>
<arg>-Xep:PrivateConstructorForUtilityClass:WARN</arg>
<arg>-Xep:ThrowsUncheckedException:WARN</arg>
<arg>-Xep:TryFailThrowable:WARN</arg>
to warnings so that it doesn't stop the build
from continuing its analysis. -->
<!--<arg>-Xep:ArrayToString:WARN</arg>-->
<!--<arg>-Xep:ComparisonOutOfRange:WARN</arg>-->
<!--<arg>-Xep:DeadException:WARN</arg>
<arg>-Xep:DefaultCharset:OFF</arg>
<arg>-Xep:DepAnn:WARN</arg>
<arg>-Xep:FormatString:WARN</arg>
<arg>-Xep:LongLiteralLowerCaseSuffix:WARN</arg>
<arg>-Xep:MethodCanBeStatic:WARN</arg>
<arg>-Xep:MixedArrayDimensions:WARN</arg>
<arg>-Xep:MultiVariableDeclaration:WARN</arg>
<arg>-Xep:MultipleTopLevelClasses:WARN</arg>
<arg>-Xep:NumericEquality:WARN</arg>
<arg>-Xep:ParameterPackage:WARN</arg>
<arg>-Xep:PrivateConstructorForUtilityClass:WARN</arg>
<arg>-Xep:ThrowsUncheckedException:WARN</arg>
<arg>-Xep:TryFailThrowable:WARN</arg>-->
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.6.0</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
<!-- override plexus-compiler-javac-errorprone's dependency on
Error Prone with the latest version -->
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit ffefa7d

Please sign in to comment.