|
2 | 2 | <modelVersion>4.0.0</modelVersion>
|
3 | 3 | <groupId>org.kohsuke</groupId>
|
4 | 4 | <artifactId>github-api</artifactId>
|
5 |
| - <version>1.136-SNAPSHOT</version> |
| 5 | + <version>1.301-SNAPSHOT</version> |
6 | 6 | <name>GitHub API for Java</name>
|
7 | 7 | <url>https://github-api.kohsuke.org/</url>
|
8 | 8 | <description>GitHub API for Java</description>
|
|
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 | + <exclude>/org/kohsuke/github/example/*</exclude> |
| 111 | + <exclude>/org/kohsuke/github/extras/OkHttpConnector*</exclude> |
| 112 | + <exclude>/org/kohsuke/github/extras/OkHttp3Connector*</exclude> |
| 113 | + <exclude>/org/kohsuke/github/extras/okhttp3/ObsoleteUrlFactory*</exclude> |
| 114 | + </excludes> |
| 115 | + </configuration> |
106 | 116 | <executions>
|
107 | 117 | <execution>
|
108 | 118 | <goals>
|
109 |
| - <goal>prepare-agent</goal> |
| 119 | + <goal>prepare-agent-integration</goal> |
110 | 120 | </goals>
|
111 | 121 | <configuration>
|
112 | 122 | <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 | 123 | </configuration>
|
116 | 124 | </execution>
|
117 | 125 | <!-- attached to Maven test phase -->
|
118 | 126 | <execution>
|
119 | 127 | <id>report</id>
|
120 |
| - <phase>test</phase> |
121 | 128 | <goals>
|
122 |
| - <goal>report</goal> |
| 129 | + <goal>report-integration</goal> |
123 | 130 | </goals>
|
124 | 131 | </execution>
|
125 | 132 | <execution>
|
126 | 133 | <id>check</id>
|
127 |
| - <phase>test</phase> |
| 134 | + <phase>verify</phase> |
128 | 135 | <goals>
|
129 | 136 | <goal>check</goal>
|
130 | 137 | </goals>
|
131 | 138 | <configuration>
|
| 139 | + <dataFile>${project.build.directory}/jacoco-it.exec</dataFile> |
132 | 140 | <rules>
|
133 | 141 | <rule>
|
134 | 142 | <element>BUNDLE</element>
|
|
153 | 161 | </limit>
|
154 | 162 | </limits>
|
155 | 163 | <excludes>
|
| 164 | + <!-- Java 11 multi-release overlay problems --> |
| 165 | + <exclude>org.kohsuke.github.extras.HttpClientGitHubConnector.**</exclude> |
| 166 | + <exclude>org.kohsuke.github.extras.HttpClientGitHubConnector</exclude> |
| 167 | + |
156 | 168 | <!-- Code implemented externally -->
|
157 | 169 | <exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory.**</exclude>
|
158 | 170 | <exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory</exclude>
|
159 | 171 |
|
160 | 172 | <!-- Sample only -->
|
161 | 173 | <exclude>org.kohsuke.github.example.*</exclude>
|
162 | 174 |
|
163 |
| - |
164 | 175 | <!-- Deprecated -->
|
165 | 176 | <exclude>org.kohsuke.github.extras.OkHttpConnector</exclude>
|
166 | 177 | <exclude>org.kohsuke.github.extras.OkHttp3Connector</exclude>
|
|
220 | 231 | <autoReleaseAfterClose>true</autoReleaseAfterClose>
|
221 | 232 | </configuration>
|
222 | 233 | </plugin>
|
| 234 | + <plugin> |
| 235 | + <groupId>org.codehaus.mojo</groupId> |
| 236 | + <artifactId>animal-sniffer-maven-plugin</artifactId> |
| 237 | + <version>1.20</version> |
| 238 | + <configuration> |
| 239 | + <signature> |
| 240 | + <groupId>org.codehaus.mojo.signature</groupId> |
| 241 | + <artifactId>java18</artifactId> |
| 242 | + <version>1.0</version> |
| 243 | + </signature> |
| 244 | + </configuration> |
| 245 | + <executions> |
| 246 | + <execution> |
| 247 | + <id>ensure-java-1.8-class-library</id> |
| 248 | + <phase>test</phase> |
| 249 | + <goals> |
| 250 | + <goal>check</goal> |
| 251 | + </goals> |
| 252 | + </execution> |
| 253 | + </executions> |
| 254 | + </plugin> |
223 | 255 | </plugins>
|
224 | 256 | </pluginManagement>
|
225 | 257 | <plugins>
|
|
285 | 317 | <plugin>
|
286 | 318 | <groupId>org.codehaus.mojo</groupId>
|
287 | 319 | <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 | 320 | </plugin>
|
306 | 321 | <plugin>
|
307 | 322 | <groupId>com.infradna.tool</groupId>
|
|
331 | 346 | </executions>
|
332 | 347 | <configuration>
|
333 | 348 | <java>
|
| 349 | + <includes> |
| 350 | + <include>src/main/java/**/*.java</include> |
| 351 | + <include>src/main/java11/**/*.java</include> |
| 352 | + <include>src/test/java/**/*.java</include> |
| 353 | + </includes> |
| 354 | + |
334 | 355 | <eclipse>
|
335 | 356 | <file>${basedir}/src/build/eclipse/formatter.xml</file>
|
336 | 357 | </eclipse>
|
|
520 | 541 | <dependency>
|
521 | 542 | <groupId>org.mockito</groupId>
|
522 | 543 | <artifactId>mockito-core</artifactId>
|
523 |
| - <version>4.0.0</version> |
| 544 | + <version>4.1.0</version> |
524 | 545 | <scope>test</scope>
|
525 | 546 | </dependency>
|
526 | 547 | <dependency>
|
|
576 | 597 | <executions>
|
577 | 598 | <execution>
|
578 | 599 | <id>okhttp-test</id>
|
579 |
| - <phase>test</phase> |
| 600 | + <phase>integration-test</phase> |
580 | 601 | <goals>
|
581 | 602 | <goal>test</goal>
|
582 | 603 | </goals>
|
583 | 604 | <configuration>
|
| 605 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
584 | 606 | <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile>
|
585 | 607 | <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=okhttp</argLine>
|
586 | 608 | </configuration>
|
587 | 609 | </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 | 610 | <execution>
|
600 | 611 | <id>slow-or-flaky-test</id>
|
601 |
| - <phase>test</phase> |
| 612 | + <phase>integration-test</phase> |
602 | 613 | <goals>
|
603 | 614 | <goal>test</goal>
|
604 | 615 | </goals>
|
605 | 616 | <configuration>
|
| 617 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
606 | 618 | <rerunFailingTestsCount>2</rerunFailingTestsCount>
|
607 | 619 | <!-- There are some tests that take longer or are a little
|
608 | 620 | flaky. Run them here. -->
|
|
672 | 684 | <rules>
|
673 | 685 | <requireFilesExist>
|
674 | 686 | <files>
|
675 |
| - <file>${project.build.directory}/jacoco.exec</file> |
| 687 | + <file>${project.build.directory}/jacoco-it.exec</file> |
676 | 688 | </files>
|
677 | 689 | </requireFilesExist>
|
678 | 690 | </rules>
|
|
738 | 750 | </plugins>
|
739 | 751 | </build>
|
740 | 752 | </profile>
|
| 753 | + <profile> |
| 754 | + <id>multirelease</id> |
| 755 | + <activation> |
| 756 | + <jdk>[11,)</jdk> |
| 757 | + </activation> |
| 758 | + <build> |
| 759 | + <plugins> |
| 760 | + <plugin> |
| 761 | + <groupId>org.codehaus.mojo</groupId> |
| 762 | + <artifactId>animal-sniffer-maven-plugin</artifactId> |
| 763 | + <configuration> |
| 764 | + <ignores> |
| 765 | + java.net.http.* |
| 766 | + </ignores> |
| 767 | + </configuration> |
| 768 | + </plugin> |
| 769 | + <plugin> |
| 770 | + <artifactId>maven-compiler-plugin</artifactId> |
| 771 | + <version>3.8.1</version> |
| 772 | + <executions> |
| 773 | + <execution> |
| 774 | + <id>compile-java-11</id> |
| 775 | + <phase>compile</phase> |
| 776 | + <goals> |
| 777 | + <goal>compile</goal> |
| 778 | + </goals> |
| 779 | + <configuration> |
| 780 | + <release>11</release> |
| 781 | + <source>11</source> |
| 782 | + <target>11</target> |
| 783 | + <compileSourceRoots> |
| 784 | + <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot> |
| 785 | + </compileSourceRoots> |
| 786 | + <multiReleaseOutput>true</multiReleaseOutput> |
| 787 | + </configuration> |
| 788 | + </execution> |
| 789 | + </executions> |
| 790 | + </plugin> |
| 791 | + <plugin> |
| 792 | + <groupId>org.apache.maven.plugins</groupId> |
| 793 | + <artifactId>maven-jar-plugin</artifactId> |
| 794 | + <version>3.2.0</version> |
| 795 | + <configuration> |
| 796 | + <archive> |
| 797 | + <manifestEntries> |
| 798 | + <Multi-Release>true</Multi-Release> |
| 799 | + </manifestEntries> |
| 800 | + </archive> |
| 801 | + </configuration> |
| 802 | + </plugin> |
| 803 | + </plugins> |
| 804 | + </build> |
| 805 | + </profile> |
| 806 | + <profile> |
| 807 | + <id>multirelease-test</id> |
| 808 | + <activation> |
| 809 | + <jdk>[11,)</jdk> |
| 810 | + <property> |
| 811 | + <name>!test</name> |
| 812 | + </property> |
| 813 | + </activation> |
| 814 | + <build> |
| 815 | + <plugins> |
| 816 | + <plugin> |
| 817 | + <artifactId>maven-surefire-plugin</artifactId> |
| 818 | + <executions> |
| 819 | + <execution> |
| 820 | + <id>java11-test</id> |
| 821 | + <phase>integration-test</phase> |
| 822 | + <goals> |
| 823 | + <goal>test</goal> |
| 824 | + </goals> |
| 825 | + <configuration> |
| 826 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
| 827 | + <useSystemClassLoader>false</useSystemClassLoader> |
| 828 | + <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
| 829 | + <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=httpclient</argLine> |
| 830 | + </configuration> |
| 831 | + </execution> |
| 832 | + <execution> |
| 833 | + <id>java11-urlconnection-test</id> |
| 834 | + <phase>integration-test</phase> |
| 835 | + <goals> |
| 836 | + <goal>test</goal> |
| 837 | + </goals> |
| 838 | + <configuration> |
| 839 | + <classesDirectory>${project.basedir}/target/github-api-${project.version}.jar</classesDirectory> |
| 840 | + <useSystemClassLoader>false</useSystemClassLoader> |
| 841 | + <excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile> |
| 842 | + <argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=urlconnection</argLine> |
| 843 | + </configuration> |
| 844 | + </execution> |
| 845 | + </executions> |
| 846 | + </plugin> |
| 847 | + </plugins> |
| 848 | + </build> |
| 849 | + </profile> |
| 850 | + |
741 | 851 | </profiles>
|
742 | 852 | <reporting>
|
743 | 853 | <plugins>
|
|
748 | 858 | <reportSet>
|
749 | 859 | <reports>
|
750 | 860 | <!-- select non-aggregate reports -->
|
751 |
| - <report>report</report> |
| 861 | + <report>report-integration</report> |
752 | 862 | </reports>
|
753 | 863 | </reportSet>
|
754 | 864 | </reportSets>
|
|
0 commit comments