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 — Support Maven mirrors in generated settings.xml by brunoborges · Pull Request #1289 · actions/setup-java

Conversation

@brunoborges

@brunoborges brunoborges commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Description:
Add optional mvn-mirrors input with multiline mirror-id:mirror-url:mirror-of entries and generate top-level Maven <mirrors> settings independently of repository profiles.

Preserve URL schemes/ports and selectors such as external:* and external:http:*; reject missing fields and duplicate IDs; escape generated XML. Authenticated mirrors use matching server IDs, while public mirrors need no matching credentials. Existing repository/Central controls, GPG settings, custom paths, and overwrite behavior remain unchanged.

Includes documentation, regression tests, cross-platform Maven mirror-selection workflow coverage, and rebuilt action bundles. Replaces #1288 using the branch published directly in actions/setup-java.

Validation:

  • npm run check — passed: formatting, lint, build, and all 45 test suites / 1,585 tests.
  • npx tsc --noEmit — passed.
  • New PowerShell workflow assertions executed locally against Maven 3.9.15 for * and external:* — passed, confirming Central and POM-declared dependency/plugin repository redirection. GitHub-hosted Windows/Linux jobs have not been run locally.

Related issue:
Fixes #1287

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@brunoborges
Support Maven mirrors in generated settings.xml
df4305d
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 59df028a-0d1b-49cb-8126-ab26408663e4
@brunoborges
brunoborges requested a review from a team as a code owner October 16, 2026 13:51
Copilot AI balanced review requested due to automatic review settings October 16, 2026 13:51
@brunoborges brunoborges mentioned this pull request Oct 16, 2026
Support Maven mirrors in generated settings.xml #1287
Closed
Copilot started reviewing on behalf of brunoborges October 16, 2026 13:51
View session
Copilot AI reviewed Oct 16, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟡 Changes recommended

Missing selectors in port-bearing or IPv6 URLs can silently produce ineffective mirrors instead of failing validation.

1 open finding
  • Medium severity Reject missing mirror selectors in port and IPv6 repository URLs · New
What changed in this PR

Adds mvn-mirrors to setup-java’s Maven settings generation, allowing repository redirection independently of repository profiles.

Changes:

  • Parses mirror entries and generates escaped, top-level XML.
  • Documents authentication and selector behavior.
  • Adds regression and cross-platform workflow coverage, with rebuilt bundles.
File Description
src/​constants.ts Defines the mirror input constant.
src/​auth.ts Parses mirrors and generates settings.
README.md Introduces mirror configuration.
docs/​advanced-usage.md Documents usage and authentication.
dist/​setup/​index.js Includes the new input constant.
dist/​setup/​81.index.js Bundles mirror handling.
dist/​cleanup/​index.js Refreshes bundled constants.
action.yml Declares the optional input.
.github/​workflows/​e2e-publishing.yml Checks Maven mirror selection across platforms.
tests/​auth.test.ts Covers parsing, XML generation, and compatibility.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/auth.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@brunoborges
Reject Maven mirrors missing selectors after URL authorities
db92f3d
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 59df028a-0d1b-49cb-8126-ab26408663e4
github-advanced-security[bot]
github-advanced-security Bot found potential problems Oct 16, 2026
View reviewed changes
Comment thread .github/workflows/e2e-publishing.yml Fixed

Uh oh!

There was an error while loading. Please reload this page.

brunoborges and others added 3 commits October 16, 2026 10:27
@brunoborges
Use self-repository syntax in Maven mirrors E2E
a18b789
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 59df028a-0d1b-49cb-8126-ab26408663e4
@brunoborges
Document mvn-mirrors URL scheme and colon encoding requirements
e886413
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 59df028a-0d1b-49cb-8126-ab26408663e4
@brunoborges
Merge origin/main into brunoborges-support-maven-mirrors-in-generated…
19d481a
…-setti

Co-authored-by: Copilot App <[email protected]>
@brunoborges
brunoborges merged commit 77dd5b2 into main Nov 4, 2026
100 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@brunoborges
brunoborges deleted the brunoborges-support-maven-mirrors-in-generated-setti branch November 4, 2026 22:10
taylorcreech88-droid
taylorcreech88-droid approved these changes Nov 5, 2026
View reviewed changes
FarmVivi added a commit to FarmVivi/panel-auto-starter that referenced this pull request Nov 7, 2026
@FarmVivi @claude
chore(deps): update GitHub Actions (setup-java 6.2.0, action-gh-relea…
ba183f2
…se 3.0.4)

Same change as Renovate's #182, applied here so it ships with the rest.

- actions/setup-java 6.1.0 -> 6.2.0: Liberica and Corretto resolution
  fixes, bundled dependency updates, and a new opt-in `mvn-mirrors` input
  for the generated settings.xml. We use Temurin 25 with the Maven cache and
  pass no repository or mirror input; the PR states the existing settings
  generation is unchanged (actions/setup-java#1289, action.yml diff read).
- softprops/action-gh-release 3.0.3 -> 3.0.4: maintenance release, only
  its own dependencies changed (compare v3.0.3...v3.0.4).

Neither can run locally. The SonarQube workflow exercises setup-java on
push, and the next release exercises both through Release Build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
+2 more reviewers
@github-advanced-security github-advanced-security[bot] github-advanced-security[bot] left review comments
@taylorcreech88-droid taylorcreech88-droid taylorcreech88-droid approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support Maven mirrors in generated settings.xml

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@brunoborges @github-advanced-security @taylorcreech88-droid
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — 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.