|
38 | 38 |
|
39 | 39 | <build>
|
40 | 40 | <plugins>
|
41 |
| - <!-- Compile --> |
42 | 41 | <plugin>
|
43 | 42 | <groupId>org.apache.maven.plugins</groupId>
|
44 | 43 | <artifactId>maven-compiler-plugin</artifactId>
|
45 | 44 | <version>3.13.0</version>
|
46 | 45 | <configuration>
|
47 | 46 | <encoding>UTF-8</encoding>
|
| 47 | + <useIncrementalCompilation>false</useIncrementalCompilation> |
48 | 48 | <compilerArgs>
|
49 |
| - <!-- saves output for package-info.java, so mvn sees it has completed it, so incremental compile works --> |
50 | 49 | <arg>-Xpkginfo:always</arg>
|
51 | 50 | </compilerArgs>
|
52 |
| - <!-- this means incremental = true... --> |
53 |
| - <useIncrementalCompilation>false</useIncrementalCompilation> |
54 | 51 | </configuration>
|
55 | 52 | <executions>
|
| 53 | + <!-- Disable the default compile, so the profiles activated below execute --> |
56 | 54 | <execution>
|
57 |
| - <id>compile-java-8</id> |
58 |
| - <configuration> |
59 |
| - <source>1.8</source> |
60 |
| - <target>1.8</target> |
61 |
| - </configuration> |
| 55 | + <id>default-compile</id> |
| 56 | + <phase>none</phase> |
| 57 | + </execution> |
| 58 | + <execution> |
| 59 | + <id>default-testCompile</id> |
| 60 | + <phase>none</phase> |
62 | 61 | </execution>
|
63 |
| - <!-- There is a JDK 9+ profile execution below, which adds multi-release=true and compiles module-info --> |
64 | 62 | </executions>
|
65 | 63 | </plugin>
|
66 | 64 |
|
|
83 | 81 | <version>1.0</version>
|
84 | 82 | </signature>
|
85 | 83 | <ignores>
|
86 |
| - <ignore>java.nio.ByteBuffer</ignore> <!-- .flip(); added in API1; possibly due to .flip previously returning Buffer, later ByteBuffer; return unused --> |
87 | 84 | <ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
|
88 | 85 | </ignores>
|
89 | 86 | </configuration>
|
|
292 | 289 | <excludes>
|
293 | 290 | <!-- <exclude>@java.lang.Deprecated</exclude> -->
|
294 | 291 | <exclude>org.jsoup.UncheckedIOException</exclude>
|
295 |
| - <exlude>org.jsoup.nodes.Element</exlude> <!-- forEach previously deprecated --> |
| 292 | + <exclude>org.jsoup.nodes.Element</exclude> <!-- forEach previously deprecated --> |
296 | 293 | </excludes>
|
297 | 294 | <overrideCompatibilityChangeParameters>
|
298 | 295 | <!-- allows new default and move to default methods. compatible as long as existing binaries aren't making calls via reflection. if so, they need to catch errors anyway. -->
|
|
345 | 342 | </distributionManagement>
|
346 | 343 |
|
347 | 344 | <profiles>
|
| 345 | + <!-- Profile for Java 8 --> |
| 346 | + <profile> |
| 347 | + <id>java-8</id> |
| 348 | + <activation> |
| 349 | + <jdk>1.8</jdk> |
| 350 | + </activation> |
| 351 | + <build> |
| 352 | + <plugins> |
| 353 | + <plugin> |
| 354 | + <groupId>org.apache.maven.plugins</groupId> |
| 355 | + <artifactId>maven-compiler-plugin</artifactId> |
| 356 | + <executions> |
| 357 | + <execution> |
| 358 | + <id>compile</id> |
| 359 | + <phase>compile</phase> |
| 360 | + <goals> |
| 361 | + <goal>compile</goal> |
| 362 | + <goal>testCompile</goal> |
| 363 | + </goals> |
| 364 | + <configuration> |
| 365 | + <source>1.8</source> |
| 366 | + <target>1.8</target> |
| 367 | + </configuration> |
| 368 | + </execution> |
| 369 | + </executions> |
| 370 | + </plugin> |
| 371 | + </plugins> |
| 372 | + </build> |
| 373 | + </profile> |
| 374 | + |
348 | 375 | <!-- Compiles the multi-release jar when executed on JDK9+ -->
|
349 | 376 | <profile>
|
350 | 377 | <id>compile-multi-release</id>
|
|
357 | 384 | <groupId>org.apache.maven.plugins</groupId>
|
358 | 385 | <artifactId>maven-compiler-plugin</artifactId>
|
359 | 386 | <executions>
|
| 387 | + |
360 | 388 | <execution>
|
361 | 389 | <id>compile-java-8</id>
|
| 390 | + <phase>compile</phase> |
| 391 | + <goals> |
| 392 | + <goal>compile</goal> |
| 393 | + <goal>testCompile</goal> |
| 394 | + </goals> |
362 | 395 | <configuration>
|
363 | 396 | <release>8</release>
|
364 | 397 | </configuration>
|
365 | 398 | </execution>
|
| 399 | + |
366 | 400 | <execution>
|
367 | 401 | <id>compile-java-9</id>
|
368 | 402 | <phase>compile</phase>
|
|
377 | 411 | <multiReleaseOutput>true</multiReleaseOutput>
|
378 | 412 | </configuration>
|
379 | 413 | </execution>
|
| 414 | + |
380 | 415 | </executions>
|
381 | 416 | </plugin>
|
382 | 417 | </plugins>
|
|
0 commit comments