Skip to content

Add OpenJDK distribution - #1147

Merged
brunoborges merged 10 commits into
mainfrom
copilot/add-openjdk-jdk-distribution
Jul 28, 2026
Merged

Add OpenJDK distribution#1147
brunoborges merged 10 commits into
mainfrom
copilot/add-openjdk-jdk-distribution

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description:
Adds distribution: oracle-openjdk for the GPLv2+CE OpenJDK builds created and hosted by Oracle at jdk.java.net.

  • Discovers current GA, early-access, and archived releases from jdk.java.net.
  • Supports SemVer ranges, exact builds, four-field versions, and legacy archive layouts.
  • Supports Linux, macOS, and Windows on x64 and AArch64.
  • Supports JDK packages; JRE and JavaFX package variants are not published by this distribution.
  • Documents that Oracle archives these builds after a limited number of releases and stops providing security updates. Users must then move to Oracle JDK or another maintained vendor to continue receiving security patches.
  • Registers the distribution, adds platform-independent tests, and updates the bundled action.

Stable release:

- uses: actions/setup-java@v6
  with:
    distribution: 'oracle-openjdk'
    java-version: '26'

Early-access release:

- uses: actions/setup-java@v6
  with:
    distribution: 'oracle-openjdk'
    java-version: '27-ea'

Using 27 without the -ea suffix selects a stable (GA) release.

Related issue:
OpenJDK JDK distribution feature request.

Download URL:
https://jdk.java.net/

License:
https://openjdk.org/legal/gplv2+ce.html

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.
  • Mark if new distribution is being added.

Copilot AI changed the title [WIP] Add the OpenJDK JDK reference implementation Add OpenJDK distribution Jul 28, 2026
Copilot AI requested a review from brunoborges July 28, 2026 02:52
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2c93ae0c-bbf5-40f5-bf6e-40168d0e267f
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2c93ae0c-bbf5-40f5-bf6e-40168d0e267f
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2c93ae0c-bbf5-40f5-bf6e-40168d0e267f
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2c93ae0c-bbf5-40f5-bf6e-40168d0e267f
@brunoborges
brunoborges marked this pull request as ready for review July 28, 2026 19:54
@brunoborges
brunoborges requested a review from a team as a code owner July 28, 2026 19:54
Copilot AI review requested due to automatic review settings July 28, 2026 19:54
@brunoborges
brunoborges merged commit 0b0bd25 into main Jul 28, 2026
441 checks passed
@brunoborges
brunoborges deleted the copilot/add-openjdk-jdk-distribution branch July 28, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for installing Oracle-hosted OpenJDK builds from https://jdk.java.net/ via a new distribution: oracle-openjdk, including GA, early-access, and archived release discovery, plus documentation and test coverage.

Changes:

  • Adds a new OpenJdkDistribution installer that scrapes jdk.java.net to resolve and download matching JDK archives (GA/EA/archive), supporting SemVer ranges and legacy archive layouts.
  • Registers oracle-openjdk in the distribution factory and updates user docs (README + advanced usage) to document behavior and security-update caveats.
  • Adds Jest tests covering GA/EA resolution, archived releases, legacy archive headings, and platform/arch handling; updates the bundled dist/setup/index.js.
Show a summary per file
File Description
src/distributions/openjdk/installer.ts Implements OpenJDK release discovery/parsing and download/caching for oracle-openjdk.
src/distributions/distribution-factory.ts Registers oracle-openjdk and wires it to OpenJdkDistribution.
README.md Adds oracle-openjdk to the supported distributions table and documents archival/security caveat.
docs/advanced-usage.md Documents how to use oracle-openjdk (including -ea) and updates guidance for manual JDK installs.
tests/distributors/openjdk-installer.test.ts Adds unit tests validating version resolution and parsing across GA/EA/archive formats.
dist/setup/index.js Updates the compiled/bundled action output to include the new distribution.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/6 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +109 to +112
private async fetchPage(url: string): Promise<string> {
const response = await this.http.get(url);
return response.readBody();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the OpenJDK JDK reference implementation

3 participants