Created
January 19, 2017 11:16
-
-
Save ydarias/2492834872f2c2224a7da6e453037f26 to your computer and use it in GitHub Desktop.
How to introduce Checker Framework in a Maven project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns="http://maven.apache.org/POM/4.0.0" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | |
| > | |
| <modelVersion>4.0.0</modelVersion> | |
| <prerequisites> | |
| <maven>${maven.version}</maven> | |
| </prerequisites> | |
| <groupId>com.torodb</groupId> | |
| <artifactId>torodb-pom</artifactId> | |
| <version>0.50.1-SNAPSHOT</version> | |
| <packaging>pom</packaging> | |
| <name>ToroDB: Parent</name> | |
| <description> | |
| ToroDB is an open source project that turns your RDBMS into a | |
| MongoDB-compatible server, supporting the MongoDB query API and | |
| MongoDB's replication, but storing your data into a reliable and trusted | |
| ACID database. ToroDB currently supports PostgreSQL as a backend, but | |
| others will be added in the future. | |
| ToroDB natively implements the MongoDB protocol, so you can use it with | |
| MongoDB tools and drivers, and features a document-to-relational mapping | |
| algorithm that transforms the JSON documents into relational tables. | |
| ToroDB also offers a native SQL layer and automatic data normalization | |
| and partitioning based on JSON documents' implicit schema. | |
| </description> | |
| <url>http://www.torodb.com</url> | |
| <inceptionYear>2014</inceptionYear> | |
| <organization> | |
| <name>8Kdata Technology</name> | |
| <url>www.8kdata.com</url> | |
| </organization> | |
| <licenses> | |
| <license> | |
| <name>GNU AFFERO GENERAL PUBLIC LICENSE, Version 3, 19 November 2007</name> | |
| <url>http://www.gnu.org/licenses/agpl-3.0-standalone.html</url> | |
| <distribution>repo</distribution> | |
| </license> | |
| <license> | |
| <name>Commercial License</name> | |
| <distribution>manual</distribution> | |
| <comments> | |
| Commercial licensing for use is available upon request. | |
| Please contact sales AT 8kdata DOT com | |
| </comments> | |
| </license> | |
| </licenses> | |
| <developers> | |
| <developer> | |
| <id>torodb.8kdata.com</id> | |
| <name>ToroDB Project Contributors</name> | |
| <email>[email protected]</email> | |
| <url>https://github.com/torodb/torodb</url> | |
| <organization>The ToroDB Project</organization> | |
| <organizationUrl>http://torodb.com</organizationUrl> | |
| </developer> | |
| </developers> | |
| <scm> | |
| <connection>scm:git:https://github.com/torodb/torodb.git</connection> | |
| <developerConnection>scm:git:[email protected]:torodb/torodb.git</developerConnection> | |
| <url>[email protected]:torodb/torodb.git</url> | |
| </scm> | |
| <issueManagement> | |
| <system>GitHub</system> | |
| <url>https://github.com/torodb/torodb/issues</url> | |
| </issueManagement> | |
| <properties> | |
| <java.version>1.8</java.version> | |
| <torodb.engine.version>0.50.1-SNAPSHOT</torodb.engine.version> | |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| <log4j.version>2.7</log4j.version> | |
| <jackson.version>2.6.3</jackson.version> | |
| <mongowp.version>0.50.1-SNAPSHOT</mongowp.version> | |
| <mongodriver.version>3.4.1</mongodriver.version> | |
| <jmh.version>1.17</jmh.version> | |
| <metrics.version>3.1.2</metrics.version> | |
| <maven.version>3.2.2</maven.version> | |
| <torodb.buildtools.version>0.50.1-SNAPSHOT</torodb.buildtools.version> | |
| <checker.framework.version>2.1.7</checker.framework.version> | |
| <license.header.file>com/torodb/buildtools/torodb-license.txt</license.header.file> | |
| <!-- SonarQube properties --> | |
| <sonar.projectName>ToroDB</sonar.projectName> | |
| <sonar.links.homepage>https://www.torodb.com/</sonar.links.homepage> | |
| <sonar.links.ci>https://travis-ci.org/torodb/torodb</sonar.links.ci> | |
| <sonar.links.scm>https://github.com/torodb/torodb</sonar.links.scm> | |
| <sonar.links.issue>https://github.com/torodb/torodb/issues</sonar.links.issue> | |
| <!-- Checkstyle properties--> | |
| <checkstyle.config.location>com/torodb/buildtools/checkstyle.xml</checkstyle.config.location> | |
| <checkstyle.consoleOutput>false</checkstyle.consoleOutput> | |
| </properties> | |
| <modules> | |
| <module>engine</module> | |
| <module>server</module> | |
| <module>stampede</module> | |
| <module>build-tools</module> | |
| </modules> | |
| <dependencyManagement> | |
| <dependencies> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp</groupId> | |
| <artifactId>mongowp-core</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.bson</groupId> | |
| <artifactId>bson-core</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.server</groupId> | |
| <artifactId>mongo-server-core</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.server</groupId> | |
| <artifactId>mongo-server-api</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.server</groupId> | |
| <artifactId>wp-layer</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.client</groupId> | |
| <artifactId>core</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.client</groupId> | |
| <artifactId>driver-wrapper</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.8kdata.mongowp.bson</groupId> | |
| <artifactId>org-bson-utils</artifactId> | |
| <version>${mongowp.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.logging.log4j</groupId> | |
| <artifactId>log4j-api</artifactId> | |
| <version>${log4j.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.logging.log4j</groupId> | |
| <artifactId>log4j-core</artifactId> | |
| <version>${log4j.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.logging.log4j</groupId> | |
| <artifactId>log4j-slf4j-impl</artifactId> | |
| <version>${log4j.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.logging.log4j</groupId> | |
| <artifactId>log4j-core</artifactId> | |
| <type>test-jar</type> | |
| <version>${log4j.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.guava</groupId> | |
| <artifactId>guava</artifactId> | |
| <version>20.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>javax.json</groupId> | |
| <artifactId>javax.json-api</artifactId> | |
| <version>1.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.glassfish</groupId> | |
| <artifactId>javax.json</artifactId> | |
| <version>1.0.4</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mongodb</groupId> | |
| <artifactId>mongodb-driver</artifactId> | |
| <version>${mongodriver.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mongodb</groupId> | |
| <artifactId>bson</artifactId> | |
| <version>${mongodriver.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>javax.inject</groupId> | |
| <artifactId>javax.inject</artifactId> | |
| <version>1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-configuration</groupId> | |
| <artifactId>commons-configuration</artifactId> | |
| <version>1.10</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.postgresql</groupId> | |
| <artifactId>postgresql</artifactId> | |
| <version>9.4.1212.jre7</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.jooq</groupId> | |
| <artifactId>jooq</artifactId> | |
| <version>3.8.6</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.jooq</groupId> | |
| <artifactId>jooq-meta</artifactId> | |
| <version>3.8.6</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.jooq</groupId> | |
| <artifactId>jool</artifactId> | |
| <version>0.9.12</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.zaxxer</groupId> | |
| <artifactId>HikariCP</artifactId> | |
| <version>2.5.1</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.slf4j</groupId> | |
| <artifactId>slf4j-api</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.inject</groupId> | |
| <artifactId>guice</artifactId> | |
| <version>4.1.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.inject.extensions</groupId> | |
| <artifactId>guice-assistedinject</artifactId> | |
| <version>4.1.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.beust</groupId> | |
| <artifactId>jcommander</artifactId> | |
| <version>1.58</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.core</groupId> | |
| <artifactId>jackson-annotations</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.dataformat</groupId> | |
| <artifactId>jackson-dataformat-yaml</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.dataformat</groupId> | |
| <artifactId>jackson-dataformat-xml</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.module</groupId> | |
| <artifactId>jackson-module-jsonSchema</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.codehaus.woodstox</groupId> | |
| <artifactId>woodstox-core-asl</artifactId> | |
| <version>4.4.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.github.fge</groupId> | |
| <artifactId>json-schema-validator</artifactId> | |
| <version>2.2.6</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>com.fasterxml.jackson.core</groupId> | |
| <artifactId>jackson-databind</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>javax.validation</groupId> | |
| <artifactId>validation-api</artifactId> | |
| <version>1.1.0.Final</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.hibernate</groupId> | |
| <artifactId>hibernate-validator</artifactId> | |
| <version>5.3.2.Final</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.glassfish</groupId> | |
| <artifactId>javax.el</artifactId> | |
| <version>3.0.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.derby</groupId> | |
| <artifactId>derbyclient</artifactId> | |
| <version>10.13.1.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.derby</groupId> | |
| <artifactId>derby</artifactId> | |
| <version>10.13.1.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.code.findbugs</groupId> | |
| <artifactId>jsr305</artifactId> | |
| <version>3.0.1</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.code.findbugs</groupId> | |
| <artifactId>annotations</artifactId> | |
| <version>3.0.1</version> | |
| <scope>provided</scope> | |
| <type>jar</type> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.reactivestreams</groupId> | |
| <artifactId>reactive-streams</artifactId> | |
| <version>1.0.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.scala-lang</groupId> | |
| <artifactId>scala-library</artifactId> | |
| <version>2.12.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.typesafe</groupId> | |
| <artifactId>config</artifactId> | |
| <version>1.3.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.typesafe.akka</groupId> | |
| <artifactId>akka-stream_2.12</artifactId> | |
| <version>2.4.16</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.typesafe.akka</groupId> | |
| <artifactId>akka-slf4j_2.12</artifactId> | |
| <version>2.4.16</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.slf4j</groupId> | |
| <artifactId>slf4j-api</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.checkerframework</groupId> | |
| <artifactId>checker-qual</artifactId> | |
| <version>${checker.framework.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>4.12</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.truth</groupId> | |
| <artifactId>truth</artifactId> | |
| <version>0.30</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.hamcrest</groupId> | |
| <artifactId>hamcrest-core</artifactId> | |
| <version>1.3</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mockito</groupId> | |
| <artifactId>mockito-core</artifactId> | |
| <version>2.2.25</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.dropwizard.metrics</groupId> | |
| <artifactId>metrics-core</artifactId> | |
| <version>${metrics.version}</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.slf4j</groupId> | |
| <artifactId>slf4j-api</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.dropwizard.metrics</groupId> | |
| <artifactId>metrics-jvm</artifactId> | |
| <version>${metrics.version}</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.slf4j</groupId> | |
| <artifactId>slf4j-api</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mpierce.metrics.reservoir</groupId> | |
| <artifactId>hdrhistogram-metrics-reservoir</artifactId> | |
| <version>1.1.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.openjdk.jmh</groupId> | |
| <artifactId>jmh-core</artifactId> | |
| <version>${jmh.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.openjdk.jmh</groupId> | |
| <artifactId>jmh-generator-annprocess</artifactId> | |
| <version>${jmh.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| </dependencies> | |
| </dependencyManagement> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-compiler-plugin</artifactId> | |
| <version>3.6.0</version> | |
| <configuration> | |
| <source>1.8</source> | |
| <target>1.8</target> | |
| <compilerArgument>-Xlint:all</compilerArgument> | |
| <showDeprecation>true</showDeprecation> | |
| <showWarnings>true</showWarnings> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-resources-plugin</artifactId> | |
| <version>3.0.1</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-surefire-plugin</artifactId> | |
| <version>2.19.1</version> | |
| <executions> | |
| <execution> | |
| <id>default-test</id> | |
| <phase>test</phase> | |
| <goals> | |
| <goal>test</goal> | |
| </goals> | |
| <configuration> | |
| <trimStackTrace>false</trimStackTrace> | |
| <excludes> | |
| <exclude>%regex[.*integration.*]</exclude> | |
| </excludes> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-enforcer-plugin</artifactId> | |
| <version>1.4.1</version> | |
| <executions> | |
| <execution> | |
| <id>enforce-maven</id> | |
| <goals> | |
| <goal>enforce</goal> | |
| </goals> | |
| <configuration> | |
| <rules> | |
| <requireMavenVersion> | |
| <version>${maven.version}</version> | |
| </requireMavenVersion> | |
| </rules> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <id>enforce-dependencies</id> | |
| <goals> | |
| <goal>enforce</goal> | |
| </goals> | |
| <configuration> | |
| <rules> | |
| <dependencyConvergence/> | |
| <requireReleaseDeps> | |
| <message>Artifacts must not depend on external snapshot!</message> | |
| <excludes> | |
| <exclude>com.8kdata*:*</exclude> | |
| <exclude>com.torodb*:*</exclude> | |
| </excludes> | |
| <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot> | |
| </requireReleaseDeps> | |
| </rules> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <id>enforce-dependencies-release</id> | |
| <goals> | |
| <goal>enforce</goal> | |
| </goals> | |
| <configuration> | |
| <rules> | |
| <requireReleaseDeps> | |
| <message>Release artifacts must not depend on any snapshot!</message> | |
| <onlyWhenRelease>true</onlyWhenRelease> | |
| </requireReleaseDeps> | |
| </rules> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>com.mycila</groupId> | |
| <artifactId>license-maven-plugin</artifactId> | |
| <version>3.0</version> | |
| <configuration> | |
| <header>${license.header.file}</header> | |
| <failIfMissing>true</failIfMissing> | |
| <properties> | |
| <project.name>ToroDB</project.name> | |
| <project.inceptionYear>2014</project.inceptionYear> | |
| <owner>${project.organization.name}</owner> | |
| <email>${project.organization.url}</email> | |
| </properties> | |
| <includes> | |
| <include>src/**/*.java</include> | |
| </includes> | |
| <mapping> | |
| <java>SLASHSTAR_STYLE</java> | |
| </mapping> | |
| <errorMessage>Some files do not have the expected license header. Run com.mycila:license-maven-plugin:format to update all file headers</errorMessage> | |
| </configuration> | |
| <executions> | |
| <execution> | |
| <id>check-license</id> | |
| <goals> | |
| <goal>check</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| <dependencies> | |
| <dependency> | |
| <groupId>com.torodb</groupId> | |
| <artifactId>build-tools</artifactId> | |
| <version>${torodb.buildtools.version}</version> | |
| </dependency> | |
| </dependencies> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-checkstyle-plugin</artifactId> | |
| <version>2.17</version> | |
| <executions> | |
| <execution> | |
| <id>validate</id> | |
| <configuration> | |
| <linkXRef>false</linkXRef> | |
| <violationSeverity>error</violationSeverity> | |
| </configuration> | |
| <goals> | |
| <goal>check</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| <dependencies> | |
| <dependency> | |
| <groupId>com.puppycrawl.tools</groupId> | |
| <artifactId>checkstyle</artifactId> | |
| <version>7.3</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.torodb</groupId> | |
| <artifactId>build-tools</artifactId> | |
| <version>${torodb.buildtools.version}</version> | |
| </dependency> | |
| </dependencies> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.jacoco</groupId> | |
| <artifactId>jacoco-maven-plugin</artifactId> | |
| <version>0.7.7.201606060606</version> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>prepare-agent</goal> | |
| </goals> | |
| </execution> | |
| <execution> | |
| <id>report</id> | |
| <phase>test</phase> | |
| <goals> | |
| <goal>report</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| <pluginManagement> | |
| <plugins> | |
| <plugin> | |
| <groupId>io.fabric8</groupId> | |
| <artifactId>docker-maven-plugin</artifactId> | |
| <version>0.18.1</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-jar-plugin</artifactId> | |
| <version>2.3.2</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-assembly-plugin</artifactId> | |
| <version>2.2-beta-5</version> | |
| </plugin> | |
| </plugins> | |
| </pluginManagement> | |
| </build> | |
| <profiles> | |
| <profile> | |
| <id>safer</id> <!-- Slower but safer profile used to look for errors before pushing to SCM --> | |
| <dependencies> | |
| <dependency> | |
| <groupId>org.checkerframework</groupId> | |
| <artifactId>checker</artifactId> | |
| <version>${checker.framework.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.checkerframework</groupId> | |
| <artifactId>jdk8</artifactId> | |
| <version>${checker.framework.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| </dependencies> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>findbugs-maven-plugin</artifactId> | |
| <version>3.0.4</version> | |
| <configuration> | |
| <effort>Max</effort> | |
| <threshold>Low</threshold> | |
| <xmlOutput>true</xmlOutput> | |
| <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory> | |
| </configuration> | |
| <executions> | |
| <execution> | |
| <id>analyze-compile</id> | |
| <goals> | |
| <goal>check</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-dependency-plugin</artifactId> | |
| <version>2.10</version> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>properties</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-compiler-plugin</artifactId> | |
| <version>3.3</version> | |
| <configuration> | |
| <source>${java.version}</source> | |
| <target>${java.version}</target> | |
| <annotationProcessors> | |
| <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor> | |
| </annotationProcessors> | |
| <compilerArgs> | |
| <arg>-Xbootclasspath/p:${org.checkerframework:jdk8:jar}</arg> | |
| </compilerArgs> | |
| </configuration> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </profile> | |
| <profile> | |
| <id>sign</id> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-gpg-plugin</artifactId> | |
| <version>1.6</version> | |
| <executions> | |
| <execution> | |
| <id>sign-artifacts</id> | |
| <phase>verify</phase> | |
| <goals> | |
| <goal>sign</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </profile> | |
| <profile> | |
| <id>integration</id> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-surefire-plugin</artifactId> | |
| <version>2.19.1</version> | |
| <executions> | |
| <execution> | |
| <id>integration-tests</id> | |
| <phase>integration-test</phase> | |
| <goals> | |
| <goal>test</goal> | |
| </goals> | |
| <configuration> | |
| <trimStackTrace>false</trimStackTrace> | |
| <skip>false</skip> | |
| <includes> | |
| <include>%regex[.*integration.*]</include> | |
| </includes> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-failsafe-plugin</artifactId> | |
| <version>2.19.1</version> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>integration-test</goal> | |
| <goal>verify</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>build-helper-maven-plugin</artifactId> | |
| <version>1.12</version> | |
| <executions> | |
| <execution> | |
| <id>add-test-source</id> | |
| <phase>generate-test-sources</phase> | |
| <goals> | |
| <goal>add-test-source</goal> | |
| </goals> | |
| <configuration> | |
| <sources> | |
| <source>src/test-integration/java</source> | |
| </sources> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </profile> | |
| <profile> | |
| <id>master-branch</id> | |
| <activation> | |
| <property> <!-- Used by Travis to modify the execution by branch --> | |
| <name>env.GIT_BRANCH</name> | |
| <value>master</value> | |
| </property> | |
| </activation> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-enforcer-plugin</artifactId> | |
| <version>1.4.1</version> | |
| <executions> | |
| <execution> | |
| <id>enforce-release</id> | |
| <goals> | |
| <goal>enforce</goal> | |
| </goals> | |
| <configuration> | |
| <rules> | |
| <requireReleaseVersion> | |
| <message>Artifacts on master branch must not be snapshot!</message> | |
| </requireReleaseVersion> | |
| </rules> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </profile> | |
| </profiles> | |
| <repositories> | |
| <repository> | |
| <id>OSSRH</id> | |
| <url>https://oss.sonatype.org/content/groups/public</url> | |
| <snapshots> | |
| <enabled>true</enabled> | |
| </snapshots> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| </repository> | |
| </repositories> | |
| <distributionManagement> | |
| <snapshotRepository> | |
| <id>ossrh-snapshot</id> | |
| <name>OSSRH Snapshot repository</name> | |
| <url>https://oss.sonatype.org/content/repositories/snapshots</url> | |
| </snapshotRepository> | |
| <repository> | |
| <id>ossrh-release</id> | |
| <name>OSSRH Release repository</name> | |
| <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> | |
| </repository> | |
| </distributionManagement> | |
| </project> |
Yeah, there seems to be way more going on here than just using the checker framework. I'd appreciate at least an explanation of what's going on, and why. :/
Author
@erikv85 @Angular-Angel I am really sorry you feel that it isn't useful, but this is just a Gist I did in the past to remember during the project, not learning material. The intention wasn't to teach anyone how to do that, it is a working POM though.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Contains so much more than "How to introduce Checker Framework" that it's not useful.