8230521: rename --output/-o option and add default value (".")
Submitted-by: almatvee
Reviewed-by: herrick, asemenyuk
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java Sun Sep 15 07:34:39 2019 -0400
@@ -29,6 +29,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.Paths;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
@@ -121,6 +122,9 @@
allOptions = new ArrayList<>();
addLaunchers = new ArrayList<>();
+
+ output = Paths.get("").toAbsolutePath().toString();
+ deployParams.setOutput(new File(output));
}
// CLIOptions is public for DeployParamsTest
@@ -134,12 +138,12 @@
setOptionValue("input", context().input);
}),
- OUTPUT ("output", "o", OptionCategories.PROPERTY, () -> {
+ OUTPUT ("dest", "d", OptionCategories.PROPERTY, () -> {
context().output = popArg();
context().deployParams.setOutput(new File(context().output));
}),
- DESCRIPTION ("description", "d", OptionCategories.PROPERTY),
+ DESCRIPTION ("description", OptionCategories.PROPERTY),
VENDOR ("vendor", OptionCategories.PROPERTY),
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java Sun Sep 15 07:34:39 2019 -0400
@@ -179,10 +179,6 @@
}
public void validate() throws PackagerException {
- if (outdir == null) {
- throw new PackagerException("ERR_MissingArgument", "--output");
- }
-
boolean hasModule = (bundlerArguments.get(
Arguments.CLIOptions.MODULE.getId()) != null);
boolean hasAppImage = (bundlerArguments.get(
@@ -329,7 +325,7 @@
BundleParams getBundleParams() {
BundleParams bundleParams = new BundleParams();
- // construct app resources relative to output folder!
+ // construct app resources relative to destination folder!
bundleParams.setAppResourcesList(resources);
Map<String, String> unescapedHtmlParams = new TreeMap<>();
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties Sun Sep 15 07:34:39 2019 -0400
@@ -29,24 +29,25 @@
Sample usages:\n\
--------------\n\
\ Generate a non-modular application image:\n\
-\ jpackage --package-type app-image -o outputdir -i inputdir -n name \\\n\
+\ jpackage --package-type 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 -o outputdir -n name -p modulePath -m moduleName/className\n\
+\ jpackage --package-type 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 -o outputdir -n name \\\n\
+\ jpackage --package-type app-image -n name \\\n\
\ -m moduleName/className --runtime-image appRuntimeImage\n\
\ Generate an application package:\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -n name \\\n\
\ -p modulePath -m moduleName/className\n\
-\ jpackage --package-type <type> -i inputdir -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -i inputdir -n name \\\n\
\ --main-class package.ClassName --main-jar MyJar.jar\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -n name \\\n\
\ --app-image <app image dir>\n\
\ Generate a Java runtime package:\n\
-\ jpackage -o outputdir -n name --runtime-image <runtime-image>\n\
+\ jpackage -n name --runtime-image <runtime-image>\n\
\n\
Generic Options:\n\
\ @<filename> \n\
@@ -68,8 +69,9 @@
\ option for the current platform to the output stream, and exit\n\
\ --name -n <name>\n\
\ Name of the application and/or package\n\
-\ --output -o <output path>\n\
+\ --dest -d <destination path>\n\
\ Path where generated output file is placed\n\
+\ Defaults to the current working directory.\n\
\ (absolute path or relative to the current directory)\n\
\ --temp <file path>\n\
\ Path of a new or empty directory used to create temporary files\n\
@@ -268,8 +270,8 @@
MSG_Help_default_install_dir=\
\Absolute path of the installation directory of the application on OS X\n\
-\ or Linux. Relative sub-path of the installation location of the application\n\
-\ such as "Program Files" or "AppData" on Windows.\n\
+\ 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\
\Use jpackage --help (or -h) for a list of possible options\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties Sun Sep 15 07:34:39 2019 -0400
@@ -29,24 +29,25 @@
Sample usages:\n\
--------------\n\
\ Generate a non-modular application image:\n\
-\ jpackage --package-type app-image -o outputdir -i inputdir -n name \\\n\
+\ jpackage --package-type 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 -o outputdir -n name -p modulePath -m moduleName/className\n\
+\ jpackage --package-type 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 -o outputdir -n name \\\n\
+\ jpackage --package-type app-image -n name \\\n\
\ -m moduleName/className --runtime-image appRuntimeImage\n\
\ Generate an application package:\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -n name \\\n\
\ -p modulePath -m moduleName/className\n\
-\ jpackage --package-type <type> -i inputdir -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -i inputdir -n name \\\n\
\ --main-class package.ClassName --main-jar MyJar.jar\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -n name \\\n\
\ --app-image <app image dir>\n\
\ Generate a Java runtime package:\n\
-\ jpackage -o outputdir -n name --runtime-image <runtime-image>\n\
+\ jpackage -n name --runtime-image <runtime-image>\n\
\n\
Generic Options:\n\
\ @<filename> \n\
@@ -68,8 +69,9 @@
\ option for the current platform to the output stream, and exit\n\
\ --name -n <name>\n\
\ Name of the application and/or package\n\
-\ --output -o <output path>\n\
+\ --dest -d <destination path>\n\
\ Path where generated output file is placed\n\
+\ Defaults to the current working directory.\n\
\ (absolute path or relative to the current directory)\n\
\ --temp <file path>\n\
\ Path of a new or empty directory used to create temporary files\n\
@@ -268,8 +270,8 @@
MSG_Help_default_install_dir=\
\Absolute path of the installation directory of the application on OS X\n\
-\ or Linux. Relative sub-path of the installation location of the application\n\
-\ such as "Program Files" or "AppData" on Windows.\n\
+\ 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\
\Use jpackage --help (or -h) for a list of possible options\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties Sun Sep 15 07:34:39 2019 -0400
@@ -29,24 +29,25 @@
Sample usages:\n\
--------------\n\
\ Generate a non-modular application image:\n\
-\ jpackage --package-type app-image -o outputdir -i inputdir -n name \\\n\
+\ jpackage --package-type 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 -o outputdir -n name -p modulePath -m moduleName/className\n\
+\ jpackage --package-type 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 -o outputdir -n name \\\n\
+\ jpackage --package-type app-image -n name \\\n\
\ -m moduleName/className --runtime-image appRuntimeImage\n\
\ Generate an application package:\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -n name \\\n\
\ -p modulePath -m moduleName/className\n\
-\ jpackage --package-type <type> -i inputdir -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -i inputdir -n name \\\n\
\ --main-class package.ClassName --main-jar MyJar.jar\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
+\ jpackage --package-type <type> -n name \\\n\
\ --app-image <app image dir>\n\
\ Generate a Java runtime package:\n\
-\ jpackage -o outputdir -n name --runtime-image <runtime-image>\n\
+\ jpackage -n name --runtime-image <runtime-image>\n\
\n\
Generic Options:\n\
\ @<filename> \n\
@@ -68,8 +69,9 @@
\ option for the current platform to the output stream, and exit\n\
\ --name -n <name>\n\
\ Name of the application and/or package\n\
-\ --output -o <output path>\n\
+\ --dest -d <destination path>\n\
\ Path where generated output file is placed\n\
+\ Defaults to the current working directory.\n\
\ (absolute path or relative to the current directory)\n\
\ --temp <file path>\n\
\ Path of a new or empty directory used to create temporary files\n\
@@ -268,8 +270,8 @@
MSG_Help_default_install_dir=\
\Absolute path of the installation directory of the application on OS X\n\
-\ or Linux. Relative sub-path of the installation location of the application\n\
-\ such as "Program Files" or "AppData" on Windows.\n\
+\ 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\
\Use jpackage --help (or -h) for a list of possible options\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties Sun Sep 15 07:34:39 2019 -0400
@@ -40,9 +40,9 @@
message.debug-working-directory=Kept working directory for debug: {0}
message.bundle-created=Succeeded in building {0} package
-error.cannot-create-output-dir=Output directory {0} cannot be created
-error.cannot-write-to-output-dir=Output directory {0} is not writable
-error.root-exists=Error: Application output directory {0} already exists
+error.cannot-create-output-dir=Destination directory {0} cannot be created
+error.cannot-write-to-output-dir=Destination directory {0} is not writable
+error.root-exists=Error: Application destination directory {0} already exists
error.no-main-class-with-main-jar=A main class was not specified nor was one found in the jar {0}
error.no-main-class-with-main-jar.advice=Specify a main class or ensure that the jar {0} specifies one in the manifest
error.no-main-class=A main class was not specified nor was one found in the supplied application resources
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties Sun Sep 15 07:34:39 2019 -0400
@@ -40,9 +40,9 @@
message.debug-working-directory=Kept working directory for debug: {0}
message.bundle-created=Succeeded in building {0} package
-error.cannot-create-output-dir=Output directory {0} cannot be created
-error.cannot-write-to-output-dir=Output directory {0} is not writable
-error.root-exists=Error: Application output directory {0} already exists
+error.cannot-create-output-dir=Destination directory {0} cannot be created
+error.cannot-write-to-output-dir=Destination directory {0} is not writable
+error.root-exists=Error: Application destination directory {0} already exists
error.no-main-class-with-main-jar=A main class was not specified nor was one found in the jar {0}
error.no-main-class-with-main-jar.advice=Specify a main class or ensure that the jar {0} specifies one in the manifest
error.no-main-class=A main class was not specified nor was one found in the supplied application resources
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties Thu Sep 12 15:21:34 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties Sun Sep 15 07:34:39 2019 -0400
@@ -40,9 +40,9 @@
message.debug-working-directory=Kept working directory for debug: {0}
message.bundle-created=Succeeded in building {0} package
-error.cannot-create-output-dir=Output directory {0} cannot be created
-error.cannot-write-to-output-dir=Output directory {0} is not writable
-error.root-exists=Error: Application output directory {0} already exists
+error.cannot-create-output-dir=Destination directory {0} cannot be created
+error.cannot-write-to-output-dir=Destination directory {0} is not writable
+error.root-exists=Error: Application destination directory {0} already exists
error.no-main-class-with-main-jar=A main class was not specified nor was one found in the jar {0}
error.no-main-class-with-main-jar.advice=Specify a main class or ensure that the jar {0} specifies one in the manifest
error.no-main-class=A main class was not specified nor was one found in the supplied application resources
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java Sun Sep 15 07:34:39 2019 -0400
@@ -137,7 +137,7 @@
}
public Path outputDir() {
- return getArgumentValue("--output", () -> Test.defaultOutputDir(), Path::of);
+ return getArgumentValue("--dest", () -> Test.defaultOutputDir(), Path::of);
}
public Path inputDir() {
@@ -159,7 +159,7 @@
public JPackageCommand setDefaultInputOutput() {
verifyMutable();
addArguments("--input", Test.defaultInputDir().toString());
- addArguments("--output", Test.defaultOutputDir().toString());
+ addArguments("--dest", Test.defaultOutputDir().toString());
return this;
}
@@ -274,7 +274,7 @@
/**
* Returns path to application image directory.
*
- * E.g. if --output is set to `foo` and --name is set to `bar` the function
+ * E.g. if --dest is set to `foo` and --name is set to `bar` the function
* will return `foo/bar` path.
*
* @throws IllegalArgumentException is command is doing platform packaging
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -48,7 +48,7 @@
/**
* Default test configuration for jpackage command. Default jpackage command
* initialization includes:
- * <li>Set --input and --output parameters.
+ * <li>Set --input and --dest parameters.
* <li>Set --name parameter. Value of the parameter is the name of the first
* class with main function found in the callers stack. Defaults can be
* overridden with custom initializers set with subsequent addInitializer()
@@ -166,7 +166,7 @@
public JPackageCommand get() {
JPackageCommand cmd = new JPackageCommand().setDefaultInputOutput();
if (bundleOutputDir != null) {
- cmd.setArgumentValue("--output", bundleOutputDir.toString());
+ cmd.setArgumentValue("--dest", bundleOutputDir.toString());
}
cmd.setDefaultAppName();
return cmd;
--- a/test/jdk/tools/jpackage/macosx/BundleIdentifierTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/BundleIdentifierTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -51,7 +51,7 @@
private static final String [] CMD_1 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", APP_NAME,
"--main-jar", "hello.jar",
"--main-class", MAIN_CLASS
@@ -60,7 +60,7 @@
private static final String [] CMD_2 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", APP_NAME,
"--main-jar", "hello.jar",
"--main-class", MAIN_CLASS,
--- a/test/jdk/tools/jpackage/macosx/BundleNameTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/BundleNameTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -50,7 +50,7 @@
private static final String [] CMD_1 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", APP_NAME,
"--main-jar", "hello.jar",
"--main-class", "Hello"
@@ -59,7 +59,7 @@
private static final String [] CMD_2 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", APP_NAME,
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/macosx/base/Base.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public class Base {
-
- private static String TEST_NAME;
- private static String EXT;
- private static String OUTPUT;
- private static String[] CMD;
-
- private static void copyResults() throws Exception {
- List<String> files = new ArrayList<>();
- files.add(OUTPUT);
- JPackageInstallerHelper.copyTestResults(files);
- }
-
- private static void testCreateInstaller() throws Exception {
- JPackageHelper.executeCLI(true, CMD);
- JPackageInstallerHelper.validateOutput(OUTPUT);
- copyResults();
- }
-
- private static void verifyInstall() throws Exception {
- String app = JPackagePath.getOSXInstalledApp(TEST_NAME);
- JPackageInstallerHelper.validateApp(app);
- }
-
- private static void verifyUnInstall() throws Exception {
- // Not needed on OS X, since we just deleting installed application
- // without using generated installer. We keeping this for consistnency
- // between platforms.
- }
-
- private static void init(String name, String ext) {
- TEST_NAME = name;
- EXT = ext;
- OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
- CMD = new String[]{
- "--package-type", EXT,
- "--input", "input",
- "--output", "output",
- "--name", TEST_NAME,
- "--main-jar", "hello.jar",
- "--main-class", "Hello"};
- }
-
- public static void run(String name, String ext) throws Exception {
- init(name, ext);
-
- if (JPackageInstallerHelper.isVerifyInstall()) {
- verifyInstall();
- } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
- verifyUnInstall();
- } else {
- JPackageHelper.createHelloInstallerJar();
- testCreateInstaller();
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/base/FileAssociationsBase.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.awt.Desktop;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.List;
-
-public class FileAssociationsBase {
-
- private static String TEST_NAME;
- private static String EXT;
- private static String TEST_EXT;
- private static String OUTPUT;
- private static String[] CMD;
-
- private static void copyResults() throws Exception {
- List<String> files = new ArrayList<>();
- files.add(OUTPUT);
- JPackageInstallerHelper.copyTestResults(files);
- }
-
- private static void testCreateInstaller() throws Exception {
- JPackageHelper.executeCLI(true, CMD);
- JPackageInstallerHelper.validateOutput(OUTPUT);
- copyResults();
- }
-
- private static void validateAppOutput() throws Exception {
- File outFile = new File("appOutput.txt");
- int count = 10;
- boolean bOutputCreated = false;
- while (count > 0) {
- if (!outFile.exists()) {
- Thread.sleep(3000);
- count--;
- } else {
- bOutputCreated = true;
- break;
- }
- }
-
- if (!bOutputCreated) {
- throw new AssertionError(outFile.getAbsolutePath() + " was not created");
- }
-
- String output = Files.readString(outFile.toPath());
- String[] result = output.split("\n");
- if (result.length != 3) {
- System.err.println(output);
- throw new AssertionError(
- "Unexpected number of lines: " + result.length);
- }
-
- if (!result[0].trim().equals("jpackage test application")) {
- throw new AssertionError("Unexpected result[0]: " + result[0]);
- }
-
- if (!result[1].trim().equals("args.length: 1")) {
- throw new AssertionError("Unexpected result[1]: " + result[1]);
- }
-
- File faFile = new File(TEST_NAME + "." + TEST_EXT);
- if (!result[2].trim().equals(faFile.getAbsolutePath())) {
- throw new AssertionError("Unexpected result[2]: " + result[2]);
- }
- }
-
- private static void verifyInstall() throws Exception {
- createAssociationsTestFile();
- Desktop.getDesktop().open(new File(TEST_NAME + "." + TEST_EXT));
- validateAppOutput();
- }
-
- private static void verifyUnInstall() throws Exception {
- // Not needed on OS X, since we just deleting installed application
- // without using generated installer. We keeping this for consistnency
- // between platforms.
- }
-
- private static void createAssociationsTestFile() throws Exception {
- try (PrintWriter out = new PrintWriter(new BufferedWriter(
- new FileWriter(TEST_NAME + "." + TEST_EXT)))) {
- out.println(TEST_NAME);
- }
- }
-
- private static void createAssociationsProperties() throws Exception {
- try (PrintWriter out = new PrintWriter(new BufferedWriter(
- new FileWriter("fa.properties")))) {
- out.println("extension=" + TEST_EXT);
- out.println("mime-type=application/x-jpackage-" + TEST_EXT);
- out.println("description=jpackage test extention");
- }
- }
-
- private static void init(String name, String ext) {
- TEST_NAME = name;
- EXT = ext;
- TEST_EXT = "jptest1";
- OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
- CMD = new String[]{
- "--package-type", EXT,
- "--input", "input",
- "--output", "output",
- "--name", TEST_NAME,
- "--main-jar", "hello.jar",
- "--main-class", "Hello",
- "--file-associations", "fa.properties"};
- }
-
- public static void run(String name, String ext) throws Exception {
- init(name, ext);
-
- if (JPackageInstallerHelper.isVerifyInstall()) {
- verifyInstall();
- } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
- verifyUnInstall();
- } else {
- JPackageHelper.createHelloInstallerJar();
- createAssociationsProperties();
- testCreateInstaller();
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/base/InstallDirBase.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public class InstallDirBase {
-
- private static String TEST_NAME;
- private static String EXT;
- private static String OUTPUT;
- private static String[] CMD;
-
- private static void copyResults() throws Exception {
- List<String> files = new ArrayList<>();
- files.add(OUTPUT);
- JPackageInstallerHelper.copyTestResults(files);
- }
-
- private static void testCreateInstaller() throws Exception {
- JPackageHelper.executeCLI(true, CMD);
- JPackageInstallerHelper.validateOutput(OUTPUT);
- copyResults();
- }
-
- private static void verifyInstall() throws Exception {
- String app = JPackagePath.getOSXInstalledApp("jpackage", TEST_NAME);
- JPackageInstallerHelper.validateApp(app);
- }
-
- private static void verifyUnInstall() throws Exception {
- // Not needed on OS X, since we just deleting installed application
- // without using generated installer. We keeping this for consistnency
- // between platforms.
- }
-
- private static void init(String name, String ext) {
- TEST_NAME = name;
- EXT = ext;
- OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
- CMD = new String[]{
- "--package-type", EXT,
- "--input", "input",
- "--output", "output",
- "--name", TEST_NAME,
- "--main-jar", "hello.jar",
- "--main-class", "Hello",
- "--install-dir", "/Applications/jpackage"};
- }
-
- public static void run(String name, String ext) throws Exception {
- init(name, ext);
-
- if (JPackageInstallerHelper.isVerifyInstall()) {
- verifyInstall();
- } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
- verifyUnInstall();
- } else {
- JPackageHelper.createHelloInstallerJar();
- testCreateInstaller();
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/base/LicenseBase.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public class LicenseBase {
-
- private static String TEST_NAME;
- private static String EXT;
- private static String OUTPUT;
- private static String[] CMD;
-
- private static void copyResults() throws Exception {
- List<String> files = new ArrayList<>();
- files.add(OUTPUT);
- JPackageInstallerHelper.copyTestResults(files);
- }
-
- private static void testCreateInstaller() throws Exception {
- JPackageHelper.executeCLI(true, CMD);
- JPackageInstallerHelper.validateOutput(OUTPUT);
- copyResults();
- }
-
- private static void verifyInstall() throws Exception {
- String app = JPackagePath.getOSXInstalledApp(TEST_NAME);
- JPackageInstallerHelper.validateApp(app);
-
- }
-
- private static void verifyUnInstall() throws Exception {
- // Not needed on OS X, since we just deleting installed application
- // without using generated installer. We keeping this for consistnency
- // between platforms.
- }
-
- private static void init(String name, String ext) {
- TEST_NAME = name;
- EXT = ext;
- OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
- CMD = new String [] {
- "--package-type", EXT,
- "--input", "input",
- "--output", "output",
- "--name", TEST_NAME,
- "--main-jar", "hello.jar",
- "--main-class", "Hello",
- "--license-file", JPackagePath.getLicenseFilePath()};
- }
-
- public static void run(String name, String ext) throws Exception {
- init(name, ext);
-
- if (JPackageInstallerHelper.isVerifyInstall()) {
- verifyInstall();
- } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
- verifyUnInstall();
- } else {
- JPackageHelper.createHelloInstallerJar();
- testCreateInstaller();
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/base/OptionsBase.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/base/OptionsBase.java Sun Sep 15 07:34:39 2019 -0400
@@ -151,7 +151,7 @@
CMD = new String[] {
"--package-type", EXT,
"--input", "input",
- "--output", "output",
+ "--dest", "output",
"--name", TEST_NAME,
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/macosx/dmg/FileAssociationsTest.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build FileAssociationsBase
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @modules jdk.jpackage/jdk.jpackage.internal
- * @run main/othervm -Xmx512m FileAssociationsTest
- */
-public class FileAssociationsTest {
- private static final String TEST_NAME = "FileAssociationsTest";
- private static final String EXT = "dmg";
-
- public static void main(String[] args) throws Exception {
- if (jdk.jpackage.internal.MacDmgBundler.isSupported()) {
- FileAssociationsBase.run(TEST_NAME, EXT);
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/dmg/InstallDirTest.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build InstallDirBase
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @modules jdk.jpackage/jdk.jpackage.internal
- * @run main/othervm -Xmx512m InstallDirTest
- */
-public class InstallDirTest {
- private static final String TEST_NAME = "InstallDirTest";
- private static final String EXT = "dmg";
-
- public static void main(String[] args) throws Exception {
- if (jdk.jpackage.internal.MacDmgBundler.isSupported()) {
- InstallDirBase.run(TEST_NAME, EXT);
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/dmg/LicenseTest.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build LicenseBase
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @modules jdk.jpackage/jdk.jpackage.internal
- * @run main/othervm -Xmx512m LicenseTest
- */
-public class LicenseTest {
- private static final String TEST_NAME = "LicenseTest";
- private static final String EXT = "dmg";
-
- public static void main(String[] args) throws Exception {
- if (jdk.jpackage.internal.MacDmgBundler.isSupported()) {
- LicenseBase.run(TEST_NAME, EXT);
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/dmg/Test.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build Base
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @modules jdk.jpackage/jdk.jpackage.internal
- * @run main/othervm -Xmx512m Test
- */
-public class Test {
- private static final String TEST_NAME = "Test";
- private static final String EXT = "dmg";
-
- public static void main(String[] args) throws Exception {
- if (jdk.jpackage.internal.MacDmgBundler.isSupported()) {
- Base.run(TEST_NAME, EXT);
- }
- }
-}
--- a/test/jdk/tools/jpackage/macosx/dmg/install.sh Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/dmg/install.sh Sun Sep 15 07:34:39 2019 -0400
@@ -1,26 +1,6 @@
echo "Note: This script will install DMG files silently. In order to verify UI, each .dmg needs to launched manually via Finder."
-# Test
-hdiutil attach Test-1.0.dmg
-sudo /usr/sbin/installer -pkg /Volumes/Test/Test-1.0.pkg -target /
-hdiutil detach /Volumes/Test/
-
-# LicenseTest
-hdiutil attach LicenseTest-1.0.dmg
-sudo /usr/sbin/installer -pkg /Volumes/LicenseTest/LicenseTest-1.0.pkg -target /
-hdiutil detach /Volumes/LicenseTest/
-
-# AssociationsTest
-hdiutil attach AssociationsTest-1.0.dmg
-sudo /usr/sbin/installer -pkg /Volumes/AssociationsTest/AssociationsTest-1.0.pkg -target /
-hdiutil detach /Volumes/AssociationsTest/
-
# OptionsTest
hdiutil attach OptionsTest-1.0.dmg
sudo /usr/sbin/installer -pkg /Volumes/OptionsTest/OptionsTest-1.0.pkg -target /
hdiutil detach /Volumes/OptionsTest/
-
-# InstallDirTest
-hdiutil attach InstallDirTest-1.0.dmg
-sudo /usr/sbin/installer -pkg /Volumes/InstallDirTest/InstallDirTest-1.0.pkg -target /
-hdiutil detach /Volumes/InstallDirTest/
--- a/test/jdk/tools/jpackage/macosx/dmg/uninstall.sh Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/dmg/uninstall.sh Sun Sep 15 07:34:39 2019 -0400
@@ -1,5 +1,1 @@
-sudo rm -rf /Applications/Test.app
-sudo rm -rf /Applications/LicenseTest.app
-sudo rm -rf /Applications/FileAssociationsTest.app
sudo rm -rf /Applications/OptionsTest.app
-sudo rm -rf /Applications/jpackage/InstallDirTest.app
--- a/test/jdk/tools/jpackage/macosx/pkg/FileAssociationsTest.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build FileAssociationsBase
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @run main/othervm -Xmx512m FileAssociationsTest
- */
-public class FileAssociationsTest {
- private static final String TEST_NAME = "FileAssociationsTest";
- private static final String EXT = "pkg";
-
- public static void main(String[] args) throws Exception {
- FileAssociationsBase.run(TEST_NAME, EXT);
- }
-}
--- a/test/jdk/tools/jpackage/macosx/pkg/InstallDirTest.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build InstallDirBase
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @run main/othervm -Xmx512m InstallDirTest
- */
-public class InstallDirTest {
- private static final String TEST_NAME = "InstallDirTest";
- private static final String EXT = "pkg";
-
- public static void main(String[] args) throws Exception {
- InstallDirBase.run(TEST_NAME, EXT);
- }
-}
--- a/test/jdk/tools/jpackage/macosx/pkg/LicenseTest.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build LicenseBase
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @run main/othervm -Xmx512m LicenseTest
- */
-public class LicenseTest {
- private static final String TEST_NAME = "LicenseTest";
- private static final String EXT = "pkg";
-
- public static void main(String[] args) throws Exception {
- LicenseBase.run(TEST_NAME, EXT);
- }
-}
--- a/test/jdk/tools/jpackage/macosx/pkg/Test.java Thu Sep 12 15:21:34 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary jpackage create installer test
- * @library ../../helpers
- * @library ../base
- * @build JPackageHelper
- * @build JPackagePath
- * @build JPackageInstallerHelper
- * @build Base
- * @requires (os.family == "mac")
- * @modules jdk.jpackage
- * @run main/othervm -Xmx512m Test
- */
-public class Test {
- private static final String TEST_NAME = "Test";
- private static final String EXT = "pkg";
-
- public static void main(String[] args) throws Exception {
- Base.run(TEST_NAME, EXT);
- }
-}
--- a/test/jdk/tools/jpackage/macosx/pkg/install.sh Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/pkg/install.sh Sun Sep 15 07:34:39 2019 -0400
@@ -1,6 +1,2 @@
echo Note: This script will install packages silently. In order to verify UI, each .pkg needs to launched manually via Finder.
-sudo /usr/sbin/installer -pkg Test-1.0.pkg -target /
-sudo /usr/sbin/installer -pkg LicenseTest-1.0.pkg -target /
-sudo /usr/sbin/installer -pkg FileAssociationsTest-1.0.pkg -target /
sudo /usr/sbin/installer -pkg OptionsTest-1.0.pkg -target /
-sudo /usr/sbin/installer -pkg InstallDirTest-1.0.pkg -target /
--- a/test/jdk/tools/jpackage/macosx/pkg/uninstall.sh Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/pkg/uninstall.sh Sun Sep 15 07:34:39 2019 -0400
@@ -1,5 +1,1 @@
-sudo rm -rf /Applications/Test.app
-sudo rm -rf /Applications/LicenseTest.app
-sudo rm -rf /Applications/FileAssociationsTest.app
sudo rm -rf /Applications/OptionsDirTest.app
-sudo rm -rf /Applications/jpackage/InstallDirTest.app
--- a/test/jdk/tools/jpackage/share/AddLauncherModuleTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddLauncherModuleTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -35,7 +35,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
--- a/test/jdk/tools/jpackage/share/AddLauncherTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddLauncherTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -36,7 +36,7 @@
private static final String [] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/AddLaunchersTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddLaunchersTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -37,7 +37,7 @@
"--description", "Test non modular app with multiple add-launchers where one is modular app and other is non modular app",
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
@@ -50,7 +50,7 @@
"--description", "Test modular app with multiple add-launchers where one is modular app and other is non modular app",
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "module",
--- a/test/jdk/tools/jpackage/share/AddModulesTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddModulesTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -36,7 +36,7 @@
private static final String [] CMD1 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
@@ -45,7 +45,7 @@
private static final String [] CMD2 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
@@ -54,7 +54,7 @@
private static final String [] CMD3 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
--- a/test/jdk/tools/jpackage/share/AppVersionTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AppVersionTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -42,7 +42,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
@@ -51,7 +51,7 @@
private static final String[] CMD_VERSION = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/ArgumentsModuleTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ArgumentsModuleTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -36,7 +36,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
--- a/test/jdk/tools/jpackage/share/ArgumentsTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ArgumentsTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -37,7 +37,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/AtFilenameTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AtFilenameTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -37,7 +37,7 @@
private static final String [] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/ErrorTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ErrorTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -44,13 +44,13 @@
private static final String ARG1 = "--no-such-argument";
private static final String EXPECTED1 =
"Invalid Option: [--no-such-argument]";
- private static final String ARG2 = "--output";
+ private static final String ARG2 = "--dest";
private static final String EXPECTED2 = "--main-jar or --module";
private static final String [] CMD1 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "non-existant.jar",
};
@@ -59,7 +59,7 @@
private static final String [] CMD2 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
};
@@ -86,7 +86,7 @@
validate(JPackageHelper.executeToolProvider(false,
"--package-type", "app-image", ARG1), EXPECTED1, true);
- validate(JPackageHelper.executeToolProvider(false,
+ validate(JPackageHelper.executeToolProvider(false,
"--package-type", "app-image", ARG2), EXPECTED2, true);
JPackageHelper.deleteOutputFolder(OUTPUT);
--- a/test/jdk/tools/jpackage/share/IconTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/IconTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -45,7 +45,7 @@
"--main-jar", "hello.jar",
"--main-class", "Hello",
"--icon", getIconPath(),
- "--output", OUTPUT};
+ "--dest", OUTPUT};
private static void validateResult(String[] result) throws Exception {
if (result.length != 2) {
--- a/test/jdk/tools/jpackage/share/InvalidArgTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/InvalidArgTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -33,7 +33,7 @@
public class InvalidArgTest {
private static final String ARG1 = "--no-such-argument";
- private static final String ARG2 = "--output";
+ private static final String ARG2 = "--dest";
private static final String RESULT1 =
"Invalid Option: [--no-such-argument]";
private static final String RESULT2 = "--main-jar or --module";
--- a/test/jdk/tools/jpackage/share/JLinkModuleTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JLinkModuleTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -39,7 +39,7 @@
private static final String [] CMD = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.other/com.other.Other",
"--runtime-image", RUNTIME,
--- a/test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -52,7 +52,7 @@
"--description", "the two options below should cause two app execution "
+ "Warnings with two lines output saying: "
+ "WARNING: Unknown module: <module-name>",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/JavaOptionsModuleTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JavaOptionsModuleTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -36,7 +36,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
@@ -44,7 +44,7 @@
private static final String[] CMD2 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
--- a/test/jdk/tools/jpackage/share/JavaOptionsTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JavaOptionsTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -37,7 +37,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
@@ -46,7 +46,7 @@
private static final String[] CMD2 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/MainClassAttributeTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/MainClassAttributeTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -41,7 +41,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar"};
--- a/test/jdk/tools/jpackage/share/MainClassErrorTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/MainClassErrorTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -41,7 +41,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar"};
--- a/test/jdk/tools/jpackage/share/MissingArgumentsTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/MissingArgumentsTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -32,65 +32,56 @@
*/
public class MissingArgumentsTest {
- private static final String [] RESULT_1 = {"--output"};
+ private static final String [] RESULT_1 = {"--input"};
private static final String [] CMD_1 = {
"--package-type", "app-image",
- "--input", "input",
+ "--dest", "output",
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
};
- private static final String [] RESULT_2 = {"--input"};
+ private static final String [] RESULT_2 = {"--input", "--app-image"};
private static final String [] CMD_2 = {
"--package-type", "app-image",
- "--output", "output",
- "--name", "test",
- "--main-jar", "hello.jar",
- "--main-class", "Hello",
- };
-
- private static final String [] RESULT_3 = {"--input", "--app-image"};
- private static final String [] CMD_3 = {
- "--package-type", "app-image",
"--package-type", "invalid-package-type",
- "--output", "output",
+ "--dest", "output",
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
};
- private static final String [] RESULT_4 = {"main class was not specified"};
- private static final String [] CMD_4 = {
+ private static final String [] RESULT_3 = {"main class was not specified"};
+ private static final String [] CMD_3 = {
"--package-type", "app-image",
"--input", "input",
- "--output", "output",
+ "--dest", "output",
"--name", "test",
"--main-jar", "hello.jar",
};
- private static final String [] RESULT_5 = {"--main-jar"};
- private static final String [] CMD_5 = {
+ private static final String [] RESULT_4 = {"--main-jar"};
+ private static final String [] CMD_4 = {
"--package-type", "app-image",
"--input", "input",
- "--output", "output",
+ "--dest", "output",
"--name", "test",
"--main-class", "Hello",
};
- private static final String [] RESULT_6 = {"--module-path", "--runtime-image"};
- private static final String [] CMD_6 = {
+ private static final String [] RESULT_5 = {"--module-path", "--runtime-image"};
+ private static final String [] CMD_5 = {
"--package-type", "app-image",
- "--output", "output",
+ "--dest", "output",
"--name", "test",
"--module", "com.hello/com.hello.Hello",
};
- private static final String [] RESULT_7 = {"--module-path", "--runtime-image",
+ private static final String [] RESULT_6 = {"--module-path", "--runtime-image",
"--app-image"};
- private static final String [] CMD_7 = {
+ private static final String [] CMD_6 = {
"--package-type", "invalid-package-type",
- "--output", "output",
+ "--dest", "output",
"--name", "test",
"--module", "com.hello/com.hello.Hello",
};
@@ -121,10 +112,10 @@
validate(output, RESULT_2, true);
output = JPackageHelper.executeCLI(false, CMD_3);
- validate(output, RESULT_3, true);
+ validate(output, RESULT_3, false);
output = JPackageHelper.executeCLI(false, CMD_4);
- validate(output, RESULT_4, false);
+ validate(output, RESULT_4, true);
output = JPackageHelper.executeCLI(false, CMD_5);
validate(output, RESULT_5, true);
@@ -132,9 +123,6 @@
output = JPackageHelper.executeCLI(false, CMD_6);
validate(output, RESULT_6, true);
- output = JPackageHelper.executeCLI(false, CMD_7);
- validate(output, RESULT_7, true);
-
}
private static void testMissingArgToolProvider() throws Exception {
@@ -145,19 +133,16 @@
validate(output, RESULT_2, true);
output = JPackageHelper.executeToolProvider(false, CMD_3);
- validate(output, RESULT_3, true);
+ validate(output, RESULT_3, false);
output = JPackageHelper.executeToolProvider(false, CMD_4);
- validate(output, RESULT_4, false);
+ validate(output, RESULT_4, true);
output = JPackageHelper.executeToolProvider(false, CMD_5);
validate(output, RESULT_5, true);
output = JPackageHelper.executeToolProvider(false, CMD_6);
validate(output, RESULT_6, true);
-
- output = JPackageHelper.executeToolProvider(false, CMD_7);
- validate(output, RESULT_7, true);
}
public static void main(String[] args) throws Exception {
--- a/test/jdk/tools/jpackage/share/ModularJarTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModularJarTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -37,7 +37,7 @@
private static final String [] CMD1 = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "com.hello.jar",
"--main-class", "com.hello.Hello",
@@ -45,7 +45,7 @@
private static final String [] CMD2 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input/com.hello.jar",
--- a/test/jdk/tools/jpackage/share/ModuleMainClassErrorTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModuleMainClassErrorTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -40,14 +40,14 @@
private static final String [] CMD1 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello",
"--module-path", "input"};
private static final String [] CMD2 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input"};
--- a/test/jdk/tools/jpackage/share/ModulePathTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModulePathTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -39,7 +39,7 @@
private static final String [] CMD1 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
@@ -47,7 +47,7 @@
private static final String [] CMD2 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input" + File.pathSeparator + "input-other",
@@ -55,7 +55,7 @@
private static final String [] CMD3 = {
"--package-type", "app-image",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input",
--- a/test/jdk/tools/jpackage/share/ModuleTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModuleTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -38,7 +38,7 @@
"--package-type", "app-image",
"--module-path", "module",
"--module", "com.other/com.other.Other",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
};
@@ -46,7 +46,7 @@
"--package-type", "app-image",
"--module-path", "module",
"--module", "com.other/com.other.Other",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--add-modules", "TBD",
};
--- a/test/jdk/tools/jpackage/share/NoNameTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/NoNameTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -41,7 +41,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--main-jar", "hello.jar",
"--main-class", "Hello",
};
--- a/test/jdk/tools/jpackage/share/ResourceTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ResourceTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -48,7 +48,7 @@
"--main-jar", "hello.jar",
"--main-class", "Hello",
"--resource-dir", resourceDir,
- "--output", OUTPUT};
+ "--dest", OUTPUT};
private static void validateResult(String[] result) throws Exception {
if (result.length != 2) {
--- a/test/jdk/tools/jpackage/share/RuntimeModuleTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/RuntimeModuleTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -36,7 +36,7 @@
private static final String [] CMD = {
"--package-type", "app-image",
"--runtime-image", "runtime",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
"--module-path", "input"};
--- a/test/jdk/tools/jpackage/share/RuntimeTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/RuntimeTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -37,7 +37,7 @@
"--package-type", "app-image",
"--runtime-image", "runtime",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/TempRootTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/TempRootTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -42,7 +42,7 @@
private static final String [] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
@@ -51,7 +51,7 @@
private static final String [] CMD_BUILD_ROOT = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/Test.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/Test.java Sun Sep 15 07:34:39 2019 -0400
@@ -38,7 +38,7 @@
private static final String [] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/VerboseTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/VerboseTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -35,7 +35,7 @@
private static final String[] CMD = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
@@ -44,7 +44,7 @@
private static final String[] CMD_VERBOSE = {
"--package-type", "app-image",
"--input", "input",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
--- a/test/jdk/tools/jpackage/share/WithSpaceTest.java Thu Sep 12 15:21:34 2019 -0400
+++ b/test/jdk/tools/jpackage/share/WithSpaceTest.java Sun Sep 15 07:34:39 2019 -0400
@@ -39,7 +39,7 @@
private static final String [] CMD1 = {
"--package-type", "app-image",
"--input", "input dir",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
@@ -48,7 +48,7 @@
private static final String [] CMD2 = {
"--package-type", "app-image",
"--input", "input dir2",
- "--output", OUTPUT,
+ "--dest", OUTPUT,
"--name", "test",
"--main-jar", "sub dir/hello.jar",
"--main-class", "Hello",