mirror of
https://github.com/actions/setup-java.git
synced 2026-06-23 16:20:28 +03:00
feat: suppress Maven transfer progress via MAVEN_ARGS by default
Set MAVEN_ARGS to include -ntp (--no-transfer-progress) so Maven invocations in the job produce cleaner CI logs without download/transfer progress noise. Add a new optional 'show-download-progress' input (default false); set it to true to keep the progress output. The change preserves any existing MAVEN_ARGS value (the flag is appended, not overwritten) and is idempotent (it won't add the flag twice if -ntp or --no-transfer-progress is already present). Applies on all platforms; honored by Maven 3.9.0+ and the Maven Wrapper, and is a no-op for non-Maven builds. - action.yml: add show-download-progress input - src/constants.ts: add input + MAVEN_ARGS constants - src/maven-args.ts: new configureMavenArgs() - src/setup-java.ts: invoke configureMavenArgs() during setup - __tests__/maven-args.test.ts: unit tests - docs/advanced-usage.md: document the behavior and input - dist: rebuild bundled action Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -28,5 +28,10 @@ export const MVN_SETTINGS_FILE = 'settings.xml';
|
||||
export const MVN_TOOLCHAINS_FILE = 'toolchains.xml';
|
||||
export const INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id';
|
||||
export const INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor';
|
||||
export const INPUT_SHOW_DOWNLOAD_PROGRESS = 'show-download-progress';
|
||||
|
||||
export const MAVEN_ARGS_ENV = 'MAVEN_ARGS';
|
||||
export const MAVEN_NO_TRANSFER_PROGRESS_FLAG = '-ntp';
|
||||
export const MAVEN_NO_TRANSFER_PROGRESS_LONG_FLAG = '--no-transfer-progress';
|
||||
|
||||
export const DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto'];
|
||||
|
||||
Reference in New Issue
Block a user