|
33 | 33 |
|
34 | 34 | <properties> |
35 | 35 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
36 | | - <spotbugs-maven-plugin.version>4.4.2.2</spotbugs-maven-plugin.version> |
37 | | - <spotbugs.version>4.4.2</spotbugs.version> |
| 36 | + <spotbugs-maven-plugin.version>4.5.0.0</spotbugs-maven-plugin.version> |
| 37 | + <spotbugs.version>4.5.0</spotbugs.version> |
38 | 38 | <spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError> |
39 | 39 | <hamcrest.version>2.2</hamcrest.version> |
40 | 40 | <okhttp3.version>4.9.2</okhttp3.version> |
|
103 | 103 | <groupId>org.jacoco</groupId> |
104 | 104 | <artifactId>jacoco-maven-plugin</artifactId> |
105 | 105 | <version>0.8.7</version> |
| 106 | + <configuration> |
| 107 | + <!-- no need to get data about external code. It dramatically reduces performance of JaCoCo for nothing --> |
| 108 | + <excludes> |
| 109 | + <exclude>/org/kohsuke/github/extras/HttpClient*</exclude> |
| 110 | + </excludes> |
| 111 | + </configuration> |
106 | 112 | <executions> |
107 | 113 | <execution> |
108 | 114 | <goals> |
109 | | - <goal>prepare-agent</goal> |
| 115 | + <goal>prepare-agent-integration</goal> |
110 | 116 | </goals> |
111 | 117 | <configuration> |
112 | 118 | <propertyName>jacoco.surefire.argLine</propertyName> |
113 | | - <!-- no need to get data about external code. It dramatically reduces performance of JaCoCo for nothing --> |
114 | | - <includes> |
115 | | - <include>org.kohsuke.*</include> |
116 | | - <include>org/kohsuke/*</include> |
117 | | - </includes> |
118 | | - <excludes> |
119 | | - <exclude>org/kohsuke/github/extras/HttpClientGitHubConnector*</exclude> |
120 | | - <exclude>org/kohsuke/github/extras/HttpClientGitHubConnector*.*</exclude> |
121 | | - <exclude>META-INF/versions/11/org/kohsuke/github/extras/HttpClientGitHubConnector*.*</exclude> |
122 | | - </excludes> |
123 | 119 | </configuration> |
124 | 120 | </execution> |
125 | 121 | <!-- attached to Maven test phase --> |
126 | 122 | <execution> |
127 | 123 | <id>report</id> |
128 | | - <phase>test</phase> |
129 | 124 | <goals> |
130 | | - <goal>report</goal> |
| 125 | + <goal>report-integration</goal> |
131 | 126 | </goals> |
132 | 127 | </execution> |
133 | 128 | <execution> |
134 | 129 | <id>check</id> |
135 | | - <phase>test</phase> |
| 130 | + <phase>verify</phase> |
136 | 131 | <goals> |
137 | 132 | <goal>check</goal> |
138 | 133 | </goals> |
139 | 134 | <configuration> |
| 135 | + <dataFile>${project.build.directory}/jacoco-it.exec</dataFile> |
140 | 136 | <rules> |
141 | 137 | <rule> |
142 | 138 | <element>BUNDLE</element> |
|
231 | 227 | <autoReleaseAfterClose>true</autoReleaseAfterClose> |
232 | 228 | </configuration> |
233 | 229 | </plugin> |
| 230 | + <plugin> |
| 231 | + <groupId>org.codehaus.mojo</groupId> |
| 232 | + <artifactId>animal-sniffer-maven-plugin</artifactId> |
| 233 | + <version>1.20</version> |
| 234 | + <configuration> |
| 235 | + <signature> |
| 236 | + <groupId>org.codehaus.mojo.signature</groupId> |
| 237 | + <artifactId>java18</artifactId> |
| 238 | + <version>1.0</version> |
| 239 | + </signature> |
| 240 | + </configuration> |
| 241 | + <executions> |
| 242 | + <execution> |
| 243 | + <id>ensure-java-1.8-class-library</id> |
| 244 | + <phase>test</phase> |
| 245 | + <goals> |
| 246 | + <goal>check</goal> |
| 247 | + </goals> |
| 248 | + </execution> |
| 249 | + </executions> |
| 250 | + </plugin> |
234 | 251 | </plugins> |
235 | 252 | </pluginManagement> |
236 | 253 | <plugins> |
|
296 | 313 | <plugin> |
297 | 314 | <groupId>org.codehaus.mojo</groupId> |
298 | 315 | <artifactId>animal-sniffer-maven-plugin</artifactId> |
299 | | - <version>1.20</version> |
300 | | - <configuration> |
301 | | - <signature> |
302 | | - <groupId>org.codehaus.mojo.signature</groupId> |
303 | | - <artifactId>java18</artifactId> |
304 | | - <version>1.0</version> |
305 | | - </signature> |
306 | | - <ignores> |
307 | | - <!-- This is not idea, but we need to allow java.net.http.* in java11 module --> |
308 | | - <!-- Also, we still have a Java 8 CI build that protects against misuse --> |
309 | | - java.net.http.* |
310 | | - </ignores> |
311 | | - </configuration> |
312 | | - <executions> |
313 | | - <execution> |
314 | | - <id>ensure-java-1.8-class-library</id> |
315 | | - <phase>test</phase> |
316 | | - <goals> |
317 | | - <goal>check</goal> |
318 | | - </goals> |
319 | | - </execution> |
320 | | - </executions> |
321 | 316 | </plugin> |
322 | 317 | <plugin> |
323 | 318 | <groupId>com.infradna.tool</groupId> |
|
347 | 342 | </executions> |
348 | 343 | <configuration> |
349 | 344 | <java> |
| 345 | + <includes> |
| 346 | + <include>src/main/java/**/*.java</include> |
| 347 | + <include>src/main/java11/**/*.java</include> |
| 348 | + <include>src/test/java/**/*.java</include> |
| 349 | + </includes> |
| 350 | + |
350 | 351 | <eclipse> |
351 | 352 | <file>${basedir}/src/build/eclipse/formatter.xml</file> |
352 | 353 | </eclipse> |
|
442 | 443 | <dependency> |
443 | 444 | <groupId>commons-io</groupId> |
444 | 445 | <artifactId>commons-io</artifactId> |
445 | | - <version>2.8.0</version> |
| 446 | + <version>2.11.0</version> |
446 | 447 | </dependency> |
447 | 448 | <dependency> |
448 | 449 | <groupId>com.infradna.tool</groupId> |
|
536 | 537 | <dependency> |
537 | 538 | <groupId>org.mockito</groupId> |
538 | 539 | <artifactId>mockito-core</artifactId> |
539 | | - <version>4.0.0</version> |
| 540 | + <version>4.1.0</version> |
540 | 541 | <scope>test</scope> |
541 | 542 | </dependency> |
542 | 543 | <dependency> |
|
592 | 593 | <executions> |
593 | 594 | <execution> |
594 | 595 | <id>okhttp-test</id> |
595 | | - <phase>test</phase> |
| 596 | + <phase>integration-test</phase> |
596 | 597 | <goals> |
597 | 598 | <goal>test</goal> |
598 | 599 | </goals> |
599 | 600 | <configuration> |
| 601 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
600 | 602 | <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
601 | 603 | <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=okhttp</argLine> |
602 | 604 | </configuration> |
603 | 605 | </execution> |
604 | 606 | <execution> |
605 | 607 | <id>slow-or-flaky-test</id> |
606 | | - <phase>test</phase> |
| 608 | + <phase>integration-test</phase> |
607 | 609 | <goals> |
608 | 610 | <goal>test</goal> |
609 | 611 | </goals> |
610 | 612 | <configuration> |
| 613 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
611 | 614 | <rerunFailingTestsCount>2</rerunFailingTestsCount> |
612 | 615 | <!-- There are some tests that take longer or are a little |
613 | 616 | flaky. Run them here. --> |
|
677 | 680 | <rules> |
678 | 681 | <requireFilesExist> |
679 | 682 | <files> |
680 | | - <file>${project.build.directory}/jacoco.exec</file> |
| 683 | + <file>${project.build.directory}/jacoco-it.exec</file> |
681 | 684 | </files> |
682 | 685 | </requireFilesExist> |
683 | 686 | </rules> |
|
747 | 750 | <id>multirelease</id> |
748 | 751 | <activation> |
749 | 752 | <jdk>[11,)</jdk> |
750 | | - <property> |
751 | | - <name>!test</name> |
752 | | - </property> |
753 | 753 | </activation> |
754 | 754 | <build> |
755 | 755 | <plugins> |
| 756 | + <plugin> |
| 757 | + <groupId>org.codehaus.mojo</groupId> |
| 758 | + <artifactId>animal-sniffer-maven-plugin</artifactId> |
| 759 | + <configuration> |
| 760 | + <ignores> |
| 761 | + java.net.http.* |
| 762 | + </ignores> |
| 763 | + </configuration> |
| 764 | + </plugin> |
756 | 765 | <plugin> |
757 | 766 | <artifactId>maven-compiler-plugin</artifactId> |
758 | 767 | <version>3.8.1</version> |
|
804 | 813 | <artifactId>maven-surefire-plugin</artifactId> |
805 | 814 | <executions> |
806 | 815 | <execution> |
807 | | - <id>java11-jar-test</id> |
| 816 | + <id>java11-test</id> |
808 | 817 | <phase>integration-test</phase> |
809 | 818 | <goals> |
810 | 819 | <goal>test</goal> |
|
816 | 825 | <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=httpclient</argLine> |
817 | 826 | </configuration> |
818 | 827 | </execution> |
| 828 | + <execution> |
| 829 | + <id>java11-urlconnection-test</id> |
| 830 | + <phase>integration-test</phase> |
| 831 | + <goals> |
| 832 | + <goal>test</goal> |
| 833 | + </goals> |
| 834 | + <configuration> |
| 835 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
| 836 | + <useSystemClassLoader>false</useSystemClassLoader> |
| 837 | + <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
| 838 | + <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=urlconnection</argLine> |
| 839 | + </configuration> |
| 840 | + </execution> |
819 | 841 | </executions> |
820 | 842 | </plugin> |
821 | 843 | </plugins> |
|
0 commit comments