java-tutorials/checker-plugin/pom.xml

115 lines
4.9 KiB
XML

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>checker-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>checker-plugin</name>
<url>http://maven.apache.org</url>
<!-- https://checkerframework.org/manual/#maven -->
<properties>
<!-- These properties will be set by the Maven Dependency plugin -->
<annotatedJdk>${org.checkerframework:jdk8:jar}</annotatedJdk>
<!-- Uncomment to use the Type Annotations compiler. -->
<!--
<typeAnnotationsJavac>${org.checkerframework:compiler:jar}</typeAnnotationsJavac>
-->
</properties>
<dependencies>
<!-- Annotations from the Checker Framework: nullness, interning, locking, ... -->
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>jdk8</artifactId>
<version>2.3.1</version>
</dependency>
<!-- The Type Annotations compiler. Uncomment if using annotations in comments. -->
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>compiler</artifactId>
<version>2.3.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- This plugin will set properties values using dependency information -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<goals>
<!--
Goal that sets a property pointing to the artifact file for each project dependency.
For each dependency (direct and transitive) a project property will be set which
follows the:
groupId:artifactId:type:[classifier]
form and contains the path to the resolved artifact. -->
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!-- Uncomment the following line to use the type annotations compiler. -->
<!-- <fork>true</fork> -->
<compilerArguments>
<Xmaxerrs>10000</Xmaxerrs>
<Xmaxwarns>10000</Xmaxwarns>
</compilerArguments>
<annotationProcessors>
<!-- Add all the checkers you want to enable here -->
<annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
<annotationProcessor>org.checkerframework.checker.interning.InterningChecker</annotationProcessor>
<annotationProcessor>org.checkerframework.checker.fenum.FenumChecker</annotationProcessor>
<annotationProcessor>org.checkerframework.checker.formatter.FormatterChecker</annotationProcessor>
<annotationProcessor>org.checkerframework.checker.regex.RegexChecker</annotationProcessor>
</annotationProcessors>
<compilerArgs>
<arg>-AprintErrorStack</arg>
<!-- location of the annotated JDK, which comes from a Maven dependency -->
<arg>-Xbootclasspath/p:${annotatedJdk}</arg>
<!--
-->
<!-- Uncomment the following line to use the type annotations compiler. -->
<!--
<arg>-J-Xbootclasspath/p:${typeAnnotationsJavac}</arg>
-->
<!-- Uncomment the following line to turn type-checking warnings into errors. -->
<arg>-Awarns</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>