Skip to content

Commit 3753743

Browse files
authored
[MNG-8335] The mvnenc command is busted (#1825)
Fixing the 3 new script params. --- https://issues.apache.org/jira/browse/MNG-8335
1 parent 4b9e350 commit 3753743

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

maven-cli/src/main/java/org/apache/maven/cling/invoker/CommonsCliOptions.java

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,6 @@ protected static class CLIManager {
246246
public static final String SHOW_VERSION = "V";
247247
public static final String QUIET = "q";
248248
public static final String VERBOSE = "X";
249-
/** This option is deprecated and may be repurposed as Java debug in a future version.
250-
* Use {@code -X,--verbose} instead. */
251-
@Deprecated
252-
public static final String DEBUG = "debug";
253249

254250
public static final String SHOW_ERRORS = "e";
255251
public static final String FAIL_ON_SEVERITY = "fos";
@@ -258,22 +254,26 @@ protected static class CLIManager {
258254
public static final String FORCE_INTERACTIVE = "force-interactive";
259255
public static final String ALTERNATE_USER_SETTINGS = "s";
260256
public static final String ALTERNATE_PROJECT_SETTINGS = "ps";
261-
262-
@Deprecated
263-
public static final String ALTERNATE_GLOBAL_SETTINGS = "gs";
264-
265257
public static final String ALTERNATE_INSTALLATION_SETTINGS = "is";
266258
public static final String ALTERNATE_USER_TOOLCHAINS = "t";
267-
268-
@Deprecated
269-
public static final String ALTERNATE_GLOBAL_TOOLCHAINS = "gt";
270-
271259
public static final String ALTERNATE_INSTALLATION_TOOLCHAINS = "it";
272260
public static final String LOG_FILE = "l";
273261
public static final String RAW_STREAMS = "raw-streams";
274262
public static final String COLOR = "color";
275263
public static final String HELP = "h";
276264

265+
// parameters handled by script
266+
public static final String DEBUG = "debug";
267+
public static final String ENC = "enc";
268+
public static final String YJP = "yjp";
269+
270+
// deprecated ones
271+
@Deprecated
272+
public static final String ALTERNATE_GLOBAL_SETTINGS = "gs";
273+
274+
@Deprecated
275+
public static final String ALTERNATE_GLOBAL_TOOLCHAINS = "gt";
276+
277277
protected org.apache.commons.cli.Options options;
278278
protected final LinkedHashSet<Option> usedDeprecatedOptions = new LinkedHashSet<>();
279279

@@ -372,16 +372,21 @@ protected void prepareOptions(org.apache.commons.cli.Options options) {
372372
.desc("Defines the color mode of the output. Supported are 'auto', 'always', 'never'.")
373373
.build());
374374

375-
// Deprecated
375+
// Parameters handled by script
376376
options.addOption(Option.builder()
377377
.longOpt(DEBUG)
378-
.desc("<deprecated> Produce execution verbose output.")
379-
.deprecated(DeprecatedAttributes.builder()
380-
.setForRemoval(true)
381-
.setSince("4.0.0")
382-
.setDescription("Use -X,--verbose instead.")
383-
.get())
378+
.desc("Launch the JVM in debug mode (script option).")
379+
.build());
380+
options.addOption(Option.builder()
381+
.longOpt(ENC)
382+
.desc("Launch the Maven Encryption tool (script option).")
384383
.build());
384+
options.addOption(Option.builder()
385+
.longOpt(YJP)
386+
.desc("Launch the JVM with Yourkit profiler (script option).")
387+
.build());
388+
389+
// Deprecated
385390
options.addOption(Option.builder(ALTERNATE_GLOBAL_SETTINGS)
386391
.longOpt("global-settings")
387392
.desc("<deprecated> Alternate path for the global settings file.")

maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/CommonsCliMavenOptions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ protected static class CLIManager extends CommonsCliOptions.CLIManager {
271271
public static final String CHECKSUM_FAILURE_POLICY = "C";
272272
public static final String CHECKSUM_WARNING_POLICY = "c";
273273
public static final String FAIL_FAST = "ff";
274-
public static final String FAIL_ON_SEVERITY = "fos";
275274
public static final String FAIL_AT_END = "fae";
276275
public static final String FAIL_NEVER = "fn";
277276
public static final String RESUME = "r";

0 commit comments

Comments
 (0)