8233592: change --package-type option name to --type and allow -t short form JDK-8200758-branch
authorherrick
Wed, 06 Nov 2019 07:20:07 -0500
branchJDK-8200758-branch
changeset 58993 b5e1baa9d2c3
parent 58992 7249e95cc439
child 58994 b09ba68c6a19
8233592: change --package-type option name to --type and allow -t short form Reviewed-by: asemenyuk, almatvee, kcr
src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java
test/jdk/tools/jpackage/macosx/SigningAppImageTest.java
test/jdk/tools/jpackage/macosx/SigningPackageTest.java
test/jdk/tools/jpackage/share/AddLauncherModuleTest.java
test/jdk/tools/jpackage/share/AddLauncherTest.java
test/jdk/tools/jpackage/share/AddLaunchersTest.java
test/jdk/tools/jpackage/share/AppImagePackageTest.java
test/jdk/tools/jpackage/share/ErrorTest.java
test/jdk/tools/jpackage/share/InvalidArgTest.java
test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java
test/jdk/tools/jpackage/share/JavaOptionsModuleTest.java
test/jdk/tools/jpackage/share/JavaOptionsTest.java
test/jdk/tools/jpackage/share/MissingArgumentsTest.java
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java	Wed Nov 06 07:20:07 2019 -0500
@@ -129,7 +129,7 @@
 
     // CLIOptions is public for DeployParamsTest
     public enum CLIOptions {
-        PACKAGE_TYPE("package-type", OptionCategories.PROPERTY, () -> {
+        PACKAGE_TYPE("type", "t", OptionCategories.PROPERTY, () -> {
             context().deployParams.setTargetFormat(popArg());
         }),
 
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties	Wed Nov 06 07:20:07 2019 -0500
@@ -29,22 +29,22 @@
 Sample usages:\n\
 --------------\n\
 \    Generate a non-modular application image:\n\
-\        jpackage --package-type app-image -d destdir -i inputdir -n name \\\n\
+\        jpackage -t app-image -d destdir -i inputdir -n name \\\n\
 \            --main-class className --main-jar MyJar.jar\n\
 \    Generate a modular application image:\n\
-\        jpackage --package-type app-image -n name -p modulePath \\\n\
+\        jpackage -t app-image -n name -p modulePath \\\n\
 \            -m moduleName/className\n\
 \        To provide your own options to jlink, run jlink separately:\n\
 \            jlink --output appRuntimeImage -p ModulePath -m moduleName \\\n\
 \                --no-header-files [<additional jlink options>...]\n\
-\            jpackage --package-type app-image -n name \\\n\
+\            jpackage -t app-image -n name \\\n\
 \                -m moduleName/className --runtime-image appRuntimeImage\n\
 \    Generate an application package:\n\
-\        jpackage --package-type <type> -n name \\\n\
+\        jpackage -t <type> -n name \\\n\
 \            -p modulePath -m moduleName/className\n\
-\        jpackage --package-type <type> -i inputdir -n name \\\n\
+\        jpackage -t <type> -i inputdir -n name \\\n\
 \            --main-class package.ClassName --main-jar MyJar.jar\n\
-\        jpackage --package-type <type> -n name \\\n\
+\        jpackage -t <type> -n name \\\n\
 \            --app-image <app image dir>\n\
 \    Generate a Java runtime package:\n\
 \        jpackage -n name --runtime-image <runtime-image>\n\
@@ -53,11 +53,11 @@
 \  @<filename> \n\
 \          Read options and/or mode from a file \n\
 \          This option can be used multiple times.\n\
-\  --package-type <type> \n\
+\  --type -t <type> \n\
 \          The type of package to create\n\
 \          Valid values are: {1} \n\
 \          If this option is not specified a platform dependent\n\
-\          default package type will be created.\n\
+\          default type will be created.\n\
 \  --app-version <version>\n\
 \          Version of the application and/or package\n\
 \  --copyright <copyright string>\n\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties	Wed Nov 06 07:20:07 2019 -0500
@@ -29,22 +29,22 @@
 Sample usages:\n\
 --------------\n\
 \    Generate a non-modular application image:\n\
-\        jpackage --package-type app-image -d destdir -i inputdir -n name \\\n\
+\        jpackage -t app-image -d destdir -i inputdir -n name \\\n\
 \            --main-class className --main-jar MyJar.jar\n\
 \    Generate a modular application image:\n\
-\        jpackage --package-type app-image -n name -p modulePath \\\n\
+\        jpackage -t app-image -n name -p modulePath \\\n\
 \            -m moduleName/className\n\
 \        To provide your own options to jlink, run jlink separately:\n\
 \            jlink --output appRuntimeImage -p ModulePath -m moduleName \\\n\
 \                --no-header-files [<additional jlink options>...]\n\
-\            jpackage --package-type app-image -n name \\\n\
+\            jpackage -t app-image -n name \\\n\
 \                -m moduleName/className --runtime-image appRuntimeImage\n\
 \    Generate an application package:\n\
-\        jpackage --package-type <type> -n name \\\n\
+\        jpackage -t <type> -n name \\\n\
 \            -p modulePath -m moduleName/className\n\
-\        jpackage --package-type <type> -i inputdir -n name \\\n\
+\        jpackage -t <type> -i inputdir -n name \\\n\
 \            --main-class package.ClassName --main-jar MyJar.jar\n\
-\        jpackage --package-type <type> -n name \\\n\
+\        jpackage -t <type> -n name \\\n\
 \            --app-image <app image dir>\n\
 \    Generate a Java runtime package:\n\
 \        jpackage -n name --runtime-image <runtime-image>\n\
@@ -53,11 +53,11 @@
 \  @<filename> \n\
 \          Read options and/or mode from a file \n\
 \          This option can be used multiple times.\n\
-\  --package-type <type> \n\
+\  --type -t <type> \n\
 \          The type of package to create\n\
 \          Valid values are: {1} \n\
 \          If this option is not specified a platform dependent\n\
-\          default package type will be created.\n\
+\          default type will be created.\n\
 \  --app-version <version>\n\
 \          Version of the application and/or package\n\
 \  --copyright <copyright string>\n\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties	Wed Nov 06 07:20:07 2019 -0500
@@ -29,22 +29,22 @@
 Sample usages:\n\
 --------------\n\
 \    Generate a non-modular application image:\n\
-\        jpackage --package-type app-image -d destdir -i inputdir -n name \\\n\
+\        jpackage -t app-image -d destdir -i inputdir -n name \\\n\
 \            --main-class className --main-jar MyJar.jar\n\
 \    Generate a modular application image:\n\
-\        jpackage --package-type app-image -n name -p modulePath \\\n\
+\        jpackage -t app-image -n name -p modulePath \\\n\
 \            -m moduleName/className\n\
 \        To provide your own options to jlink, run jlink separately:\n\
 \            jlink --output appRuntimeImage -p ModulePath -m moduleName \\\n\
 \                --no-header-files [<additional jlink options>...]\n\
-\            jpackage --package-type app-image -n name \\\n\
+\            jpackage -t app-image -n name \\\n\
 \                -m moduleName/className --runtime-image appRuntimeImage\n\
 \    Generate an application package:\n\
-\        jpackage --package-type <type> -n name \\\n\
+\        jpackage -t <type> -n name \\\n\
 \            -p modulePath -m moduleName/className\n\
-\        jpackage --package-type <type> -i inputdir -n name \\\n\
+\        jpackage -t <type> -i inputdir -n name \\\n\
 \            --main-class package.ClassName --main-jar MyJar.jar\n\
-\        jpackage --package-type <type> -n name \\\n\
+\        jpackage -t <type> -n name \\\n\
 \            --app-image <app image dir>\n\
 \    Generate a Java runtime package:\n\
 \        jpackage -n name --runtime-image <runtime-image>\n\
@@ -53,11 +53,11 @@
 \  @<filename> \n\
 \          Read options and/or mode from a file \n\
 \          This option can be used multiple times.\n\
-\  --package-type <type> \n\
+\  --type -t <type> \n\
 \          The type of package to create\n\
 \          Valid values are: {1} \n\
 \          If this option is not specified a platform dependent\n\
-\          default package type will be created.\n\
+\          default type will be created.\n\
 \  --app-version <version>\n\
 \          Version of the application and/or package\n\
 \  --copyright <copyright string>\n\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties	Wed Nov 06 07:20:07 2019 -0500
@@ -71,7 +71,7 @@
 
 ERR_NoMainClass=Error: Main application class is missing
 ERR_UnsupportedOption=Error: Option [{0}] is not valid on this platform
-ERR_InvalidTypeOption=Error: Option [{0}] is not valid with package-type [{1}]
+ERR_InvalidTypeOption=Error: Option [{0}] is not valid with type [{1}]
 ERR_NoInstallerEntryPoint=Error: Option [{0}] is not valid without --module or --main-jar entry point option
 
 ERR_MissingArgument=Error: Missing argument: {0}
@@ -85,7 +85,7 @@
 ERR_LicenseFileNotExit=Error: Specified license file does not exist
 ERR_BuildRootInvalid=Error: temp ({0}) must be non-existant or empty directory
 ERR_InvalidOption=Error: Invalid Option: [{0}]
-ERR_InvalidInstallerType=Error: Invalid or unsupported package type: [{0}]
+ERR_InvalidInstallerType=Error: Invalid or unsupported type: [{0}]
 ERR_BothMainJarAndModule=Error: Cannot have both --main-jar and --module Options
 ERR_NoEntryPoint=Error: creating application image requires --main-jar or --module Option
 ERR_InputNotDirectory=Error: Input directory specified is not a directory: {0}
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties	Wed Nov 06 07:20:07 2019 -0500
@@ -71,7 +71,7 @@
 
 ERR_NoMainClass=Error: Main application class is missing
 ERR_UnsupportedOption=Error: Option [{0}] is not valid on this platform
-ERR_InvalidTypeOption=Error: Option [{0}] is not valid with package-type [{1}]
+ERR_InvalidTypeOption=Error: Option [{0}] is not valid with type [{1}]
 ERR_NoInstallerEntryPoint=Error: Option [{0}] is not valid without --module or --main-jar entry point option
 
 ERR_MissingArgument=Error: Missing argument: {0}
@@ -85,7 +85,7 @@
 ERR_LicenseFileNotExit=Error: Specified license file does not exist
 ERR_BuildRootInvalid=Error: temp ({0}) must be non-existant or empty directory
 ERR_InvalidOption=Error: Invalid Option: [{0}]
-ERR_InvalidInstallerType=Error: Invalid or unsupported package type: [{0}]
+ERR_InvalidInstallerType=Error: Invalid or unsupported type: [{0}]
 ERR_BothMainJarAndModule=Error: Cannot have both --main-jar and --module Options
 ERR_NoEntryPoint=Error: creating application image requires --main-jar or --module Option
 ERR_InputNotDirectory=Error: Input directory specified is not a directory: {0}
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties	Wed Nov 06 07:13:25 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties	Wed Nov 06 07:20:07 2019 -0500
@@ -71,7 +71,7 @@
 
 ERR_NoMainClass=Error: Main application class is missing
 ERR_UnsupportedOption=Error: Option [{0}] is not valid on this platform
-ERR_InvalidTypeOption=Error: Option [{0}] is not valid with package-type [{1}]
+ERR_InvalidTypeOption=Error: Option [{0}] is not valid with type [{1}]
 ERR_NoInstallerEntryPoint=Error: Option [{0}] is not valid without --module or --main-jar entry point option
 
 ERR_MissingArgument=Error: Missing argument: {0}
@@ -85,7 +85,7 @@
 ERR_LicenseFileNotExit=Error: Specified license file does not exist
 ERR_BuildRootInvalid=Error: temp ({0}) must be non-existant or empty directory
 ERR_InvalidOption=Error: Invalid Option: [{0}]
-ERR_InvalidInstallerType=Error: Invalid or unsupported package type: [{0}]
+ERR_InvalidInstallerType=Error: Invalid or unsupported type: [{0}]
 ERR_BothMainJarAndModule=Error: Cannot have both --main-jar and --module Options
 ERR_NoEntryPoint=Error: creating application image requires --main-jar or --module Option
 ERR_InputNotDirectory=Error: Input directory specified is not a directory: {0}
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java	Wed Nov 06 07:20:07 2019 -0500
@@ -166,15 +166,15 @@
     }
 
     public boolean isImagePackageType() {
-        return PackageType.IMAGE == getArgumentValue("--package-type",
+        return PackageType.IMAGE == getArgumentValue("--type",
                 () -> null, PACKAGE_TYPES::get);
     }
 
     public PackageType packageType() {
         // Don't try to be in sync with jpackage defaults. Keep it simple:
-        // if no `--package-type` explicitely set on the command line, consider
+        // if no `--type` explicitely set on the command line, consider
         // this is operator's fault.
-        return getArgumentValue("--package-type",
+        return getArgumentValue("--type",
                 () -> {
                     throw new IllegalStateException("Package type not set");
                 }, PACKAGE_TYPES::get);
@@ -395,9 +395,9 @@
      * runtime directory.
      *
      * E.g.:
-     * [jpackage --name Foo --package-type rpm] -> `/opt/foo/lib/runtime`
-     * [jpackage --name Foo --package-type app-image --dest bar] -> `bar/Foo/lib/runtime`
-     * [jpackage --name Foo --package-type rpm --runtime-image java] -> `/opt/foo`
+     * [jpackage --name Foo --type rpm] -> `/opt/foo/lib/runtime`
+     * [jpackage --name Foo --type app-image --dest bar] -> `bar/Foo/lib/runtime`
+     * [jpackage --name Foo --type rpm --runtime-image java] -> `/opt/foo`
      */
     public Path appRuntimeDirectory() {
         return appLayout().runtimeDirectory();
@@ -406,8 +406,8 @@
     /**
      * Returns path for application launcher with the given name.
      *
-     * E.g.: [jpackage --name Foo --package-type rpm] -> `/opt/foo/bin/Foo`
-     * [jpackage --name Foo --package-type app-image --dest bar] ->
+     * E.g.: [jpackage --name Foo --type rpm] -> `/opt/foo/bin/Foo`
+     * [jpackage --name Foo --type app-image --dest bar] ->
      * `bar/Foo/bin/Foo`
      *
      * @param launcherName name of launcher or {@code null} for the main
@@ -454,8 +454,8 @@
      * Returns path to .cfg file of the given application launcher.
      *
      * E.g.:
-     * [jpackage --name Foo --package-type rpm] -> `/opt/foo/lib/app/Foo.cfg`
-     * [jpackage --name Foo --package-type app-image --dest bar] -> `bar/Foo/lib/app/Foo.cfg`
+     * [jpackage --name Foo --type rpm] -> `/opt/foo/lib/app/Foo.cfg`
+     * [jpackage --name Foo --type app-image --dest bar] -> `bar/Foo/lib/app/Foo.cfg`
      *
      * @param launcher name of launcher or {@code null} for the main launcher
      *
@@ -620,7 +620,7 @@
 
     public void verifyIsOfType(PackageType ... types) {
         final var typesSet = Stream.of(types).collect(Collectors.toSet());
-        if (!hasArgument("--package-type")) {
+        if (!hasArgument("--type")) {
             if (!isImagePackageType()) {
                 if (TKit.isLinux() && typesSet.equals(PackageType.LINUX)) {
                     return;
@@ -639,7 +639,7 @@
         }
 
         if (!typesSet.contains(packageType())) {
-            throw new IllegalArgumentException("Unexpected package type");
+            throw new IllegalArgumentException("Unexpected type");
         }
     }
 
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java	Wed Nov 06 07:20:07 2019 -0500
@@ -31,7 +31,7 @@
 import java.util.stream.Stream;
 
 /**
- * jpackage package type traits.
+ * jpackage type traits.
  */
 public enum PackageType {
     WIN_MSI(".msi",
@@ -65,7 +65,7 @@
     }
 
     void applyTo(JPackageCommand cmd) {
-        cmd.addArguments("--package-type", getName());
+        cmd.addArguments("--type", getName());
     }
 
     String getSuffix() {
--- a/test/jdk/tools/jpackage/macosx/SigningAppImageTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/macosx/SigningAppImageTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -35,7 +35,7 @@
 
 /*
  * @test
- * @summary jpackage with --package-type app-image --mac-sign
+ * @summary jpackage with --type app-image --mac-sign
  * @library ../helpers
  * @library /test/lib
  * @library base
--- a/test/jdk/tools/jpackage/macosx/SigningPackageTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/macosx/SigningPackageTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -35,7 +35,7 @@
 
 /*
  * @test
- * @summary jpackage with --package-type pkg,dmg --mac-sign
+ * @summary jpackage with --type pkg,dmg --mac-sign
  * @library ../helpers
  * @library /test/lib
  * @library base
--- a/test/jdk/tools/jpackage/share/AddLauncherModuleTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/AddLauncherModuleTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -34,7 +34,7 @@
 public class AddLauncherModuleTest {
     private static final String OUTPUT = "output";
     private static final String [] CMD = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--dest", OUTPUT,
         "--name", "test",
         "--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/AddLauncherTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/AddLauncherTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -36,7 +36,7 @@
 public class AddLauncherTest {
     private static final String OUTPUT = "output";
     private static final String [] CMD = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
@@ -50,7 +50,7 @@
     private final static String ARG1 = "original-argument";
 
     private static final String [] CMD1 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
--- a/test/jdk/tools/jpackage/share/AddLaunchersTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/AddLaunchersTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -35,7 +35,7 @@
     private static final String OUTPUT = "output";
     private static final String [] CMD1 = {
         "--description", "Test non modular app with multiple add-launchers where one is modular app and other is non modular app",
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
@@ -48,7 +48,7 @@
 
     private static final String [] CMD2 = {
         "--description", "Test modular app with multiple add-launchers where one is modular app and other is non modular app",
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
--- a/test/jdk/tools/jpackage/share/AppImagePackageTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/AppImagePackageTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -51,7 +51,7 @@
 
             JPackageCommand appImageCmd = JPackageCommand.helloAppImage()
                     .setArgumentValue("--dest", appimageOutput)
-                    .addArguments("--package-type", "app-image");
+                    .addArguments("--type", "app-image");
 
             PackageTest packageTest = new PackageTest();
             if (packageTest.getAction() == PackageTest.Action.CREATE) {
--- a/test/jdk/tools/jpackage/share/ErrorTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/ErrorTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -48,7 +48,7 @@
     private static final String EXPECTED2 = "--main-jar or --module";
 
     private static final String [] CMD1 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
@@ -57,7 +57,7 @@
     private static final String EXP1 = "main jar does not exist";
 
     private static final String [] CMD2 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
@@ -85,9 +85,9 @@
         JPackageHelper.createHelloImageJar();
 
         validate(JPackageHelper.executeToolProvider(false,
-            "--package-type", "app-image", ARG1), EXPECTED1, true);
+            "--type", "app-image", ARG1), EXPECTED1, true);
         validate(JPackageHelper.executeToolProvider(false,
-            "--package-type", "app-image", ARG2), EXPECTED2, true);
+            "--type", "app-image", ARG2), EXPECTED2, true);
 
         JPackageHelper.deleteOutputFolder(OUTPUT);
         validate(JPackageHelper.executeToolProvider(false, CMD1), EXP1, false);
--- a/test/jdk/tools/jpackage/share/InvalidArgTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/InvalidArgTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -63,21 +63,21 @@
 
     private static void testInvalidArg() throws Exception {
         String output = JPackageHelper.executeCLI(false,
-                "--package-type", "app-image", ARG1);
+                "--type", "app-image", ARG1);
         validate(ARG1, output);
 
         output = JPackageHelper.executeCLI(false,
-                "--package-type", "app-image", ARG2);
+                "--type", "app-image", ARG2);
         validate(ARG2, output);
     }
 
     private static void testInvalidArgToolProvider() throws Exception {
         String output = JPackageHelper.executeToolProvider(false,
-                "--package-type", "app-image", ARG1);
+                "--type", "app-image", ARG1);
         validate(ARG1, output);
 
         output = JPackageHelper.executeToolProvider(false,
-                "--package-type", "app-image", ARG2);
+                "--type", "app-image", ARG2);
         validate(ARG2, output);
     }
 
--- a/test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -47,7 +47,7 @@
                                    = "WARNING: Unknown module: other.mod.bar";
 
     private static final String[] CMD = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--description", "the two options below should cause two app execution "
             + "Warnings with two lines output saying: "
--- a/test/jdk/tools/jpackage/share/JavaOptionsModuleTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/JavaOptionsModuleTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -35,7 +35,7 @@
     private static final String OUTPUT = "output";
 
     private static final String[] CMD = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--dest", OUTPUT,
         "--name", "test",
         "--module", "com.hello/com.hello.Hello",
@@ -43,7 +43,7 @@
         "--java-options", "TBD"};
 
     private static final String[] CMD2 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--dest", OUTPUT,
         "--name", "test",
         "--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/JavaOptionsTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/JavaOptionsTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -35,7 +35,7 @@
     private static final String OUTPUT = "output";
 
     private static final String[] CMD = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
@@ -44,7 +44,7 @@
         "--java-options", "TBD"};
 
     private static final String[] CMD2 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", OUTPUT,
         "--name", "test",
--- a/test/jdk/tools/jpackage/share/MissingArgumentsTest.java	Wed Nov 06 07:13:25 2019 -0500
+++ b/test/jdk/tools/jpackage/share/MissingArgumentsTest.java	Wed Nov 06 07:20:07 2019 -0500
@@ -34,7 +34,7 @@
 public class MissingArgumentsTest {
     private static final String [] RESULT_1 = {"--input"};
     private static final String [] CMD_1 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--dest", "output",
         "--name", "test",
         "--main-jar", "hello.jar",
@@ -43,8 +43,8 @@
 
     private static final String [] RESULT_2 = {"--input", "--app-image"};
     private static final String [] CMD_2 = {
-        "--package-type", "app-image",
-        "--package-type", "invalid-package-type",
+        "--type", "app-image",
+        "--type", "invalid-type",
         "--dest", "output",
         "--name", "test",
         "--main-jar", "hello.jar",
@@ -53,7 +53,7 @@
 
     private static final String [] RESULT_3 = {"main class was not specified"};
     private static final String [] CMD_3 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", "output",
         "--name", "test",
@@ -62,7 +62,7 @@
 
     private static final String [] RESULT_4 = {"--main-jar"};
     private static final String [] CMD_4 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--input", "input",
         "--dest", "output",
         "--name", "test",
@@ -71,7 +71,7 @@
 
     private static final String [] RESULT_5 = {"--module-path", "--runtime-image"};
     private static final String [] CMD_5 = {
-        "--package-type", "app-image",
+        "--type", "app-image",
         "--dest", "output",
         "--name", "test",
         "--module", "com.hello/com.hello.Hello",
@@ -80,7 +80,7 @@
     private static final String [] RESULT_6 = {"--module-path", "--runtime-image",
                                                "--app-image"};
     private static final String [] CMD_6 = {
-        "--package-type", "invalid-package-type",
+        "--type", "invalid-type",
         "--dest", "output",
         "--name", "test",
         "--module", "com.hello/com.hello.Hello",