|
22 | 22 | <parent> |
23 | 23 | <groupId>io.github.ascopes.jct</groupId> |
24 | 24 | <artifactId>java-compiler-testing-parent</artifactId> |
25 | | - <version>6.0.2-SNAPSHOT</version> |
| 25 | + <version>7.0.0-SNAPSHOT</version> |
26 | 26 | <relativePath>../pom.xml</relativePath> |
27 | 27 | </parent> |
28 | 28 |
|
|
115 | 115 | <groupId>org.apache.maven.plugins</groupId> |
116 | 116 | <artifactId>maven-compiler-plugin</artifactId> |
117 | 117 | <configuration> |
118 | | - <annotationProcessorPaths combine.children="append" /> |
119 | | - <compilerArgs combine.children="append"> |
| 118 | + <annotationProcessorPaths> |
| 119 | + <annotationProcessorPath> |
| 120 | + <groupId>com.google.errorprone</groupId> |
| 121 | + <artifactId>error_prone_core</artifactId> |
| 122 | + <version>${errorprone.version}</version> |
| 123 | + </annotationProcessorPath> |
| 124 | + <annotationProcessorPath> |
| 125 | + <!-- Override what Maven is pulling in. This is fine during compilation as our |
| 126 | + code doesn't use Guava at all. This is needed for ErrorProne to not crash |
| 127 | + on startup. --> |
| 128 | + <groupId>com.google.guava</groupId> |
| 129 | + <artifactId>guava</artifactId> |
| 130 | + <version>[33,)</version> |
| 131 | + </annotationProcessorPath> |
| 132 | + <annotationProcessorPath> |
| 133 | + <groupId>com.uber.nullaway</groupId> |
| 134 | + <artifactId>nullaway</artifactId> |
| 135 | + <version>${nullaway.version}</version> |
| 136 | + </annotationProcessorPath> |
| 137 | + </annotationProcessorPaths> |
| 138 | + |
| 139 | + <compilerArgs> |
120 | 140 | <!-- |
121 | 141 | Disable warnings about modules. We cannot do much about some of these due to how Maven |
122 | 142 | works with modules with Surefire. |
123 | 143 | --> |
124 | 144 | <arg>-Xlint:-module</arg> |
| 145 | + <!-- ErrorProne configuration --> |
| 146 | + <compilerArg>--should-stop=ifError=FLOW</compilerArg> |
| 147 | + <compilerArg> |
| 148 | + -Xplugin:ErrorProne |
| 149 | + -XepDisableWarningsInGeneratedCode |
| 150 | + -XepExcludedPaths:.*/target/generated.*?/.* |
| 151 | + -XepOpt:NullAway:AnnotatedPackages=io.github.ascopes.jct |
| 152 | + <!-- See https://github.com/uber/NullAway/issues/1319 --> |
| 153 | + -XepOpt:NullAway:ExcludedFieldAnnotations=org.junit.jupiter.*,org.mockito.* |
| 154 | + -XepOpt:NullAway:KnownInitializers=io.github.ascopes.jct.annotations.Initializer,io.github.ascopes.jct.junit.Managed |
| 155 | + </compilerArg> |
| 156 | + <!-- Needed for ErrorProne to be able to run --> |
| 157 | + <compilerArg>-XDaddTypeAnnotationsToSymbol=true</compilerArg> |
| 158 | + <compilerArg>-XDcompilePolicy=simple</compilerArg> |
125 | 159 | </compilerArgs> |
126 | 160 | </configuration> |
127 | 161 | </plugin> |
|
232 | 266 | <artifactId>maven-compiler-plugin</artifactId> |
233 | 267 |
|
234 | 268 | <configuration> |
235 | | - <annotationProcessorPaths> |
236 | | - <annotationProcessorPath> |
237 | | - <groupId>com.google.errorprone</groupId> |
238 | | - <artifactId>error_prone_core</artifactId> |
239 | | - <version>${errorprone.version}</version> |
240 | | - </annotationProcessorPath> |
241 | | - <annotationProcessorPath> |
242 | | - <!-- Override what Maven is pulling in. This is fine during compilation as our |
243 | | - code doesn't use Guava at all. This is needed for ErrorProne to not crash |
244 | | - on startup. --> |
245 | | - <groupId>com.google.guava</groupId> |
246 | | - <artifactId>guava</artifactId> |
247 | | - <version>[33,)</version> |
248 | | - </annotationProcessorPath> |
249 | | - <annotationProcessorPath> |
250 | | - <groupId>com.uber.nullaway</groupId> |
251 | | - <artifactId>nullaway</artifactId> |
252 | | - <version>${nullaway.version}</version> |
253 | | - </annotationProcessorPath> |
254 | | - </annotationProcessorPaths> |
255 | | - |
256 | | - <compilerArgs> |
257 | | - <!-- |
258 | | - Disable warnings about modules. We cannot do much about some of these due to how Maven |
259 | | - works with modules with Surefire. |
260 | | - --> |
261 | | - <arg>-Xlint:-module</arg> |
262 | | - <!-- ErrorProne configuration --> |
263 | | - <compilerArg>--should-stop=ifError=FLOW</compilerArg> |
264 | | - <compilerArg> |
265 | | - -Xplugin:ErrorProne |
266 | | - -XepDisableWarningsInGeneratedCode |
267 | | - -XepExcludedPaths:.*/target/generated.*?/.* |
268 | | - -XepOpt:NullAway:AnnotatedPackages=io.github.ascopes.jct |
269 | | - <!-- See https://github.com/uber/NullAway/issues/1319 --> |
270 | | - -XepOpt:NullAway:ExcludedFieldAnnotations=org.junit.jupiter.*,org.mockito.* |
271 | | - -XepOpt:NullAway:KnownInitializers=io.github.ascopes.jct.annotations.Initializer,io.github.ascopes.jct.junit.Managed |
272 | | - </compilerArg> |
273 | | - <!-- Needed for ErrorProne to be able to run --> |
274 | | - <compilerArg>-XDaddTypeAnnotationsToSymbol=true</compilerArg> |
275 | | - <compilerArg>-XDcompilePolicy=simple</compilerArg> |
276 | | - </compilerArgs> |
277 | 269 | </configuration> |
278 | 270 | </plugin> |
279 | 271 | </plugins> |
|
0 commit comments