GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a "toolchains-only" install mode (layered on the set-default primitive) · Issue #1047 · actions/setup-java

Add a "toolchains-only" install mode (layered on the set-default primitive) #1047

New issue
Copy link
New issue
Copy link
Closed
Feature
Closed
Add a "toolchains-only" install mode (layered on the set-default primitive)#1047
Feature
Copy link
Labels
feature requestNew feature or request to improve the current logicNew feature or request to improve the current logicmavenMaven settings, toolchains, and publishing authMaven settings, toolchains, and publishing auth

Description

@brunoborges
brunoborges
opened on Jun 23, 2026
Issue body actions

Add a "toolchains-only" install mode (layered on the set-default primitive)

Background

PR #1017 introduces a set-default input: when set-default: false, the action installs a JDK without updating JAVA_HOME / PATH (while still exporting JAVA_HOME_<major>_<arch>). That cleanly covers the "don't make this JDK the environment default" use case (issue #560).

The earlier PR #553 (issue #552) aimed at a broader, Maven-centric goal that partially overlaps with set-default but also contains a piece that set-default does not cover. This issue captures that remaining gap so it can be built on top of the set-default primitive rather than as a competing implementation.

The gap not covered by set-default

set-default: false controls the environment (JAVA_HOME / PATH). It does not, on its own, add the installed JDK as a Maven toolchain entry. The use case from #552 / #553 is:

Install a JDK and register it only as a Maven toolchain (~/.m2/toolchains.xml) — without touching JAVA_HOME, PATH, or settings.xml.

This is useful when a workflow needs an additional JDK available to Maven's maven-toolchains-plugin (e.g. compiling/running a module against a specific JDK) while leaving the workflow's primary Java environment untouched.

Proposed scope (narrowed)

Add a focused input — e.g. add-toolchain-only (name TBD) — that, when true:

  • Adds/updates the JDK entry in toolchains.xml (existing toolchains logic).
  • Implies set-default: false semantics (does not update JAVA_HOME / PATH) unless the user explicitly opts back in.
  • Does not modify settings.xml (no overwrite-settings side effects) unless explicitly requested.
  • Still exports JAVA_HOME_<major>_<arch> (consistent with set-default: false).

Explicitly out of scope (now handled by #1017):

  • General JAVA_HOME / PATH skipping — use set-default: false.

Relationship / dependencies

  • Depends on / builds on: feat: Add set-default option #1017 (set-default) — should be implemented as a thin layer over that primitive, reusing its env-skip behavior instead of re-deriving it.
  • Supersedes (scope-wise): the toolchains-only portion of PR Add a toolchain only - control update of settings.xml, toolchains.xml, JAVA_HOME and PATH more granular #553.
  • Original request: Allow to add a toolchain only - without updating settings.xml, JAVA_HOME and PATH. Only toolchains.xml must be extended. #552.

Notes

PR #553 also proposed update-env-javahome / update-env-path as separate booleans; those are intentionally not carried forward — set-default from #1017 is the single, cleaner knob for that behavior. This issue deliberately narrows the remaining work to just the toolchains.xml-only capability.

Activity

  1. brunoborges
    added
    feature requestNew feature or request to improve the current logicNew feature or request to improve the current logic
    mavenMaven settings, toolchains, and publishing authMaven settings, toolchains, and publishing auth
    on Jun 23, 2026
  2. brunoborges
    added the
    Feature
    issue type on Jun 23, 2026
  3. mhoffrog commented on Jul 14, 2026

    @mhoffrog
    mhoffrog
    on Jul 14, 2026
    Contributor
    More actions

    @brunoborges This issue can now be closed as resolved, since the use case is covered by #1111, disabling defaults update by set-default: false and disabling settings update by overwrite-settings: false.

    Reacted by Bruno Borges
  4. brunoborges
    closed this as completedon Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logicNew feature or request to improve the current logicmavenMaven settings, toolchains, and publishing authMaven settings, toolchains, and publishing auth

    Type

    Feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.