Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin 2.x release train #1935

Merged
merged 5 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,6 @@ jobs:
fail_ci_if_error: true
verbose: true

test-java-8:
name: test Java 8 (no-build)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: maven-target-directory
path: target
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Maven Test (no build) Java 8
run: mvn -B surefire:test -DfailIfNoTests -Dsurefire.excludesFile=src/test/resources/slow-or-flaky-tests.txt

test-java-11:
name: test Java 11 (no-build)
needs: build
Expand All @@ -144,7 +125,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Maven Test (no build) Java 11
Expand Down
150 changes: 17 additions & 133 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
<version>1.326-SNAPSHOT</version>
<version>2.0.0-alpha-1-SNAPSHOT</version>
<name>GitHub API for Java</name>
<url>https://github-api.kohsuke.org/</url>
<description>GitHub API for Java</description>
Expand Down Expand Up @@ -63,14 +63,6 @@
<artifactId>maven-scm-manager-plexus</artifactId>
<version>2.1.0</version>
</extension>
<!-- Doing site publishing manually for now -->
<!--
<extension>
<groupId>org.kohsuke</groupId>
<artifactId>wagon-gitsite</artifactId>
<version>0.3.5</version>
</extension>
-->
</extensions>
<testResources>
<testResource>
Expand Down Expand Up @@ -117,11 +109,7 @@
<configuration>
<!-- no need to get data about external code. It dramatically reduces performance of JaCoCo for nothing -->
<excludes>
<exclude>/org/kohsuke/github/extras/HttpClient*</exclude>
<exclude>/org/kohsuke/github/example/*</exclude>
<exclude>/org/kohsuke/github/extras/OkHttpConnector*</exclude>
<exclude>/org/kohsuke/github/extras/OkHttp3Connector*</exclude>
<exclude>/org/kohsuke/github/extras/okhttp3/ObsoleteUrlFactory*</exclude>
</excludes>
</configuration>
<executions>
Expand Down Expand Up @@ -172,23 +160,14 @@
</limit>
</limits>
<excludes>
<!-- Java 11 multi-release overlay problems -->
<exclude>org.kohsuke.github.extras.HttpClientGitHubConnector.**</exclude>
<exclude>org.kohsuke.github.extras.HttpClientGitHubConnector</exclude>

<!-- Code implemented externally -->
<exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory.**</exclude>
<exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory</exclude>
<!-- V2.x changes -->
<exclude>org.kohsuke.github.GHRepositorySearchBuilder.Fork</exclude>

<!-- Sample only -->
<exclude>org.kohsuke.github.example.*</exclude>

<!-- Deprecated -->
<exclude>org.kohsuke.github.extras.OkHttpConnector</exclude>
<exclude>org.kohsuke.github.extras.OkHttp3Connector</exclude>
<exclude>org.kohsuke.github.EnforcementLevel</exclude>
<exclude>org.kohsuke.github.GHPerson.1</exclude>
<exclude>org.kohsuke.github.GHCompare.User</exclude>
<!-- Unbridged test changes -->
<exclude>org.kohsuke.github.GHCommit.GHAuthor</exclude>

<!-- TODO: Some coverage, but more needed -->
<exclude>org.kohsuke.github.GHIssue.PullRequest</exclude>
Expand Down Expand Up @@ -225,7 +204,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>8</release>
<release>11</release>
<failOnWarnings>true</failOnWarnings>
<doclint>all</doclint>
</configuration>
Expand Down Expand Up @@ -298,34 +277,16 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.jenkins-ci</groupId>
<artifactId>annotation-indexer</artifactId>
<version>1.12</version>
<version>1.17</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
<id>compile-java-11</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>11</release>
<source>11</source>
<target>11</target>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -349,27 +310,10 @@
<archive>
<manifestEntries>
<Automatic-Module-Name>org.kohsuke.github.api</Automatic-Module-Name>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector</artifactId>
<version>1.29</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand All @@ -388,7 +332,6 @@
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/main/java11/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>

Expand Down Expand Up @@ -436,17 +379,16 @@
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.17.2</version>
<version>0.21.2</version>
<configuration>
<parameter>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<!-- <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> -->
<!-- <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning> -->
<onlyModified>true</onlyModified>
<includeSynthetic>true</includeSynthetic>
<excludes>
<!-- Classes in internal are public but are considered private for API stability purposes -->
<exclude>org.kohsuke.github.internal</exclude>
<!-- TODO: started failing in CI recently. This is part of the multi-release structure. -->
<exclude>org.kohsuke.github.extras.HttpClientGitHubConnector#HttpClientGitHubConnector(java.net.http.HttpClient)</exclude>
</excludes>
</parameter>
</configuration>
Expand Down Expand Up @@ -555,37 +497,10 @@
<version>1.29</version>
<optional>true</optional>
</dependency>
<!-- for stapler-jetty -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<!-- for stapler-jetty -->
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
<scope>test</scope>
</dependency>
<!-- for stapler-jetty -->
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler</artifactId>
<version>1.263</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler-jetty</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.7.0.202309050840-r</version>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.1.0-jre</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -618,20 +533,6 @@
<version>${okhttp3.version}</version>
<optional>true</optional>
</dependency>
<!-- This is the last version of okhttp3 that support UrlConnection -->
<!-- The class using this has been deprecated, this dependency can be remove when that class is. -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>3.12.3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>2.7.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>wordnet-random-name</artifactId>
Expand Down Expand Up @@ -684,7 +585,7 @@
<profiles>
<!-- only enable slow-or-flaky-test if -Dtest= is not present -->
<profile>
<id>test-jwt-slow-multireleasejar-flaky</id>
<id>test-jwt-slow-flaky</id>
<activation>
<property>
<name>!test</name>
Expand All @@ -708,7 +609,7 @@
</configuration>
</execution>
<execution>
<id>java11-test</id>
<id>httpclient-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
Expand All @@ -724,23 +625,6 @@
</systemPropertyVariables>
</configuration>
</execution>
<execution>
<id>java11-urlconnection-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<classesDirectory>${project.basedir}/target/${project.artifactId}-${project.version}.jar</classesDirectory>
<useSystemClassLoader>false</useSystemClassLoader>
<excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile>
<argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=urlconnection</argLine>
<!-- Run some test passes with trace logging turned on -->
<systemPropertyVariables>
<java.util.logging.config.file>src/test/resources/test-trace-logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
<id>slow-or-flaky-test</id>
<phase>integration-test</phase>
Expand Down
Loading
Loading