mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
1556 lines
80 KiB
XML
1556 lines
80 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>tech.picnic.error-prone-support</groupId>
|
|
<artifactId>error-prone-support</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<packaging>pom</packaging>
|
|
|
|
<name>Picnic :: Error Prone Support</name>
|
|
<description>Error Prone support library by Picnic.</description>
|
|
<url>https://github.com/PicnicSupermarket/error-prone-support</url>
|
|
<inceptionYear>2017</inceptionYear>
|
|
<organization>
|
|
<name>Picnic Technologies BV</name>
|
|
<url>https://picnic.tech</url>
|
|
</organization>
|
|
<licenses>
|
|
<license>
|
|
<name>MIT License</name>
|
|
<url>https://opensource.org/licenses/mit-license.php</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<developers>
|
|
<developer>
|
|
<name>Stephan Schroevers</name>
|
|
<email>stephan.schroevers@teampicnic.com</email>
|
|
<organization>Picnic Technologies BV</organization>
|
|
<timezone>Europe/Amsterdam</timezone>
|
|
</developer>
|
|
</developers>
|
|
|
|
<modules>
|
|
<module>error-prone-contrib</module>
|
|
<module>refaster-resource-compiler</module>
|
|
</modules>
|
|
|
|
<scm>
|
|
<developerConnection>scm:git:git@github.com:PicnicSupermarket/error-prone-support.git</developerConnection>
|
|
<tag>HEAD</tag>
|
|
<url>https://github.com/PicnicSupermarket/error-prone-support</url>
|
|
</scm>
|
|
<issueManagement>
|
|
<system>Github</system>
|
|
<url>https://github.com/PicnicSupermarket/error-prone-support/issues</url>
|
|
</issueManagement>
|
|
<ciManagement>
|
|
<system>Travis CI</system>
|
|
<url>https://travis-ci.org/PicnicSupermarket/error-prone-support</url>
|
|
</ciManagement>
|
|
<distributionManagement>
|
|
<repository>
|
|
<id>ossrh</id>
|
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
|
|
</repository>
|
|
<snapshotRepository>
|
|
<id>ossrh</id>
|
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
</snapshotRepository>
|
|
</distributionManagement>
|
|
|
|
<properties>
|
|
<!-- Arguments to the JVMs forked by Surefire. The specification of
|
|
this 'argLine' property instead of the definition of the 'argLine'
|
|
configuration setting allows users or plugins to specify additional
|
|
arguments. In particular, JaCoCo relies on this for the configuration
|
|
of its Java agent. -->
|
|
<argLine>
|
|
<!-- The test JVMs are short-running. By disabling certain
|
|
expensive JIT optimizations we actually speed up most tests. -->
|
|
-XX:TieredStopAtLevel=1
|
|
<!-- We cap memory usage. This is especially relevant on Travis CI,
|
|
but locally this should also be more than enough. -->
|
|
<!-- XXX: RefasterCheckTest` requires more memory, so here we use
|
|
more than in other projects. Review how to reconcile this. (Extra
|
|
property?) -->
|
|
-Xmx1024m
|
|
<!-- This argument cannot be set through Surefire's
|
|
'systemPropertyVariables' configuration setting. Setting the file
|
|
encoding is necessary because forked unit test invocations
|
|
otherwise use the environment's file encoding. -->
|
|
-Dfile.encoding=${project.build.sourceEncoding}
|
|
<!-- This argument *can* be set through Surefire's
|
|
'systemPropertyVariables' configuration setting, but by placing it
|
|
here it automatically also applies to the Failsafe plugin. On Unix
|
|
systems we use a lower-quality source of randomness, so as to avoid
|
|
potential slowdown of tests relying on java.security.SecureRandom.
|
|
Note that it is not fatal for the file to not exist, so this
|
|
setting is Windows-compatible. The '/./' syntax is no accident; see
|
|
https://bugs.openjdk.java.net/browse/JDK-6202721 for details. -->
|
|
-Djava.security.egd=file:/dev/./urandom
|
|
<!-- On Mac OS X, running in headless mode prevents the forked JVMs
|
|
from showing up in the dock and capturing window focus. -->
|
|
-Djava.awt.headless=true
|
|
</argLine>
|
|
<!-- Our build system (Travis CI) provides a monotonically increasing
|
|
build number. When building locally, this number is obviously absent.
|
|
So we provide a default value. -->
|
|
<build.number>LOCAL</build.number>
|
|
<!-- Property using which additional Error Prone flags can be
|
|
specified. Used by the `patch` profile to enable patching. -->
|
|
<error-prone.args />
|
|
<!-- The Maven `groupId` under which Error Prone dependencies are
|
|
published. By default we use an official Error Prone release. This
|
|
property allows the `error-prone-fork` profile below to build the
|
|
project using Picnic's Error Prone fork instead. -->
|
|
<groupId.error-prone>com.google.errorprone</groupId.error-prone>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<!-- Dependency and plugin versions that are referenced in more than
|
|
one place. We use these to keep dependencies in sync. Version numbers
|
|
that need to be referenced only once should *not* be listed here. -->
|
|
<version.auto-service>1.0-rc7</version.auto-service>
|
|
<version.error-prone>2.4.0</version.error-prone>
|
|
<version.error-prone-slf4j>0.1.4</version.error-prone-slf4j>
|
|
<version.guava-beta-checker>1.0</version.guava-beta-checker>
|
|
<version.jdk>11</version.jdk>
|
|
<version.maven>3.6.3</version.maven>
|
|
<version.mockito>3.7.0</version.mockito>
|
|
<version.nopen-checker>1.0.1</version.nopen-checker>
|
|
<version.nullaway>0.8.0</version.nullaway>
|
|
<version.surefire>2.22.2</version.surefire>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>${groupId.error-prone}</groupId>
|
|
<artifactId>error_prone_annotation</artifactId>
|
|
<version>${version.error-prone}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>${groupId.error-prone}</groupId>
|
|
<artifactId>error_prone_annotations</artifactId>
|
|
<version>${version.error-prone}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>${groupId.error-prone}</groupId>
|
|
<artifactId>error_prone_check_api</artifactId>
|
|
<version>${version.error-prone}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>${groupId.error-prone}</groupId>
|
|
<artifactId>error_prone_core</artifactId>
|
|
<version>${version.error-prone}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>${groupId.error-prone}</groupId>
|
|
<artifactId>error_prone_test_helpers</artifactId>
|
|
<version>${version.error-prone}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>${project.groupId}</groupId>
|
|
<artifactId>refaster-resource-compiler</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson</groupId>
|
|
<artifactId>jackson-bom</artifactId>
|
|
<version>2.12.1</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.auto</groupId>
|
|
<artifactId>auto-common</artifactId>
|
|
<version>0.11</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.auto.service</groupId>
|
|
<artifactId>auto-service-annotations</artifactId>
|
|
<version>${version.auto-service}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.auto.value</groupId>
|
|
<artifactId>auto-value-annotations</artifactId>
|
|
<version>1.7.4</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.code.findbugs</groupId>
|
|
<artifactId>jsr305</artifactId>
|
|
<version>3.0.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.errorprone</groupId>
|
|
<artifactId>javac</artifactId>
|
|
<version>9+181-r4173-1</version>
|
|
</dependency>
|
|
<!-- Specified as a workaround for
|
|
https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava-beta-checker</artifactId>
|
|
<version>${version.guava-beta-checker}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava-bom</artifactId>
|
|
<version>30.1-jre</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.truth</groupId>
|
|
<artifactId>truth</artifactId>
|
|
<version>1.0.1</version>
|
|
</dependency>
|
|
<!-- Specified as a workaround for
|
|
https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
|
|
<dependency>
|
|
<groupId>com.jakewharton.nopen</groupId>
|
|
<artifactId>nopen-checker</artifactId>
|
|
<version>${version.nopen-checker}</version>
|
|
</dependency>
|
|
<!-- Specified as a workaround for
|
|
https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
|
|
<dependency>
|
|
<groupId>com.uber.nullaway</groupId>
|
|
<artifactId>nullaway</artifactId>
|
|
<version>${version.nullaway}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.projectreactor</groupId>
|
|
<artifactId>reactor-bom</artifactId>
|
|
<version>2020.0.3</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.reactivex.rxjava2</groupId>
|
|
<artifactId>rxjava</artifactId>
|
|
<version>2.2.20</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.swagger</groupId>
|
|
<artifactId>swagger-annotations</artifactId>
|
|
<version>1.6.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.swagger.core.v3</groupId>
|
|
<artifactId>swagger-annotations</artifactId>
|
|
<version>2.1.6</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>javax.xml.bind</groupId>
|
|
<artifactId>jaxb-api</artifactId>
|
|
<version>2.3.1</version>
|
|
</dependency>
|
|
<!-- Specified as a workaround for
|
|
https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
|
|
<dependency>
|
|
<groupId>jp.skypencil.errorprone.slf4j</groupId>
|
|
<artifactId>errorprone-slf4j</artifactId>
|
|
<version>${version.error-prone-slf4j}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.13.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.aspectj</groupId>
|
|
<artifactId>aspectjweaver</artifactId>
|
|
<version>1.9.6</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.assertj</groupId>
|
|
<artifactId>assertj-core</artifactId>
|
|
<version>3.18.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.checkerframework</groupId>
|
|
<artifactId>checker-qual</artifactId>
|
|
<version>3.9.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.hamcrest</groupId>
|
|
<artifactId>hamcrest-library</artifactId>
|
|
<version>1.3</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit</groupId>
|
|
<artifactId>junit-bom</artifactId>
|
|
<version>5.7.0</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-core</artifactId>
|
|
<version>${version.mockito}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.reactivestreams</groupId>
|
|
<artifactId>reactive-streams</artifactId>
|
|
<version>1.0.3</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-api</artifactId>
|
|
<version>1.7.30</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework</groupId>
|
|
<artifactId>spring-framework-bom</artifactId>
|
|
<version>5.3.3</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-test</artifactId>
|
|
<version>2.3.8.RELEASE</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testng</groupId>
|
|
<artifactId>testng</artifactId>
|
|
<version>7.3.0</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.coveo</groupId>
|
|
<artifactId>fmt-maven-plugin</artifactId>
|
|
<version>2.9.1</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.ekryd.sortpom</groupId>
|
|
<artifactId>sortpom-maven-plugin</artifactId>
|
|
<version>2.12.0</version>
|
|
<configuration>
|
|
<createBackupFile>false</createBackupFile>
|
|
<encoding>${project.build.sourceEncoding}</encoding>
|
|
<expandEmptyElements>false</expandEmptyElements>
|
|
<nrOfIndentSpace>4</nrOfIndentSpace>
|
|
<predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
|
|
<sortDependencies>groupId,artifactId</sortDependencies>
|
|
<sortModules>true</sortModules>
|
|
<sortPlugins>groupId,artifactId</sortPlugins>
|
|
<sortProperties>true</sortProperties>
|
|
<verifyFail>warn</verifyFail>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>verify</goal>
|
|
</goals>
|
|
<phase>verify</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.lewisd</groupId>
|
|
<artifactId>lint-maven-plugin</artifactId>
|
|
<version>0.0.11</version>
|
|
<configuration>
|
|
<failOnViolation>false</failOnViolation>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>validate-pom</id>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
<phase>validate</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>de.thetaphi</groupId>
|
|
<artifactId>forbiddenapis</artifactId>
|
|
<version>3.1</version>
|
|
<configuration>
|
|
<bundledSignatures>
|
|
<bundledSignature>jdk-internal</bundledSignature>
|
|
<bundledSignature>jdk-reflection</bundledSignature>
|
|
<bundledSignature>jdk-system-out</bundledSignature>
|
|
<!-- Other bundles are available but currently not
|
|
enabled:
|
|
- commons-io-unsafe-*: while we may indirectly rely
|
|
on Apache Commons IO, we avoid direct
|
|
dependencies.
|
|
- jdk-deprecated: we compile with `-Xlint:all`,
|
|
which causes the build to fail when _any_
|
|
deprecated method is called.
|
|
- jdk-non-portable: the Error Prone integration
|
|
crucially relies on some of these APIs.
|
|
- jdk-unsafe: see
|
|
https://github.com/policeman-tools/forbidden-apis/issues/119.
|
|
Note that this whole plugin could be replaced with
|
|
an Error Prone check; that would also make it
|
|
possible to resolve issue #119 linked above. See
|
|
https://github.com/google/error-prone/issues/632. -->
|
|
</bundledSignatures>
|
|
<!-- The plugin tries to load all supertypes of any
|
|
class it analyzes. Some of those types may be absent
|
|
from the compilation classpath, because the module that
|
|
contains them has the `runtime` or `test` scope. When
|
|
this happens, we don't want to fail the build. (The
|
|
alternative is to declare all those dependencies
|
|
`provided`, but we'd rather not do that.) -->
|
|
<failOnMissingClasses>false</failOnMissingClasses>
|
|
<failOnViolation>false</failOnViolation>
|
|
<targetVersion>${version.jdk}</targetVersion>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>detect-forbidden-api-usage</id>
|
|
<goals>
|
|
<goal>check</goal>
|
|
<goal>testCheck</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>io.takari</groupId>
|
|
<artifactId>maven</artifactId>
|
|
<version>0.7.7</version>
|
|
<configuration>
|
|
<maven>${version.maven}</maven>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
<version>3.1.1</version>
|
|
<configuration>
|
|
<checkstyleRules>
|
|
<!-- We only enable rules that are not enforced by
|
|
Error Prone or automatically corrected through
|
|
application of google-java-format. -->
|
|
<module name="Checker">
|
|
<module name="SuppressWarningsFilter" />
|
|
<module name="TreeWalker">
|
|
<module name="AbbreviationAsWordInName" />
|
|
<module name="AnnotationUseStyle">
|
|
<!-- XXX: Right now this check doesn't
|
|
completely enforce the desired style.
|
|
See https://github.com/checkstyle/checkstyle/issues/4972;
|
|
we're looking for the proposed `compact
|
|
= ALWAYS` and `singleArrayCurlies =
|
|
NEVER` style. -->
|
|
</module>
|
|
<module name="AvoidEscapedUnicodeCharacters">
|
|
<property name="allowEscapesForControlCharacters" value="true" />
|
|
<property name="allowIfAllCharactersEscaped" value="true" />
|
|
<property name="allowNonPrintableEscapes" value="true" />
|
|
</module>
|
|
<module name="AvoidNoArgumentSuperConstructorCall" />
|
|
<module name="DeclarationOrder">
|
|
<!-- We don't enforce sorting fields by
|
|
their visibility modifier, for two
|
|
reasons:
|
|
- During (class) initialization
|
|
declaration order matters. Though the
|
|
plugin does not warn about fields
|
|
with obvious dependencies, its
|
|
dependency analysis is necessarily
|
|
incomplete; NPEs may result if some
|
|
of its advice is followed.
|
|
- Sometimes a field is annotated
|
|
`@VisibleForTesting`. It may then be
|
|
preferable not to reorder. The plugin
|
|
does not currently respect this
|
|
annotation.
|
|
Note that as-is this check also doesn't
|
|
enforce that static fields are before
|
|
instance fields. See
|
|
https://github.com/checkstyle/checkstyle/issues/7043. -->
|
|
<property name="ignoreModifiers" value="true" />
|
|
</module>
|
|
<module name="DefaultComesLast" />
|
|
<module name="DesignForExtension" />
|
|
<module name="EmptyBlock">
|
|
<property name="option" value="text" />
|
|
</module>
|
|
<module name="EmptyCatchBlock">
|
|
<property name="exceptionVariableName" value="ignored" />
|
|
</module>
|
|
<module name="EmptyLineSeparator">
|
|
<!-- XXX: Google Java Format doesn't
|
|
enforce an empty line before method
|
|
declarations with Javadoc. This rule
|
|
flags those cases. For technical
|
|
reasons this entails inspecting not
|
|
just `METHOD_DEF` tokens. See
|
|
https://github.com/google/google-java-format/issues/399. -->
|
|
<property name="tokens" value="CLASS_DEF, CTOR_DEF, ENUM_DEF, INSTANCE_INIT, INTERFACE_DEF, METHOD_DEF, STATIC_INIT" />
|
|
</module>
|
|
<module name="EmptyStatement" />
|
|
<module name="FinalClass" />
|
|
<module name="HiddenFieldCheck">
|
|
<property name="ignoreConstructorParameter" value="true" />
|
|
<property name="ignoreSetter" value="true" />
|
|
<property name="setterCanReturnItsClass" value="true" />
|
|
</module>
|
|
<module name="IllegalImport">
|
|
<property name="illegalClasses" value="com.google.api.client.util.Preconditions">
|
|
<!-- Instead, please use
|
|
`com.google.common.base.Preconditions`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="com.mongodb.lang.Nullable">
|
|
<!-- Instead, please use
|
|
`javax.annotation.Nullable`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="com.nimbusds.jose.util.StandardCharset">
|
|
<!-- Instead, please use
|
|
`java.nio.charset.StandardCharsets`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="io.micrometer.core.lang.Nullable">
|
|
<!-- Instead, please use
|
|
`javax.annotation.Nullable`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="javax.annotation.concurrent.Immutable">
|
|
<!-- Instead, please use
|
|
`com.google.errorprone.annotations.Immutable`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="javax.xml.bind.DatatypeConverter" />
|
|
<property name="illegalClasses" value="org.assertj.core.util.Preconditions">
|
|
<!-- Instead, please use
|
|
`com.google.common.base.Preconditions`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="org.jetbrains.annotations.VisibleForTesting">
|
|
<!-- Instead, please use
|
|
`com.google.common.annotations.VisibleForTesting`. -->
|
|
</property>
|
|
<property name="illegalClasses" value="org.springframework.context.annotation.ComponentScan">
|
|
<!-- Instead, please explicitly
|
|
`@Import` the components. -->
|
|
</property>
|
|
<property name="illegalClasses" value="org.springframework.lang.Nullable">
|
|
<!-- Instead, please use
|
|
`javax.annotation.Nullable`. -->
|
|
</property>
|
|
<property name="illegalPkgs" value="com.amazonaws.annotation" />
|
|
<property name="illegalPkgs" value="com.beust.jcommander.internal" />
|
|
<property name="illegalPkgs" value="com.google.api.client.repackaged" />
|
|
<property name="illegalPkgs" value="com.google.common.cache">
|
|
<!-- Instead, please use Caffeine. -->
|
|
</property>
|
|
<property name="illegalPkgs" value="com.newrelic.agent.deps" />
|
|
<property name="illegalPkgs" value="com.tngtech.archunit.thirdparty" />
|
|
<property name="illegalPkgs" value="jdk" />
|
|
<property name="illegalPkgs" value="jersey.repackaged" />
|
|
<property name="illegalPkgs" value="nl.jqno.equalsverifier.internal" />
|
|
<property name="illegalPkgs" value="org.apache.commons.lang3">
|
|
<!-- Instead, please use Guava or a
|
|
custom helper method. -->
|
|
</property>
|
|
<property name="illegalPkgs" value="org.immutables.value.internal" />
|
|
<property name="illegalPkgs" value="org.mutabilitydetector.internal" />
|
|
<property name="illegalPkgs" value="org.testcontainers.shaded" />
|
|
<property name="illegalPkgs" value="org.testng.internal" />
|
|
</module>
|
|
<module name="IllegalImport">
|
|
<!-- XXX: This config uses
|
|
regexes so as to disallow static
|
|
imports. Once `illegalClasses`
|
|
disallows static imports by default,
|
|
this config can be merged into the one
|
|
above. See
|
|
https://github.com/checkstyle/checkstyle/issues/4954. -->
|
|
<property name="illegalClasses" value="org\.testng\.AssertJUnit(\..*?)?" />
|
|
<property name="illegalClasses" value="org\.springframework\.stereotype\.(Component|Controller|Service)">
|
|
<!-- We don't use Spring's
|
|
component scanning, so `@Component`
|
|
and `@Service` have no effect.
|
|
Instead of `@Controller` use
|
|
`@RestController`. -->
|
|
</property>
|
|
<property name="regexp" value="true" />
|
|
</module>
|
|
<module name="IllegalCatch" />
|
|
<module name="IllegalThrows" />
|
|
<module name="InnerAssignment" />
|
|
<module name="InvalidJavadocPosition" />
|
|
<module name="JavadocBlockTagLocation" />
|
|
<module name="MissingDeprecated" />
|
|
<module name="MutableException" />
|
|
<module name="NeedBraces" />
|
|
<module name="NoClone" />
|
|
<module name="NoCodeInFile" />
|
|
<module name="NoEnumTrailingComma" />
|
|
<module name="NoFinalizer" />
|
|
<module name="PackageDeclaration" />
|
|
<module name="PackageName">
|
|
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$" />
|
|
</module>
|
|
<module name="ParameterAssignment" />
|
|
<module name="RedundantModifier" />
|
|
<module name="SimplifyBooleanExpression" />
|
|
<module name="SimplifyBooleanReturn" />
|
|
<module name="SuppressWarningsHolder" />
|
|
<module name="TrailingComment" />
|
|
<module name="WriteTag">
|
|
<property name="tag" value="@author" />
|
|
<property name="tagFormat" value="\S" />
|
|
<property name="tagSeverity" value="error" />
|
|
<property name="severity" value="ignore" />
|
|
</module>
|
|
<module name="UnnecessaryParentheses" />
|
|
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
|
|
<module name="UnnecessarySemicolonInEnumeration" />
|
|
<module name="UnnecessarySemicolonInTryWithResources" />
|
|
<module name="UnusedImports">
|
|
<!-- Error-prone also detects these,
|
|
but (currently) doesn't warn about
|
|
JavaDoc-only imports. -->
|
|
</module>
|
|
<module name="VisibilityModifier" />
|
|
</module>
|
|
<module name="UniqueProperties" />
|
|
</module>
|
|
</checkstyleRules>
|
|
<failOnViolation>false</failOnViolation>
|
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
|
</configuration>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.puppycrawl.tools</groupId>
|
|
<artifactId>checkstyle</artifactId>
|
|
<version>8.39</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<executions>
|
|
<execution>
|
|
<id>run-checkstyle</id>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-clean-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>com.google.auto.service</groupId>
|
|
<artifactId>auto-service</artifactId>
|
|
<version>${version.auto-service}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
<compilerArgs>
|
|
<arg>-Xmaxerrs</arg>
|
|
<arg>10000</arg>
|
|
<arg>-Xmaxwarns</arg>
|
|
<arg>10000</arg>
|
|
</compilerArgs>
|
|
<parameters>true</parameters>
|
|
<release>${version.jdk}</release>
|
|
<!-- Even though `-release X` implies `-source X` and
|
|
`-target X`, we need to configure these properties
|
|
explicitily, for otherwise the plugin's default value
|
|
of `1.6` is passed on. -->
|
|
<source>${version.jdk}</source>
|
|
<target>${version.jdk}</target>
|
|
<!-- Erroneously inverted logic... for details, see
|
|
https://issues.apache.org/jira/browse/MCOMPILER-209. -->
|
|
<useIncrementalCompilation>false</useIncrementalCompilation>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<version>3.1.2</version>
|
|
<configuration>
|
|
<ignoreDirect>false</ignoreDirect>
|
|
<ignoreNonCompile>true</ignoreNonCompile>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
<version>2.8.2</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<version>3.0.0-M3</version>
|
|
<configuration>
|
|
<fail>false</fail>
|
|
<rules>
|
|
<banDuplicatePomDependencyVersions />
|
|
<dependencyConvergence />
|
|
<requireEncoding>
|
|
<acceptAsciiSubset>true</acceptAsciiSubset>
|
|
<encoding>ISO-8859-1</encoding>
|
|
<includes>src/main/resources/**/*.properties,src/test/resources/**/*.properties</includes>
|
|
</requireEncoding>
|
|
<requireJavaVersion>
|
|
<version>${version.jdk}</version>
|
|
</requireJavaVersion>
|
|
<requireMavenVersion>
|
|
<version>${version.maven}</version>
|
|
</requireMavenVersion>
|
|
<requirePluginVersions />
|
|
<requireSameVersionsReactor />
|
|
<requireUpperBoundDeps />
|
|
</rules>
|
|
</configuration>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>extra-enforcer-rules</artifactId>
|
|
<version>1.3</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<executions>
|
|
<execution>
|
|
<id>apply-enforcement-rules</id>
|
|
<goals>
|
|
<goal>enforce</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-gpg-plugin</artifactId>
|
|
<version>1.6</version>
|
|
<executions>
|
|
<execution>
|
|
<id>sign-artifacts</id>
|
|
<goals>
|
|
<goal>sign</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-install-plugin</artifactId>
|
|
<version>2.5.2</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<configuration>
|
|
<skipIfEmpty>true</skipIfEmpty>
|
|
<archive>
|
|
<manifest>
|
|
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
|
|
</manifest>
|
|
<manifestEntries>
|
|
<Implementation-Title>${project.name}</Implementation-Title>
|
|
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
|
|
<Implementation-Version>${project.version}.${build.number}.${build.revision}</Implementation-Version>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>create-test-jar</id>
|
|
<goals>
|
|
<goal>test-jar</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>generate-javadoc-jar</id>
|
|
<goals>
|
|
<goal>jar</goal>
|
|
</goals>
|
|
<phase>verify</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-release-plugin</artifactId>
|
|
<version>2.5.3</version>
|
|
<configuration>
|
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
|
<releaseProfiles>release</releaseProfiles>
|
|
<tagNameFormat>v@{project.version}</tagNameFormat>
|
|
<useReleaseProfile>false</useReleaseProfile>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<configuration>
|
|
<delimiters>
|
|
<delimiter>@</delimiter>
|
|
</delimiters>
|
|
<propertiesEncoding>ISO-8859-1</propertiesEncoding>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-site-plugin</artifactId>
|
|
<version>3.9.1</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
<version>3.2.1</version>
|
|
<executions>
|
|
<execution>
|
|
<id>generate-source-jar</id>
|
|
<goals>
|
|
<goal>jar-no-fork</goal>
|
|
</goals>
|
|
<phase>verify</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>${version.surefire}</version>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/*Test.java</include>
|
|
</includes>
|
|
<properties>
|
|
<configurationParameters>junit.jupiter.execution.parallel.config.strategy=dynamic
|
|
junit.jupiter.execution.parallel.enabled=true
|
|
junit.jupiter.execution.parallel.mode.default = concurrent</configurationParameters>
|
|
</properties>
|
|
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
|
<trimStackTrace>false</trimStackTrace>
|
|
</configuration>
|
|
<dependencies>
|
|
<!-- Some dependencies pull in JUnit 4; having it on
|
|
the classpath confuses Surefire. By declaring this
|
|
dependency we ensure that the JUnit 5 test runner is
|
|
used. -->
|
|
<dependency>
|
|
<groupId>org.apache.maven.surefire</groupId>
|
|
<artifactId>surefire-junit-platform</artifactId>
|
|
<version>${version.surefire}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
|
<version>1.4</version>
|
|
<configuration>
|
|
<buildNumberPropertyName>build.revision</buildNumberPropertyName>
|
|
<revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>determine-build-number</id>
|
|
<goals>
|
|
<goal>create</goal>
|
|
</goals>
|
|
<phase>validate</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>license-maven-plugin</artifactId>
|
|
<version>2.0.0</version>
|
|
<configuration>
|
|
<includedLicenses>
|
|
<!-- The SPDX IDs of licenses of third-party
|
|
software that may be bundled as part of
|
|
non-distributed (i.e. Picnic-internal) deployable
|
|
artifacts (i.e. web services). -->
|
|
<includedLicense>Apache-2.0</includedLicense>
|
|
<includedLicense>BSD-3-Clause</includedLicense>
|
|
<includedLicense>CC0-1.0</includedLicense>
|
|
<includedLicense>CDDL-1.1</includedLicense>
|
|
<includedLicense>EPL-1.0</includedLicense>
|
|
<includedLicense>EPL-2.0</includedLicense>
|
|
<includedLicense>GPL-2.0-with-classpath-exception</includedLicense>
|
|
<includedLicense>LGPL-3.0+</includedLicense>
|
|
<includedLicense>MIT</includedLicense>
|
|
<includedLicense>Public Domain</includedLicense>
|
|
</includedLicenses>
|
|
<licenseMerges>
|
|
<!-- License aliases. Each section corresponds to a
|
|
single license; where applicable the license's SPDX
|
|
ID is listed first; the aliases that follow are (or
|
|
were) declared by one or more third-party
|
|
dependencies. -->
|
|
<licenseMerge>
|
|
<!-- -->
|
|
Apache-2.0
|
|
| Apache 2
|
|
| Apache 2.0
|
|
| Apache License 2.0
|
|
| Apache License, Version 2.0
|
|
| The Apache License, Version 2.0
|
|
| The Apache Software License, Version 2.0
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
BSD-3-Clause
|
|
| 3-Clause BSD License
|
|
| BSD 3-clause
|
|
| New BSD License
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
CC0-1.0
|
|
| CC0
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
CDDL-1.1
|
|
| CDDL 1.1
|
|
| Dual license consisting of the CDDL v1.1 and GPL v2
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
EPL-1.0
|
|
| Eclipse Public License 1.0
|
|
| Eclipse Public License - v 1.0
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
EPL-2.0
|
|
| Eclipse Public License v2.0
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
GPL-2.0-with-classpath-exception
|
|
| CDDL/GPLv2+CE
|
|
| GNU General Public License, version 2 (GPL2), with the classpath exception
|
|
| GNU General Public License, version 2, with the Classpath Exception
|
|
| GPL2 w/ CPE
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
LGPL-3.0+
|
|
| GNU Lesser Public License
|
|
</licenseMerge>
|
|
<licenseMerge>
|
|
<!-- -->
|
|
MIT
|
|
| MIT license
|
|
| MIT License
|
|
| The MIT License
|
|
</licenseMerge>
|
|
</licenseMerges>
|
|
<!-- Nearly no projects ship a "missing third party
|
|
licenses" file. Since the operation of attempting to
|
|
retrieve these files is very slow, we have decided to
|
|
disable this functionality at this time. -->
|
|
<useRepositoryMissingFiles>false</useRepositoryMissingFiles>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>tidy-maven-plugin</artifactId>
|
|
<version>1.1.0</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>versions-maven-plugin</artifactId>
|
|
<version>2.8.1</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.gaul</groupId>
|
|
<artifactId>modernizer-maven-plugin</artifactId>
|
|
<version>2.1.0</version>
|
|
<configuration>
|
|
<exclusionPatterns>
|
|
<!-- The plugin suggests replacing Guava's
|
|
immutable collection factory methods with
|
|
`java.util.{List,Map,Set}.{copyOf,of}`, but those
|
|
methods don't allow one to convey immutability at
|
|
the type system level. -->
|
|
<exclusionPattern>com/google/common/collect/Immutable(List|Map|Set)\.(copyOf|of):.*</exclusionPattern>
|
|
</exclusionPatterns>
|
|
<failOnViolations>false</failOnViolations>
|
|
<ignorePackages>
|
|
<!-- Some Refaster templates purposefully use
|
|
outdated patterns in their `@BeforeTemplate`
|
|
methods. -->
|
|
<ignorePackage>tech.picnic.errorprone.refastertemplates</ignorePackage>
|
|
</ignorePackages>
|
|
<javaVersion>${version.jdk}</javaVersion>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>modernize</id>
|
|
<goals>
|
|
<goal>modernizer</goal>
|
|
</goals>
|
|
<phase>process-test-classes</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>0.8.6</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.pitest</groupId>
|
|
<artifactId>pitest-maven</artifactId>
|
|
<version>1.6.2</version>
|
|
<configuration>
|
|
<!-- Use multple threads to speed things up. Extend
|
|
timeouts to prevent false positives as a result of
|
|
contention. -->
|
|
<threads>4</threads>
|
|
<timeoutFactor>4</timeoutFactor>
|
|
<timestampedReports>false</timestampedReports>
|
|
</configuration>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.pitest</groupId>
|
|
<artifactId>pitest-junit5-plugin</artifactId>
|
|
<version>0.12</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<executions>
|
|
<execution>
|
|
<id>compute-mutation-coverage</id>
|
|
<goals>
|
|
<goal>mutationCoverage</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
|
<artifactId>sonar-maven-plugin</artifactId>
|
|
<version>3.8.0.2131</version>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>error-prone-fork</id>
|
|
<properties>
|
|
<groupId.error-prone>com.github.PicnicSupermarket.error-prone</groupId.error-prone>
|
|
<version.error-prone>v2.4.0-picnic-3</version.error-prone>
|
|
</properties>
|
|
<dependencyManagement>
|
|
<!-- Even when we directly depend on the Picnic Error Prone
|
|
fork, some other dependencies depend on the official (i.e.,
|
|
non-forked) `error_prone_annotations`. Here we fix which
|
|
version is pulled in. -->
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.google.errorprone</groupId>
|
|
<artifactId>error_prone_annotations</artifactId>
|
|
<version>2.4.0</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
</profile>
|
|
<profile>
|
|
<!-- Error Prone checks which are not availabe from Maven Central;
|
|
these are therefore not enabled by default. -->
|
|
<id>non-maven-central</id>
|
|
<!-- XXX: Two other dependencies are potentially of interest:
|
|
`com.palantir.assertj-automation:assertj-refaster-rules` and
|
|
`com.palantir.baseline:baseline-refaster-rules` contain Refaster
|
|
rules which aren't currently applied. We should use
|
|
`RefasterRuleBuilderScanner` to convert those to `.refaster` files
|
|
so that we can pick them up. (But in case of
|
|
`baseline-refaster-rules` perhaps we can simply incorporate all of
|
|
them.) -->
|
|
<properties>
|
|
<version.palantir-assertj-automation>0.2.1</version.palantir-assertj-automation>
|
|
<version.palantir-baseline>3.63.3</version.palantir-baseline>
|
|
<version.reactor-error-prone>0.1.4</version.reactor-error-prone>
|
|
</properties>
|
|
<dependencyManagement>
|
|
<!-- All these dependencies are specified as a workaround for
|
|
https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.github.lhotari</groupId>
|
|
<artifactId>reactor-error-prone</artifactId>
|
|
<version>${version.reactor-error-prone}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.palantir.assertj-automation</groupId>
|
|
<artifactId>assertj-error-prone</artifactId>
|
|
<version>${version.palantir-assertj-automation}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.palantir.baseline</groupId>
|
|
<artifactId>baseline-error-prone</artifactId>
|
|
<version>${version.palantir-baseline}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths combine.children="append">
|
|
<path>
|
|
<groupId>com.github.lhotari</groupId>
|
|
<artifactId>reactor-error-prone</artifactId>
|
|
<version>${version.reactor-error-prone}</version>
|
|
</path>
|
|
<!-- XXX: Before enabling these checks we'll
|
|
need to resolve some violations. Some of the
|
|
checks will need to be disabled; check how to
|
|
best do this, given that this configuration is
|
|
defined in an optional profile.
|
|
<path>
|
|
<groupId>com.palantir.assertj-automation</groupId>
|
|
<artifactId>assertj-error-prone</artifactId>
|
|
<version>${version.palantir-assertj-automation}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>com.palantir.baseline</groupId>
|
|
<artifactId>baseline-error-prone</artifactId>
|
|
<version>${version.palantir-baseline}</version>
|
|
</path>
|
|
-->
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!-- By default we verify various aspects of a module and the
|
|
artifact(s) it produces. We define these checks in a profile so
|
|
that they can be disabled during development. See also the
|
|
`error-prone` profile defined below. -->
|
|
<id>build-checks</id>
|
|
<activation>
|
|
<property>
|
|
<name>!verification.skip</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.coveo</groupId>
|
|
<artifactId>fmt-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>check-source-format</id>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.ekryd.sortpom</groupId>
|
|
<artifactId>sortpom-maven-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.lewisd</groupId>
|
|
<artifactId>lint-maven-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>de.thetaphi</groupId>
|
|
<artifactId>forbiddenapis</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<compilerArgs combine.children="append">
|
|
<!-- We first enable all doclint checks and
|
|
then selectively disable a subset below. -->
|
|
<arg>-Xdoclint:all</arg>
|
|
<!-- We don't care about missing Javadoc
|
|
on non-public classes and members. -->
|
|
<arg>-Xdoclint:-missing/package</arg>
|
|
<!-- We first enable all lint checks and then
|
|
selectively disable a subset below. -->
|
|
<arg>-Xlint:all</arg>
|
|
<!-- The annotation processors do not handle
|
|
all annotations present on the classpath, and
|
|
javac complains about this. See
|
|
https://bugs.openjdk.java.net/browse/JDK-6999068. -->
|
|
<arg>-Xlint:-processing</arg>
|
|
</compilerArgs>
|
|
<showWarnings>true</showWarnings>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>default-testCompile</id>
|
|
<goals>
|
|
<goal>testCompile</goal>
|
|
</goals>
|
|
<phase>test-compile</phase>
|
|
<configuration>
|
|
<compilerArgs combine.children="append">
|
|
<!-- Test code doesn't require Javadoc. -->
|
|
<arg>-Xdoclint:-missing</arg>
|
|
</compilerArgs>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>analyze-dependencies</id>
|
|
<goals>
|
|
<goal>analyze-dep-mgt</goal>
|
|
<goal>analyze-duplicate</goal>
|
|
<goal>analyze-only</goal>
|
|
</goals>
|
|
<phase>process-test-classes</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>license-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>check-third-party-licenses</id>
|
|
<goals>
|
|
<goal>add-third-party</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.gaul</groupId>
|
|
<artifactId>modernizer-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!-- An extension of the `build-checks` profile which configures
|
|
Error Prone. This configuration is defined in a separate profile so
|
|
that it can be combined with the `patch` profile below, without
|
|
introducing the overhead of other build checks. -->
|
|
<id>error-prone</id>
|
|
<activation>
|
|
<property>
|
|
<name>!verification.skip</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths combine.children="append">
|
|
<path>
|
|
<groupId>${groupId.error-prone}</groupId>
|
|
<artifactId>error_prone_core</artifactId>
|
|
<version>${version.error-prone}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava-beta-checker</artifactId>
|
|
<version>${version.guava-beta-checker}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>com.jakewharton.nopen</groupId>
|
|
<artifactId>nopen-checker</artifactId>
|
|
<version>${version.nopen-checker}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>com.uber.nullaway</groupId>
|
|
<artifactId>nullaway</artifactId>
|
|
<version>${version.nullaway}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>jp.skypencil.errorprone.slf4j</groupId>
|
|
<artifactId>errorprone-slf4j</artifactId>
|
|
<version>${version.error-prone-slf4j}</version>
|
|
</path>
|
|
<path>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-errorprone</artifactId>
|
|
<version>${version.mockito}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
<compilerArgs combine.children="append">
|
|
<!-- Enable and configure Error Prone. -->
|
|
<arg>
|
|
-Xplugin:ErrorProne
|
|
<!-- We use a separate Maven profile to
|
|
raise all warnings as errors. This way one
|
|
can optionally collect all warnings without
|
|
failing the build on the first error
|
|
encountered. -->
|
|
-XepAllErrorsAsWarnings
|
|
<!-- We want to enable almost all Error
|
|
Prone bug pattern checkers, so we enable
|
|
all and then selectively deactivate some. -->
|
|
-XepAllDisabledChecksAsWarnings
|
|
<!-- We don't target Android. -->
|
|
-Xep:AndroidJdkLibsChecker:OFF
|
|
<!-- XXX: Enable this once we open-source
|
|
this library. -->
|
|
-Xep:BetaApi:OFF
|
|
<!-- We don't target JDK 7. -->
|
|
-Xep:Java7ApiChecker:OFF
|
|
<!-- Too many false positives for now. See
|
|
https://github.com/google/error-prone/issues/1610 and
|
|
https://github.com/google/error-prone/issues/1646. -->
|
|
-Xep:JdkObsolete:OFF
|
|
<!-- We don't target Android. -->
|
|
-Xep:StaticOrDefaultInterfaceMethod:OFF
|
|
-XepOpt:NullAway:AnnotatedPackages=tech.picnic
|
|
-XepOpt:NullAway:CheckOptionalEmptiness=true
|
|
<!-- Append additional custom arguments. -->
|
|
${error-prone.args}
|
|
</arg>
|
|
<!-- The Error Prone plugin makes certain
|
|
assumptions about the state of the AST at the
|
|
moment it is invoked. Those assumptions are met
|
|
when using the `simple` compile policy. This
|
|
flag may be dropped after resolution of
|
|
https://bugs.openjdk.java.net/browse/JDK-8155674. -->
|
|
<arg>-XDcompilePolicy=simple</arg>
|
|
</compilerArgs>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!-- If combined with the `error-prone` profile above, this profile
|
|
configures Error Prone to try and automatically fix (rather than
|
|
merely flag) bug pattern violations in the source code. -->
|
|
<id>patch</id>
|
|
<activation>
|
|
<property>
|
|
<name>error-prone.patch-checks</name>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<error-prone.args>-XepPatchChecks:${error-prone.patch-checks} -XepPatchLocation:IN_PLACE</error-prone.args>
|
|
</properties>
|
|
</profile>
|
|
<profile>
|
|
<!-- The `build-checks` and `error-prone` profiles enable a whole
|
|
bunch of additional compile checks. This profile ensures that by
|
|
default those warnings break the build. Disabling this profile
|
|
allows one to collect all build warnings without failing the build. -->
|
|
<id>disallow-warnings</id>
|
|
<activation>
|
|
<property>
|
|
<name>!verification.warn</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.github.ekryd.sortpom</groupId>
|
|
<artifactId>sortpom-maven-plugin</artifactId>
|
|
<configuration>
|
|
<verifyFail>stop</verifyFail>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.lewisd</groupId>
|
|
<artifactId>lint-maven-plugin</artifactId>
|
|
<configuration>
|
|
<failOnViolation>true</failOnViolation>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>de.thetaphi</groupId>
|
|
<artifactId>forbiddenapis</artifactId>
|
|
<configuration>
|
|
<failOnViolation>true</failOnViolation>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
<configuration>
|
|
<failOnViolation>true</failOnViolation>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<compilerArgs combine.children="append">
|
|
<!-- When using a JDK other than the one
|
|
specified using `-source`, `javac` warns
|
|
that the bootstrap classpath will not be
|
|
set. We don't want to fail on that warning. -->
|
|
<arg>-Xlint:-options</arg>
|
|
</compilerArgs>
|
|
<failOnWarning>true</failOnWarning>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<configuration>
|
|
<failBuild>true</failBuild>
|
|
<failOnWarning>true</failOnWarning>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<configuration>
|
|
<fail>true</fail>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>license-maven-plugin</artifactId>
|
|
<configuration>
|
|
<failOnBlacklist>true</failOnBlacklist>
|
|
<failOnMissing>true</failOnMissing>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.gaul</groupId>
|
|
<artifactId>modernizer-maven-plugin</artifactId>
|
|
<configuration>
|
|
<failOnViolations>true</failOnViolations>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!-- A counterpart to the `disallow-warnings` profile which
|
|
explicitly "tones down" plugins enabled by the `build-checks`
|
|
profile. Necessary for dealing with plugins that default to failing
|
|
the build upon encountering a violation. -->
|
|
<id>avoid-errors</id>
|
|
<activation>
|
|
<property>
|
|
<name>verification.warn</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.coveo</groupId>
|
|
<artifactId>fmt-maven-plugin</artifactId>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!-- Some code in this project interfaces directly with the Java
|
|
compiler. The following `add-exports` arguments are not necessary
|
|
for the code to compile because `com.google.errorprone:javac` is on
|
|
the classpath. In fact, enabling this profile when building with
|
|
Maven on the command line with cause a build failure, because these
|
|
flags are incompatible with the `release` flag. This profile exists
|
|
solely to be enabled within an IDE: without them IntelliJ IDEA
|
|
reports compilation errors. -->
|
|
<id>add-exports</id>
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<compilerArgs combine.children="append">
|
|
<arg>--add-exports</arg>
|
|
<arg>jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
|
|
<arg>--add-exports</arg>
|
|
<arg>jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
|
|
<arg>--add-exports</arg>
|
|
<arg>jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
|
|
<arg>--add-exports</arg>
|
|
<arg>jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
|
|
<arg>--add-exports</arg>
|
|
<arg>jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
|
|
</compilerArgs>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!-- This profile is auto-activated when performing a release. -->
|
|
<id>release</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
</plugin>
|
|
<!-- Lexicographically this plugin is listed out-of-order
|
|
because it must be executed after the
|
|
`maven-javadoc-plugin`; otherwise not all artifacts will be
|
|
signed. -->
|
|
<?SORTPOM IGNORE?>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-gpg-plugin</artifactId>
|
|
</plugin>
|
|
<?SORTPOM RESUME?>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|