|
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 | | - <include>org.kohsuke.*</include> |
115 | 119 | </configuration> |
116 | 120 | </execution> |
117 | 121 | <!-- attached to Maven test phase --> |
118 | 122 | <execution> |
119 | 123 | <id>report</id> |
120 | | - <phase>test</phase> |
121 | 124 | <goals> |
122 | | - <goal>report</goal> |
| 125 | + <goal>report-integration</goal> |
123 | 126 | </goals> |
124 | 127 | </execution> |
125 | 128 | <execution> |
126 | 129 | <id>check</id> |
127 | | - <phase>test</phase> |
| 130 | + <phase>verify</phase> |
128 | 131 | <goals> |
129 | 132 | <goal>check</goal> |
130 | 133 | </goals> |
131 | 134 | <configuration> |
| 135 | + <dataFile>${project.build.directory}/jacoco-it.exec</dataFile> |
132 | 136 | <rules> |
133 | 137 | <rule> |
134 | 138 | <element>BUNDLE</element> |
|
153 | 157 | </limit> |
154 | 158 | </limits> |
155 | 159 | <excludes> |
| 160 | + <!-- Java 11 multi-release overlay problems --> |
| 161 | + <exclude>org.kohsuke.github.extras.HttpClientGitHubConnector.**</exclude> |
| 162 | + <exclude>org.kohsuke.github.extras.HttpClientGitHubConnector</exclude> |
| 163 | + |
156 | 164 | <!-- Code implemented externally --> |
157 | 165 | <exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory.**</exclude> |
158 | 166 | <exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory</exclude> |
159 | 167 |
|
160 | 168 | <!-- Sample only --> |
161 | 169 | <exclude>org.kohsuke.github.example.*</exclude> |
162 | 170 |
|
163 | | - |
164 | 171 | <!-- Deprecated --> |
165 | 172 | <exclude>org.kohsuke.github.extras.OkHttpConnector</exclude> |
166 | 173 | <exclude>org.kohsuke.github.extras.OkHttp3Connector</exclude> |
|
220 | 227 | <autoReleaseAfterClose>true</autoReleaseAfterClose> |
221 | 228 | </configuration> |
222 | 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> |
223 | 251 | </plugins> |
224 | 252 | </pluginManagement> |
225 | 253 | <plugins> |
|
285 | 313 | <plugin> |
286 | 314 | <groupId>org.codehaus.mojo</groupId> |
287 | 315 | <artifactId>animal-sniffer-maven-plugin</artifactId> |
288 | | - <version>1.20</version> |
289 | | - <configuration> |
290 | | - <signature> |
291 | | - <groupId>org.codehaus.mojo.signature</groupId> |
292 | | - <artifactId>java18</artifactId> |
293 | | - <version>1.0</version> |
294 | | - </signature> |
295 | | - </configuration> |
296 | | - <executions> |
297 | | - <execution> |
298 | | - <id>ensure-java-1.8-class-library</id> |
299 | | - <phase>test</phase> |
300 | | - <goals> |
301 | | - <goal>check</goal> |
302 | | - </goals> |
303 | | - </execution> |
304 | | - </executions> |
305 | 316 | </plugin> |
306 | 317 | <plugin> |
307 | 318 | <groupId>com.infradna.tool</groupId> |
|
331 | 342 | </executions> |
332 | 343 | <configuration> |
333 | 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 | + |
334 | 351 | <eclipse> |
335 | 352 | <file>${basedir}/src/build/eclipse/formatter.xml</file> |
336 | 353 | </eclipse> |
|
520 | 537 | <dependency> |
521 | 538 | <groupId>org.mockito</groupId> |
522 | 539 | <artifactId>mockito-core</artifactId> |
523 | | - <version>4.0.0</version> |
| 540 | + <version>4.1.0</version> |
524 | 541 | <scope>test</scope> |
525 | 542 | </dependency> |
526 | 543 | <dependency> |
|
576 | 593 | <executions> |
577 | 594 | <execution> |
578 | 595 | <id>okhttp-test</id> |
579 | | - <phase>test</phase> |
| 596 | + <phase>integration-test</phase> |
580 | 597 | <goals> |
581 | 598 | <goal>test</goal> |
582 | 599 | </goals> |
583 | 600 | <configuration> |
| 601 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
584 | 602 | <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
585 | 603 | <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=okhttp</argLine> |
586 | 604 | </configuration> |
587 | 605 | </execution> |
588 | | - <execution> |
589 | | - <id>okhttpconnector-test</id> |
590 | | - <phase>test</phase> |
591 | | - <goals> |
592 | | - <goal>test</goal> |
593 | | - </goals> |
594 | | - <configuration> |
595 | | - <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
596 | | - <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=okhttpconnector</argLine> |
597 | | - </configuration> |
598 | | - </execution> |
599 | 606 | <execution> |
600 | 607 | <id>slow-or-flaky-test</id> |
601 | | - <phase>test</phase> |
| 608 | + <phase>integration-test</phase> |
602 | 609 | <goals> |
603 | 610 | <goal>test</goal> |
604 | 611 | </goals> |
605 | 612 | <configuration> |
| 613 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
606 | 614 | <rerunFailingTestsCount>2</rerunFailingTestsCount> |
607 | 615 | <!-- There are some tests that take longer or are a little |
608 | 616 | flaky. Run them here. --> |
|
672 | 680 | <rules> |
673 | 681 | <requireFilesExist> |
674 | 682 | <files> |
675 | | - <file>${project.build.directory}/jacoco.exec</file> |
| 683 | + <file>${project.build.directory}/jacoco-it.exec</file> |
676 | 684 | </files> |
677 | 685 | </requireFilesExist> |
678 | 686 | </rules> |
|
738 | 746 | </plugins> |
739 | 747 | </build> |
740 | 748 | </profile> |
| 749 | + <profile> |
| 750 | + <id>multirelease</id> |
| 751 | + <activation> |
| 752 | + <jdk>[11,)</jdk> |
| 753 | + </activation> |
| 754 | + <build> |
| 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> |
| 765 | + <plugin> |
| 766 | + <artifactId>maven-compiler-plugin</artifactId> |
| 767 | + <version>3.8.1</version> |
| 768 | + <executions> |
| 769 | + <execution> |
| 770 | + <id>compile-java-11</id> |
| 771 | + <phase>compile</phase> |
| 772 | + <goals> |
| 773 | + <goal>compile</goal> |
| 774 | + </goals> |
| 775 | + <configuration> |
| 776 | + <release>11</release> |
| 777 | + <source>11</source> |
| 778 | + <target>11</target> |
| 779 | + <compileSourceRoots> |
| 780 | + <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot> |
| 781 | + </compileSourceRoots> |
| 782 | + <multiReleaseOutput>true</multiReleaseOutput> |
| 783 | + </configuration> |
| 784 | + </execution> |
| 785 | + </executions> |
| 786 | + </plugin> |
| 787 | + <plugin> |
| 788 | + <groupId>org.apache.maven.plugins</groupId> |
| 789 | + <artifactId>maven-jar-plugin</artifactId> |
| 790 | + <version>3.2.0</version> |
| 791 | + <configuration> |
| 792 | + <archive> |
| 793 | + <manifestEntries> |
| 794 | + <Multi-Release>true</Multi-Release> |
| 795 | + </manifestEntries> |
| 796 | + </archive> |
| 797 | + </configuration> |
| 798 | + </plugin> |
| 799 | + </plugins> |
| 800 | + </build> |
| 801 | + </profile> |
| 802 | + <profile> |
| 803 | + <id>multirelease-test</id> |
| 804 | + <activation> |
| 805 | + <jdk>[11,)</jdk> |
| 806 | + <property> |
| 807 | + <name>!test</name> |
| 808 | + </property> |
| 809 | + </activation> |
| 810 | + <build> |
| 811 | + <plugins> |
| 812 | + <plugin> |
| 813 | + <artifactId>maven-surefire-plugin</artifactId> |
| 814 | + <executions> |
| 815 | + <execution> |
| 816 | + <id>java11-test</id> |
| 817 | + <phase>integration-test</phase> |
| 818 | + <goals> |
| 819 | + <goal>test</goal> |
| 820 | + </goals> |
| 821 | + <configuration> |
| 822 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
| 823 | + <useSystemClassLoader>false</useSystemClassLoader> |
| 824 | + <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
| 825 | + <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=httpclient</argLine> |
| 826 | + </configuration> |
| 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> |
| 841 | + </executions> |
| 842 | + </plugin> |
| 843 | + </plugins> |
| 844 | + </build> |
| 845 | + </profile> |
| 846 | + |
741 | 847 | </profiles> |
742 | 848 | <reporting> |
743 | 849 | <plugins> |
|
0 commit comments