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

Require Java 11 or newer #60

Merged
merged 1 commit into from
Jul 11, 2023
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
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ updates:
- dependency-name: "jaxen:jaxen"
# maven core artifacts are provided by the running maven, do not update to prevent consuming something unavailable
- dependency-name: "org.apache.maven:*"
# 1.7 and later require Java 11, which this repository does not yet support
- dependency-name: "io.jenkins.tools.incrementals:git-changelist-maven-extension"
versions: [">=1.7"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
60 changes: 10 additions & 50 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Switch to https://raw.githubusercontent.com/jenkinsci/.github/master/workflow-templates/cd.yaml once we support Java 11
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins

name: cd
on:
Expand All @@ -7,53 +7,13 @@ on:
types:
- completed

jobs:
validate:
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }}
steps:
- name: Verify CI status
uses: jenkins-infra/verify-ci-status-action@v1.2.2
id: verify-ci-status
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
output_result: true

- name: Release Drafter
uses: release-drafter/release-drafter@v5
if: steps.verify-ci-status.outputs.result == 'success'
with:
name: next
tag: next
version: next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
checks: read
contents: write

- name: Check interesting categories
uses: jenkins-infra/interesting-category-action@v1.2.1
id: interesting-categories
if: steps.verify-ci-status.outputs.result == 'success'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ubuntu-latest
needs: [validate]
if: needs.validate.outputs.should_release == 'true'
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Release
uses: jenkins-infra/jenkins-maven-cd-action@v1.3.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
jobs:
maven-cd:
uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
secrets:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
java-version: '11'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably can use 17 too, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but that would be inconsistent with the Stapler and HPI Maven plugins.

cache: 'maven'
- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.6</version>
<version>1.7</version>
</extension>
</extensions>
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* allowing one to test against multiple Jenkins versions.
*/
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '8' ],
[ platform: 'windows', jdk: '8' ],
[platform: 'linux', jdk: 17],
[platform: 'windows', jdk: 11],
])
43 changes: 0 additions & 43 deletions jellydoc-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,14 @@
<rules>
<requireUpperBoundDeps>
<excludes combine.children="append">
<exclude>org.apache.commons:commons-lang3</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>xerces:xercesImpl</exclude>
</excludes>
</requireUpperBoundDeps>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!--
This is necessary to ensure that java.home from the build machine doesn't get expanded in
the tools.jar dependency below. When we migrate to Java 11 APIs, this should be deleted.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>flatten</id>
<goals>
<goal>flatten</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<pomElements>
<profiles>keep</profiles>
</pomElements>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -203,25 +179,6 @@
</dependency>
</dependencies>

<!-- TODO migrate to new APIs described in https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration -->
<profiles>
<profile>
<id>jdk-8-and-below</id>
<activation>
<jdk>(,1.8]</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.8.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>

<reporting>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void execute() throws MojoExecutionException {
d.setPath(docletPath);

// debug support
// javadoc.createArg().setLine("-J-Xrunjdwp:transport=dt_socket,server=y,address=8000");
// javadoc.createArg().setLine("-J-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:8000");

javadoc.execute();

Expand Down
Loading