[MNG-8335] The mvnenc command is busted (#1825)

Fixing the 3 new script params.

---

https://issues.apache.org/jira/browse/MNG-8335
This commit is contained in:
Tamas Cservenak 2024-10-21 10:03:39 +02:00 committed by GitHub
parent 4b9e350985
commit 3753743ee6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 20 deletions

View File

@ -246,10 +246,6 @@ public abstract class CommonsCliOptions implements Options {
public static final String SHOW_VERSION = "V";
public static final String QUIET = "q";
public static final String VERBOSE = "X";
/** This option is deprecated and may be repurposed as Java debug in a future version.
* Use {@code -X,--verbose} instead. */
@Deprecated
public static final String DEBUG = "debug";
public static final String SHOW_ERRORS = "e";
public static final String FAIL_ON_SEVERITY = "fos";
@ -258,22 +254,26 @@ public abstract class CommonsCliOptions implements Options {
public static final String FORCE_INTERACTIVE = "force-interactive";
public static final String ALTERNATE_USER_SETTINGS = "s";
public static final String ALTERNATE_PROJECT_SETTINGS = "ps";
@Deprecated
public static final String ALTERNATE_GLOBAL_SETTINGS = "gs";
public static final String ALTERNATE_INSTALLATION_SETTINGS = "is";
public static final String ALTERNATE_USER_TOOLCHAINS = "t";
@Deprecated
public static final String ALTERNATE_GLOBAL_TOOLCHAINS = "gt";
public static final String ALTERNATE_INSTALLATION_TOOLCHAINS = "it";
public static final String LOG_FILE = "l";
public static final String RAW_STREAMS = "raw-streams";
public static final String COLOR = "color";
public static final String HELP = "h";
// parameters handled by script
public static final String DEBUG = "debug";
public static final String ENC = "enc";
public static final String YJP = "yjp";
// deprecated ones
@Deprecated
public static final String ALTERNATE_GLOBAL_SETTINGS = "gs";
@Deprecated
public static final String ALTERNATE_GLOBAL_TOOLCHAINS = "gt";
protected org.apache.commons.cli.Options options;
protected final LinkedHashSet<Option> usedDeprecatedOptions = new LinkedHashSet<>();
@ -372,16 +372,21 @@ public abstract class CommonsCliOptions implements Options {
.desc("Defines the color mode of the output. Supported are 'auto', 'always', 'never'.")
.build());
// Deprecated
// Parameters handled by script
options.addOption(Option.builder()
.longOpt(DEBUG)
.desc("<deprecated> Produce execution verbose output.")
.deprecated(DeprecatedAttributes.builder()
.setForRemoval(true)
.setSince("4.0.0")
.setDescription("Use -X,--verbose instead.")
.get())
.desc("Launch the JVM in debug mode (script option).")
.build());
options.addOption(Option.builder()
.longOpt(ENC)
.desc("Launch the Maven Encryption tool (script option).")
.build());
options.addOption(Option.builder()
.longOpt(YJP)
.desc("Launch the JVM with Yourkit profiler (script option).")
.build());
// Deprecated
options.addOption(Option.builder(ALTERNATE_GLOBAL_SETTINGS)
.longOpt("global-settings")
.desc("<deprecated> Alternate path for the global settings file.")

View File

@ -271,7 +271,6 @@ public class CommonsCliMavenOptions extends CommonsCliOptions implements MavenOp
public static final String CHECKSUM_FAILURE_POLICY = "C";
public static final String CHECKSUM_WARNING_POLICY = "c";
public static final String FAIL_FAST = "ff";
public static final String FAIL_ON_SEVERITY = "fos";
public static final String FAIL_AT_END = "fae";
public static final String FAIL_NEVER = "fn";
public static final String RESUME = "r";