Skip to content

feat: Add structured multi-server Maven credentials input - #1037

Closed
brunoborges wants to merge 5 commits into
actions:mainfrom
brunoborges:feat/mvn-server-credentials
Closed

feat: Add structured multi-server Maven credentials input#1037
brunoborges wants to merge 5 commits into
actions:mainfrom
brunoborges:feat/mvn-server-credentials

Conversation

@brunoborges

@brunoborgesbrunoborges commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a new mvn-server-credentials multiline input with format server-id:USERNAME_ENV:PASSWORD_ENV
  • generate multiple entries in Maven settings.xml from that structured input
  • keep backward compatibility by falling back to server-id / server-username / server-password when the new input is not set
  • add parser validation for malformed lines and duplicate server ids
  • update tests and docs (README + advanced usage)

Why

This keeps the feature surface focused while supporting the core multi-repository use case without introducing indexed input tuples.

Compatibility

Existing workflows using server-id, server-username, and server-password continue to work unchanged.

Closes#85

Introduce mvn-server-credentials to support multiple Maven server entries in settings.xml while keeping existing single-server inputs as fallback. Update auth generation/parsing logic, tests, action metadata, and docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

CopilotAI 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 configuring multiple Maven <server> credentials in a single run via a new structured multiline input, while preserving the existing single-server inputs as a fallback.

Changes:

  • Introduces mvn-server-credentials multiline input (server-id:USERNAME_ENV:PASSWORD_ENV) and parsing/validation (malformed entries, duplicate server IDs).
  • Updates Maven settings.xml generation to emit multiple <server> entries.
  • Updates action metadata + documentation and extends unit tests for the new behavior.
Show a summary per file
FileDescription
src/mvn.setting.definition.tsAdds a shared type for Maven server settings entries.
src/constants.tsAdds a constant for the new mvn-server-credentials input name.
src/auth.tsImplements multiline input parsing + multi-server settings.xml generation with legacy fallback.
README.mdDocuments the new input and its override behavior.
docs/advanced-usage.mdAdds an “Multiple repositories” example and expected generated settings.xml.
action.ymlRegisters the new multiline input for the action.
__tests__/auth.test.tsUpdates tests for new function signatures + adds coverage for multi-server generation and parsing.
dist/setup/index.jsBundled output updated to include the new parsing/generation behavior.
dist/cleanup/index.jsBundled constants updated to include the new input constant.

Copilot's findings

Tip

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

  • Files reviewed: 7/9 changed files
  • Comments generated: 2

Comment threadsrc/auth.ts
import * as constants from './constants';
import * as gpg from './gpg';
import {getBooleanInput} from './util';
import {MvnSettingDefinition} from './mvn.setting.definition';
Comment on lines +2 to +6
id: string;
username?: string;
password?: string;
gpgPassphrase?: string;
}
@brunoborgesbrunoborges added feature request New feature or request to improve the current logic maven Maven settings, toolchains, and publishing auth labels Jun 22, 2026
@brunoborgesbrunoborges changed the title Add structured multi-server Maven credentials inputfeat: Add structured multi-server Maven credentials inputJun 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for multiple servers.

2 participants

@brunoborges