mirror of
https://gitea.com/actions/setup-java.git
synced 2026-11-26 18:19:06 +08:00
* Use gpg.passphraseEnvName instead of gpg.passphrase server The maven-gpg-plugin's `gpg.passphrase`/`passphraseServerId` mechanism is deprecated and fails when the plugin's `bestPractices` mode is enabled. Stop writing the `gpg.passphrase` server to settings.xml and instead set `gpg.passphraseEnvName` via an active profile when the configured passphrase env var name differs from the plugin default (MAVEN_GPG_PASSPHRASE). The default `gpg-passphrase` input value (GPG_PASSPHRASE) is unchanged, so the plugin reads the same environment variable as before. Fixes #760 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix settings.xml publishing validation Update the publishing e2e check to assert the settings.xml generated when gpg-passphrase is MAVEN_GPG_PASSPHRASE. In that default case the action no longer writes a gpg.passphrase server entry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d0a510e-aebf-4ec4-a667-efeb3e4edeb1 * Default gpg-passphrase to MAVEN_GPG_PASSPHRASE Align the default `gpg-passphrase` input value with the maven-gpg-plugin default environment variable name (MAVEN_GPG_PASSPHRASE). With this default, setup-java writes no extra GPG configuration to settings.xml and the plugin reads the passphrase from MAVEN_GPG_PASSPHRASE out of the box. Also document that reading the passphrase from an environment variable via `gpg.passphraseEnvName` requires maven-gpg-plugin 3.2.0 or newer. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d0a510e-aebf-4ec4-a667-efeb3e4edeb1 * Document gpg-passphrase breaking change in V6 Add a "Breaking changes in V6" section to the README covering the switch to gpg.passphraseEnvName, the new MAVEN_GPG_PASSPHRASE default, and the maven-gpg-plugin 3.2.0+ requirement. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d0a510e-aebf-4ec4-a667-efeb3e4edeb1 * Keep GPG_PASSPHRASE default for v5 compatibility Revert the gpg-passphrase input default back to GPG_PASSPHRASE so existing v5 workflows that set the GPG_PASSPHRASE environment variable keep working without changes. setup-java writes gpg.passphraseEnvName=GPG_PASSPHRASE into an active profile, so the maven-gpg-plugin reads the same variable as before. The only remaining compatibility requirement is maven-gpg-plugin 3.2.0+, which is documented in the README and advanced usage guide. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d0a510e-aebf-4ec4-a667-efeb3e4edeb1 * Clarify GPG passphrase profile compatibility Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d0a510e-aebf-4ec4-a667-efeb3e4edeb1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
50 lines
2.3 KiB
TypeScript
50 lines
2.3 KiB
TypeScript
export const MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home';
|
|
export const INPUT_JAVA_VERSION = 'java-version';
|
|
export const INPUT_JAVA_VERSION_FILE = 'java-version-file';
|
|
export const INPUT_ARCHITECTURE = 'architecture';
|
|
export const INPUT_JAVA_PACKAGE = 'java-package';
|
|
export const INPUT_DISTRIBUTION = 'distribution';
|
|
export const INPUT_JDK_FILE = 'jdk-file';
|
|
export const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
|
export const INPUT_CHECK_LATEST = 'check-latest';
|
|
export const INPUT_SET_DEFAULT = 'set-default';
|
|
export const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
|
export const INPUT_VERIFY_SIGNATURE_PUBLIC_KEY = 'verify-signature-public-key';
|
|
export const INPUT_SERVER_ID = 'server-id';
|
|
export const INPUT_SERVER_USERNAME = 'server-username';
|
|
export const INPUT_SERVER_PASSWORD = 'server-password';
|
|
export const INPUT_SETTINGS_PATH = 'settings-path';
|
|
export const INPUT_OVERWRITE_SETTINGS = 'overwrite-settings';
|
|
export const INPUT_GPG_PRIVATE_KEY = 'gpg-private-key';
|
|
export const INPUT_GPG_PASSPHRASE = 'gpg-passphrase';
|
|
|
|
export const INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined;
|
|
export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
|
|
|
|
// The default name of the environment variable the maven-gpg-plugin reads the
|
|
// passphrase from (property `gpg.passphraseEnvName`). When the configured
|
|
// passphrase env var name matches this, no extra configuration is required.
|
|
export const MAVEN_GPG_PASSPHRASE_DEFAULT_ENV = 'MAVEN_GPG_PASSPHRASE';
|
|
|
|
// Id of the settings.xml profile used to set `gpg.passphraseEnvName`.
|
|
export const GPG_PASSPHRASE_PROFILE_ID = 'setup-java-gpg';
|
|
|
|
export const INPUT_CACHE = 'cache';
|
|
export const INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path';
|
|
export const INPUT_JOB_STATUS = 'job-status';
|
|
|
|
export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';
|
|
|
|
export const M2_DIR = '.m2';
|
|
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'];
|