|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | + <modelVersion>4.0.0</modelVersion> |
| 5 | + |
| 6 | + <groupId>engineering.swat</groupId> |
| 7 | + <artifactId>java-watch</artifactId> |
| 8 | + <version>0.0.1-SNAPSHOT</version> |
| 9 | + <packaging>jar</packaging> |
| 10 | + |
| 11 | + <properties> |
| 12 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 13 | + <checkerframework.version>3.42.0</checkerframework.version> |
| 14 | + <junit.version>5.10.2</junit.version> |
| 15 | + <log4j.version>2.23.0</log4j.version> |
| 16 | + <maven.compiler.source>11</maven.compiler.source> |
| 17 | + <maven.compiler.target>11</maven.compiler.target> |
| 18 | + </properties> |
| 19 | + |
| 20 | + <build> |
| 21 | + <plugins> |
| 22 | + <plugin> |
| 23 | + <groupId>org.apache.maven.plugins</groupId> |
| 24 | + <artifactId>maven-compiler-plugin</artifactId> |
| 25 | + <version>3.10.1</version> |
| 26 | + <configuration> |
| 27 | + <release>11</release> |
| 28 | + <compilerArgument>-parameters</compilerArgument> |
| 29 | + </configuration> |
| 30 | + </plugin> |
| 31 | + <plugin> |
| 32 | + <groupId>org.apache.maven.plugins</groupId> |
| 33 | + <artifactId>maven-source-plugin</artifactId> |
| 34 | + <version>3.2.1</version> |
| 35 | + <executions> |
| 36 | + <execution> |
| 37 | + <id>attach-sources</id> |
| 38 | + <goals> |
| 39 | + <goal>jar</goal> |
| 40 | + </goals> |
| 41 | + </execution> |
| 42 | + </executions> |
| 43 | + </plugin> |
| 44 | + <plugin> |
| 45 | + <groupId>org.apache.maven.plugins</groupId> |
| 46 | + <artifactId>maven-release-plugin</artifactId> |
| 47 | + <configuration> |
| 48 | + <tagNameFormat>v@{project.version}</tagNameFormat> |
| 49 | + </configuration> |
| 50 | + </plugin> |
| 51 | + <plugin> |
| 52 | + <groupId>org.apache.maven.plugins</groupId> |
| 53 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 54 | + <version>3.4.0</version> |
| 55 | + <configuration> |
| 56 | + <additionalparam>-Xdoclint:none</additionalparam> |
| 57 | + </configuration> |
| 58 | + </plugin> |
| 59 | + <plugin> |
| 60 | + <groupId>org.apache.maven.plugins</groupId> |
| 61 | + <artifactId>maven-surefire-plugin</artifactId> |
| 62 | + <version>2.22.2</version> |
| 63 | + </plugin> |
| 64 | + <plugin> |
| 65 | + <groupId>org.jacoco</groupId> |
| 66 | + <artifactId>jacoco-maven-plugin</artifactId> |
| 67 | + <version>0.8.8</version> |
| 68 | + <executions> |
| 69 | + <execution> |
| 70 | + <goals> |
| 71 | + <goal>prepare-agent</goal> |
| 72 | + </goals> |
| 73 | + </execution> |
| 74 | + <execution> |
| 75 | + <id>report</id> |
| 76 | + <phase>test</phase> |
| 77 | + <goals> |
| 78 | + <goal>report</goal> |
| 79 | + </goals> |
| 80 | + </execution> |
| 81 | + </executions> |
| 82 | + </plugin> |
| 83 | + </plugins> |
| 84 | + </build> |
| 85 | + |
| 86 | + <dependencies> |
| 87 | + <dependency> |
| 88 | + <groupId>org.junit.jupiter</groupId> |
| 89 | + <artifactId>junit-jupiter-engine</artifactId> |
| 90 | + <version>${junit.version}</version> |
| 91 | + <scope>test</scope> |
| 92 | + </dependency> |
| 93 | + <dependency> |
| 94 | + <groupId>org.junit.jupiter</groupId> |
| 95 | + <artifactId>junit-jupiter-params</artifactId> |
| 96 | + <version>${junit.version}</version> |
| 97 | + <scope>test</scope> |
| 98 | + </dependency> |
| 99 | + <dependency> |
| 100 | + <groupId>org.awaitility</groupId> |
| 101 | + <artifactId>awaitility</artifactId> |
| 102 | + <version>4.2.2</version> |
| 103 | + <scope>test</scope> |
| 104 | + </dependency> |
| 105 | + <dependency> |
| 106 | + <groupId>org.checkerframework</groupId> |
| 107 | + <artifactId>checker-qual</artifactId> |
| 108 | + <version>${checkerframework.version}</version> |
| 109 | + </dependency> |
| 110 | + <dependency> |
| 111 | + <groupId>org.apache.logging.log4j</groupId> |
| 112 | + <artifactId>log4j-api</artifactId> |
| 113 | + <version>${log4j.version}</version> |
| 114 | + </dependency> |
| 115 | + <dependency> |
| 116 | + <groupId>org.apache.logging.log4j</groupId> |
| 117 | + <artifactId>log4j-core</artifactId> |
| 118 | + <version>${log4j.version}</version> |
| 119 | + </dependency> |
| 120 | + </dependencies> |
| 121 | + |
| 122 | + <profiles> |
| 123 | + <profile> <!-- run with: mvn clean compile -P checker-framework --> |
| 124 | + <id>checker-framework</id> |
| 125 | + <build> |
| 126 | + <plugins> |
| 127 | + <plugin> |
| 128 | + <!-- This plugin will set properties values using dependency information --> |
| 129 | + <groupId>org.apache.maven.plugins</groupId> |
| 130 | + <artifactId>maven-dependency-plugin</artifactId> |
| 131 | + <executions> |
| 132 | + <execution> |
| 133 | + <goals> |
| 134 | + <goal>properties</goal> |
| 135 | + </goals> |
| 136 | + </execution> |
| 137 | + </executions> |
| 138 | + </plugin> |
| 139 | + <plugin> |
| 140 | + <groupId>org.apache.maven.plugins</groupId> |
| 141 | + <artifactId>maven-compiler-plugin</artifactId> |
| 142 | + <version>3.10.1</version> |
| 143 | + <configuration> |
| 144 | + <fork>true</fork> |
| 145 | + <release>11</release> |
| 146 | + <compilerArgs> |
| 147 | + <arg>-Xmaxerrs</arg> |
| 148 | + <arg>10000</arg> |
| 149 | + <arg>-Xmaxwarns</arg> |
| 150 | + <arg>10000</arg> |
| 151 | + <!-- we have to open up the jdk modules for checker framework to work. note if we get a modules.java this has to change--> |
| 152 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg> |
| 153 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg> |
| 154 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg> |
| 155 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg> |
| 156 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg> |
| 157 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg> |
| 158 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg> |
| 159 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg> |
| 160 | + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg> |
| 161 | + <arg>-Astubs=src/main/checkerframework</arg> |
| 162 | + </compilerArgs> |
| 163 | + <annotationProcessorPaths> |
| 164 | + <path> |
| 165 | + <groupId>org.checkerframework</groupId> |
| 166 | + <artifactId>checker</artifactId> |
| 167 | + <version>${checkerframework.version}</version> |
| 168 | + </path> |
| 169 | + </annotationProcessorPaths> |
| 170 | + <annotationProcessors> |
| 171 | + <!-- Add all the checkers you want to enable here --> |
| 172 | + <annotationProcessor> |
| 173 | + org.checkerframework.checker.nullness.NullnessChecker |
| 174 | + </annotationProcessor> |
| 175 | + </annotationProcessors> |
| 176 | + </configuration> |
| 177 | + </plugin> |
| 178 | + </plugins> |
| 179 | + </build> |
| 180 | + |
| 181 | + <dependencies> |
| 182 | + <dependency> |
| 183 | + <groupId>org.checkerframework</groupId> |
| 184 | + <artifactId>checker</artifactId> |
| 185 | + <version>${checkerframework.version}</version> |
| 186 | + <scope>provided</scope> |
| 187 | + </dependency> |
| 188 | + </dependencies> |
| 189 | + |
| 190 | + </profile> |
| 191 | + </profiles> |
| 192 | +</project> |
0 commit comments