823359: Reorder jpackage help text to focus on package JDK-8200758-branch
authorherrick
Fri, 08 Nov 2019 16:48:20 -0500
branchJDK-8200758-branch
changeset 58996 58391f650fd7
parent 58995 de1413ae214c
child 58997 74e44250e3a7
823359: Reorder jpackage help text to focus on package Reviewed-by: asemenyuk, almatvee, kcr
src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources.properties
src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources_ja.properties
src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources_zh_CN.properties
test/jdk/tools/jpackage/share/jdk/jpackage/tests/BasicTest.java
--- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources.properties	Fri Nov 08 15:27:05 2019 -0500
+++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources.properties	Fri Nov 08 16:48:20 2019 -0500
@@ -28,24 +28,26 @@
 \n\
 Sample usages:\n\
 --------------\n\
-\    Generate a non-modular application image:\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 -t app-image -n name -p modulePath \\\n\
-\            -m moduleName/className\n\
+\    Generate an application package suitable for the host system:\n\
+\        For a modular application:\n\
+\            jpackage -n name -p modulePath -m moduleName/className\n\
+\        For a non-modular application:\n\
+\            jpackage -i inputDir -n name \\\n\
+\                --main-class className --main-jar myJar.jar\n\
+\        From a pre-built application image:\n\
+\            jpackage -n name --app-image appImageDir\n\
+\    Generate an application image:\n\
+\        For a modular application:\n\
+\            jpackage --type app-image -n name -p modulePath \\\n\
+\                -m moduleName/className\n\
+\        For a non-modular application:\n\
+\            jpackage --type app-image -i inputDir -n name \\\n\
+\                --main-class className --main-jar myJar.jar\n\
 \        To provide your own options to jlink, run jlink separately:\n\
-\            jlink --output appRuntimeImage -p ModulePath -m moduleName \\\n\
+\            jlink --output appRuntimeImage -p modulePath -m moduleName \\\n\
 \                --no-header-files [<additional jlink options>...]\n\
-\            jpackage -t app-image -n name \\\n\
+\            jpackage --type app-image -n name \\\n\
 \                -m moduleName/className --runtime-image appRuntimeImage\n\
-\    Generate an application package:\n\
-\        jpackage -t <type> -n name \\\n\
-\            -p modulePath -m moduleName/className\n\
-\        jpackage -t <type> -i inputdir -n name \\\n\
-\            --main-class package.ClassName --main-jar MyJar.jar\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\
 \n\
@@ -112,8 +114,7 @@
 \          If --runtime-image is not specified, jpackage will run jlink to\n\
 \          create the runtime image using options:\n\
 \          --strip-debug, --no-header-files, --no-man-pages, and\n\
-\          --strip-native-commands.  --bind-services will also be added if\n\
-\          --add-modules is not specified.\n\
+\          --strip-native-commands.\n\
 \n\
 \Options for creating the application image:\n\
 \  --icon <icon file path>\n\
@@ -269,6 +270,6 @@
 \          or Linux. Relative sub-path of the installation location of\n\
 \          the application such as "Program Files" or "AppData" on Windows.\n\
 
-MSG_Help_no_args=Usage: jpackage <mode> <options>\n\
+MSG_Help_no_args=Usage: jpackage <options>\n\
 \Use jpackage --help (or -h) for a list of possible options\
 
--- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources_ja.properties	Fri Nov 08 15:27:05 2019 -0500
+++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources_ja.properties	Fri Nov 08 16:48:20 2019 -0500
@@ -28,24 +28,26 @@
 \n\
 Sample usages:\n\
 --------------\n\
-\    Generate a non-modular application image:\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 -t app-image -n name -p modulePath \\\n\
-\            -m moduleName/className\n\
+\    Generate an application package suitable for the host system:\n\
+\        For a modular application:\n\
+\            jpackage -n name -p modulePath -m moduleName/className\n\
+\        For a non-modular application:\n\
+\            jpackage -i inputDir -n name \\\n\
+\                --main-class className --main-jar myJar.jar\n\
+\        From a pre-built application image:\n\
+\            jpackage -n name --app-image appImageDir\n\
+\    Generate an application image:\n\
+\        For a modular application:\n\
+\            jpackage --type app-image -n name -p modulePath \\\n\
+\                -m moduleName/className\n\
+\        For a non-modular application:\n\
+\            jpackage --type app-image -i inputDir -n name \\\n\
+\                --main-class className --main-jar myJar.jar\n\
 \        To provide your own options to jlink, run jlink separately:\n\
-\            jlink --output appRuntimeImage -p ModulePath -m moduleName \\\n\
+\            jlink --output appRuntimeImage -p modulePath -m moduleName \\\n\
 \                --no-header-files [<additional jlink options>...]\n\
-\            jpackage -t app-image -n name \\\n\
+\            jpackage --type app-image -n name \\\n\
 \                -m moduleName/className --runtime-image appRuntimeImage\n\
-\    Generate an application package:\n\
-\        jpackage -t <type> -n name \\\n\
-\            -p modulePath -m moduleName/className\n\
-\        jpackage -t <type> -i inputdir -n name \\\n\
-\            --main-class package.ClassName --main-jar MyJar.jar\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\
 \n\
@@ -112,8 +114,7 @@
 \          If --runtime-image is not specified, jpackage will run jlink to\n\
 \          create the runtime image using options:\n\
 \          --strip-debug, --no-header-files, --no-man-pages, and\n\
-\          --strip-native-commands.  --bind-services will also be added if\n\
-\          --add-modules is not specified.\n\
+\          --strip-native-commands.\n\
 \n\
 \Options for creating the application image:\n\
 \  --icon <icon file path>\n\
@@ -269,6 +270,6 @@
 \          or Linux. Relative sub-path of the installation location of\n\
 \          the application such as "Program Files" or "AppData" on Windows.\n\
 
-MSG_Help_no_args=Usage: jpackage <mode> <options>\n\
+MSG_Help_no_args=Usage: jpackage <options>\n\
 \Use jpackage --help (or -h) for a list of possible options\
 
--- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources_zh_CN.properties	Fri Nov 08 15:27:05 2019 -0500
+++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/HelpResources_zh_CN.properties	Fri Nov 08 16:48:20 2019 -0500
@@ -28,24 +28,26 @@
 \n\
 Sample usages:\n\
 --------------\n\
-\    Generate a non-modular application image:\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 -t app-image -n name -p modulePath \\\n\
-\            -m moduleName/className\n\
+\    Generate an application package suitable for the host system:\n\
+\        For a modular application:\n\
+\            jpackage -n name -p modulePath -m moduleName/className\n\
+\        For a non-modular application:\n\
+\            jpackage -i inputDir -n name \\\n\
+\                --main-class className --main-jar myJar.jar\n\
+\        From a pre-built application image:\n\
+\            jpackage -n name --app-image appImageDir\n\
+\    Generate an application image:\n\
+\        For a modular application:\n\
+\            jpackage --type app-image -n name -p modulePath \\\n\
+\                -m moduleName/className\n\
+\        For a non-modular application:\n\
+\            jpackage --type app-image -i inputDir -n name \\\n\
+\                --main-class className --main-jar myJar.jar\n\
 \        To provide your own options to jlink, run jlink separately:\n\
-\            jlink --output appRuntimeImage -p ModulePath -m moduleName \\\n\
+\            jlink --output appRuntimeImage -p modulePath -m moduleName \\\n\
 \                --no-header-files [<additional jlink options>...]\n\
-\            jpackage -t app-image -n name \\\n\
+\            jpackage --type app-image -n name \\\n\
 \                -m moduleName/className --runtime-image appRuntimeImage\n\
-\    Generate an application package:\n\
-\        jpackage -t <type> -n name \\\n\
-\            -p modulePath -m moduleName/className\n\
-\        jpackage -t <type> -i inputdir -n name \\\n\
-\            --main-class package.ClassName --main-jar MyJar.jar\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\
 \n\
@@ -112,8 +114,7 @@
 \          If --runtime-image is not specified, jpackage will run jlink to\n\
 \          create the runtime image using options:\n\
 \          --strip-debug, --no-header-files, --no-man-pages, and\n\
-\          --strip-native-commands.  --bind-services will also be added if\n\
-\          --add-modules is not specified.\n\
+\          --strip-native-commands.\n\
 \n\
 \Options for creating the application image:\n\
 \  --icon <icon file path>\n\
@@ -269,6 +270,6 @@
 \          or Linux. Relative sub-path of the installation location of\n\
 \          the application such as "Program Files" or "AppData" on Windows.\n\
 
-MSG_Help_no_args=Usage: jpackage <mode> <options>\n\
+MSG_Help_no_args=Usage: jpackage <options>\n\
 \Use jpackage --help (or -h) for a list of possible options\
 
--- a/test/jdk/tools/jpackage/share/jdk/jpackage/tests/BasicTest.java	Fri Nov 08 15:27:05 2019 -0500
+++ b/test/jdk/tools/jpackage/share/jdk/jpackage/tests/BasicTest.java	Fri Nov 08 16:48:20 2019 -0500
@@ -53,7 +53,7 @@
     public void testNoArgs() {
         List<String> output =
                 getJPackageToolProvider().executeAndGetOutput();
-        TKit.assertStringListEquals(List.of("Usage: jpackage <mode> <options>",
+        TKit.assertStringListEquals(List.of("Usage: jpackage <options>",
                 "Use jpackage --help (or -h) for a list of possible options"),
                 output, "Check jpackage output");
     }