|
45 | 45 |
|
46 | 46 | <properties> |
47 | 47 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 48 | + <build.jdk>17</build.jdk> |
48 | 49 | <target.jdk>8</target.jdk> |
49 | 50 |
|
50 | 51 | <org.junit.version>5.8.2</org.junit.version> |
51 | | - <mockito.version>4.1.0</mockito.version> |
52 | | - <slf4j.version>1.7.32</slf4j.version> |
| 52 | + <mockito.version>4.2.0</mockito.version> |
| 53 | + <slf4j.version>1.7.33</slf4j.version> |
53 | 54 | <lombok.version>1.18.22</lombok.version> |
54 | 55 | <jna.version>5.9.0</jna.version> |
55 | 56 | <bouncycastle.version>1.69</bouncycastle.version> |
56 | | - <vertx.version>4.2.1</vertx.version> |
| 57 | + <vertx.version>4.2.2</vertx.version> |
57 | 58 |
|
58 | 59 | <sonar.projectKey>dnsjava_dnsjava</sonar.projectKey> |
59 | 60 | <sonar.organization>dnsjava</sonar.organization> |
|
89 | 90 | <plugin> |
90 | 91 | <groupId>org.apache.maven.plugins</groupId> |
91 | 92 | <artifactId>maven-compiler-plugin</artifactId> |
92 | | - <version>3.8.1</version> |
| 93 | + <version>3.9.0</version> |
93 | 94 | <configuration> |
94 | | - <compilerArgument>-Xlint:unchecked</compilerArgument> |
| 95 | + <release>${build.jdk}</release> |
| 96 | + <compilerArgument>-Xlint:all</compilerArgument> |
95 | 97 | <annotationProcessorPaths> |
96 | 98 | <path> |
97 | 99 | <groupId>org.projectlombok</groupId> |
|
100 | 102 | </path> |
101 | 103 | </annotationProcessorPaths> |
102 | 104 | </configuration> |
| 105 | + <executions> |
| 106 | + <!-- Compile Java 9+ stuff --> |
| 107 | + <execution> |
| 108 | + <id>default-compile</id> |
| 109 | + <configuration> |
| 110 | + <release>${build.jdk}</release> |
| 111 | + <includes> |
| 112 | + <include>module-info.java</include> |
| 113 | + </includes> |
| 114 | + </configuration> |
| 115 | + </execution> |
| 116 | + |
| 117 | + <!-- Compile everything else for Java 8 --> |
| 118 | + <execution> |
| 119 | + <id>base-compile</id> |
| 120 | + <goals> |
| 121 | + <goal>compile</goal> |
| 122 | + </goals> |
| 123 | + <configuration> |
| 124 | + <release>${target.jdk}</release> |
| 125 | + <excludes> |
| 126 | + <exclude>module-info.java</exclude> |
| 127 | + </excludes> |
| 128 | + </configuration> |
| 129 | + </execution> |
| 130 | + </executions> |
103 | 131 | </plugin> |
104 | 132 |
|
105 | 133 | <plugin> |
|
111 | 139 | <plugin> |
112 | 140 | <groupId>org.apache.felix</groupId> |
113 | 141 | <artifactId>maven-bundle-plugin</artifactId> |
114 | | - <version>5.1.2</version> |
| 142 | + <version>5.1.4</version> |
115 | 143 | <extensions>true</extensions> |
116 | 144 | <configuration> |
| 145 | + <niceManifest>true</niceManifest> |
| 146 | + <excludeDependencies>lombok</excludeDependencies> |
117 | 147 | <instructions> |
118 | 148 | <Bundle-Name>dnsjava is an implementation of DNS in Java</Bundle-Name> |
119 | 149 | <Bundle-SymbolicName>org.xbill.dns</Bundle-SymbolicName> |
120 | | - <Automatic-Module-Name>org.dnsjava</Automatic-Module-Name> |
| 150 | + <Bundle-DocURL>https://javadoc.io/doc/dnsjava/dnsjava</Bundle-DocURL> |
121 | 151 | <_noclassforname>true</_noclassforname> |
| 152 | + <_donotcopy>android|sun</_donotcopy> |
| 153 | + <_nouses>true</_nouses> |
122 | 154 | <Export-Package> |
| 155 | + !org.xbill.DNS.spi, |
123 | 156 | org.xbill.DNS.* |
124 | 157 | </Export-Package> |
| 158 | + <Private-Package>!android.*,!sun.*,.</Private-Package> |
125 | 159 | <Import-Package> |
126 | 160 | !org.xbill.DNS*, |
127 | 161 | !sun.*, |
128 | 162 | !lombok, |
129 | | - android.*;resolution:=optional, |
| 163 | + android.content;resolution:=optional, |
| 164 | + android.net;resolution:=optional, |
130 | 165 | javax.naming.*;resolution:=optional, |
131 | | - com.sun.jna.*;resolution:=optional, |
| 166 | + com.sun.jna.*;resolution:=optional;version="[5,6)", |
132 | 167 | * |
133 | 168 | </Import-Package> |
134 | | - <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment> |
135 | 169 | <Bundle-License> |
136 | 170 | BSD-3-Clause;link="https://raw.githubusercontent.com/dnsjava/dnsjava/master/LICENSE" |
137 | 171 | </Bundle-License> |
138 | | - <_removeheaders>Bnd-*, Tool, Require-Capability, Include-Resource</_removeheaders> |
| 172 | + <_removeheaders>Bnd-*, Tool, Require-Capability, Include-Resource, Private-Package</_removeheaders> |
| 173 | + <_snapshot>SNAPSHOT</_snapshot> |
139 | 174 | <Include-Resource> |
140 | 175 | {maven-resources}, |
141 | 176 | META-INF/LICENSE=LICENSE |
|
161 | 196 | <plugin> |
162 | 197 | <groupId>org.apache.maven.plugins</groupId> |
163 | 198 | <artifactId>maven-surefire-plugin</artifactId> |
164 | | - <version>2.22.2</version> |
| 199 | + <version>3.0.0-M5</version> |
165 | 200 | <configuration> |
166 | 201 | <includes> |
167 | 202 | <!-- Override default config to include inner test classes --> |
|
171 | 206 | <!-- Override default config to not exclude inner test classes --> |
172 | 207 | <exclude/> |
173 | 208 | </excludes> |
| 209 | + <argLine> |
| 210 | + ${argLine} --add-opens java.base/sun.net.dns=ALL-UNNAMED |
| 211 | + </argLine> |
| 212 | + <useModulePath>false</useModulePath> |
174 | 213 | </configuration> |
175 | 214 | </plugin> |
176 | 215 |
|
|
212 | 251 | <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> |
213 | 252 | <breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications> |
214 | 253 | <excludes> |
| 254 | + <!-- Ignore classes that we need for compilation only --> |
| 255 | + <exclude>android</exclude> |
| 256 | + <exclude>sun</exclude> |
215 | 257 | <!-- JDK9 removed the Nameservice SPI as per bug 8134577. --> |
216 | 258 | <exclude>org.xbill.DNS.spi</exclude> |
217 | 259 | <!-- internal API detected as public --> |
|
255 | 297 | <plugin> |
256 | 298 | <groupId>com.coveo</groupId> |
257 | 299 | <artifactId>fmt-maven-plugin</artifactId> |
| 300 | + <!-- newer versions are broken on Java 16+, see https://github.com/google/google-java-format/issues/612 --> |
258 | 301 | <version>2.9.1</version> |
259 | 302 | <executions> |
260 | 303 | <execution> |
|
292 | 335 | <dependency> |
293 | 336 | <groupId>com.puppycrawl.tools</groupId> |
294 | 337 | <artifactId>checkstyle</artifactId> |
295 | | - <version>9.2</version> |
| 338 | + <version>9.2.1</version> |
296 | 339 | </dependency> |
297 | 340 | </dependencies> |
298 | 341 | </plugin> |
|
368 | 411 | <version>${lombok.version}</version> |
369 | 412 | <scope>provided</scope> |
370 | 413 | </dependency> |
371 | | - <dependency> |
372 | | - <groupId>org.robolectric</groupId> |
373 | | - <artifactId>android-all</artifactId> |
374 | | - <version>12-robolectric-7732740</version> |
375 | | - <scope>provided</scope> |
376 | | - </dependency> |
377 | 414 | <dependency> |
378 | 415 | <groupId>net.java.dev.jna</groupId> |
379 | 416 | <artifactId>jna</artifactId> |
|
442 | 479 | </dependency> |
443 | 480 | </dependencies> |
444 | 481 |
|
445 | | - <profiles> |
446 | | - <profile> |
447 | | - <id>java8</id> |
448 | | - <activation> |
449 | | - <jdk>[,9)</jdk> |
450 | | - </activation> |
451 | | - <build> |
452 | | - <plugins> |
453 | | - <plugin> |
454 | | - <groupId>org.apache.maven.plugins</groupId> |
455 | | - <artifactId>maven-compiler-plugin</artifactId> |
456 | | - <configuration> |
457 | | - <source>${target.jdk}</source> |
458 | | - <target>${target.jdk}</target> |
459 | | - </configuration> |
460 | | - </plugin> |
461 | | - </plugins> |
462 | | - </build> |
463 | | - </profile> |
464 | | - |
465 | | - <profile> |
466 | | - <!-- JDK9 removed the Nameservice SPI as per bug 8134577. There's no replacement. --> |
467 | | - <id>no-spi-on-java9</id> |
468 | | - <activation> |
469 | | - <jdk>[9,)</jdk> |
470 | | - </activation> |
471 | | - |
472 | | - <build> |
473 | | - <plugins> |
474 | | - <plugin> |
475 | | - <groupId>org.apache.maven.plugins</groupId> |
476 | | - <artifactId>maven-compiler-plugin</artifactId> |
477 | | - <configuration> |
478 | | - <release>${target.jdk}</release> |
479 | | - <excludes> |
480 | | - <exclude>org/xbill/DNS/spi/**</exclude> |
481 | | - </excludes> |
482 | | - </configuration> |
483 | | - </plugin> |
484 | | - |
485 | | - <plugin> |
486 | | - <groupId>org.apache.maven.plugins</groupId> |
487 | | - <artifactId>maven-javadoc-plugin</artifactId> |
488 | | - <configuration> |
489 | | - <excludePackageNames>*.spi</excludePackageNames> |
490 | | - </configuration> |
491 | | - </plugin> |
492 | | - |
493 | | - <plugin> |
494 | | - <groupId>org.apache.maven.plugins</groupId> |
495 | | - <artifactId>maven-surefire-plugin</artifactId> |
496 | | - <configuration> |
497 | | - <argLine> |
498 | | - ${argLine} --add-opens java.base/sun.net.dns=ALL-UNNAMED |
499 | | - </argLine> |
500 | | - </configuration> |
501 | | - </plugin> |
502 | | - </plugins> |
503 | | - |
504 | | - <resources> |
505 | | - <resource> |
506 | | - <directory>src/main/resources</directory> |
507 | | - <excludes> |
508 | | - <exclude>META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor</exclude> |
509 | | - </excludes> |
510 | | - </resource> |
511 | | - </resources> |
512 | | - </build> |
513 | | - </profile> |
514 | | - </profiles> |
515 | | - |
516 | 482 | <distributionManagement> |
517 | 483 | <snapshotRepository> |
518 | 484 | <id>ossrh</id> |
|
0 commit comments