8230519: jpackage "--package-type" values and default
Reviewed-by: asemenyuk, almatvee
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -173,4 +173,10 @@
public boolean supported(boolean runtimeInstaller) {
return true;
}
+
+ @Override
+ public boolean isDefault() {
+ return false;
+ }
+
}
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -407,6 +407,19 @@
}
}
+ public static boolean isDebian() {
+ // we are just going to run "dpkg -s coreutils" and assume Debian
+ // or deritive if no error is returned.
+ var pb = new ProcessBuilder(TOOL_DPKG, "-s", "coreutils");
+ try {
+ int ret = pb.start().waitFor();
+ return (ret == 0);
+ } catch (IOException | InterruptedException e) {
+ // just fall thru
+ }
+ return false;
+ }
+
private long getInstalledSizeKB(Map<String, ? super Object> params) {
return getInstalledSizeKB(APP_IMAGE_ROOT.fetchFrom(params)) >> 10;
}
@@ -939,4 +952,10 @@
return 0;
}
}
+
+ @Override
+ public boolean isDefault() {
+ return isDebian();
+ }
+
}
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -702,4 +702,10 @@
return 0;
}
}
+
+ @Override
+ public boolean isDefault() {
+ return !LinuxDebBundler.isDebian();
+ }
+
}
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources.properties Tue Sep 10 14:57:03 2019 -0400
@@ -24,7 +24,7 @@
#
#
app.bundler.name=Linux Application Image
-deb.bundler.name=DEB Installer
+deb.bundler.name=DEB Bundle
rpm.bundler.name=RPM Bundle
param.license-type.default=Unknown
@@ -46,8 +46,8 @@
error.tool-not-found.advice=Please install required packages.
error.no-content-types-for-file-association=No MIME types were specified for File Association number {0}.
error.too-many-content-types-for-file-association=More than one MIME types was specified for File Association number {0}.
-error.invalid-value-for-package-name=Invalid value "{0}" for the package name.
-error.invalid-value-for-package-name.advice=Set the "linux.bundleName" parameter to a valid Debian package name. Note that the package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
+error.invalid-value-for-package-name=Invalid value "{0}" for the bundle name.
+error.invalid-value-for-package-name.advice=Set the "linux-bundle-name" option to a valid Debian package name. Note that the package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
error.cannot-find-rpmbuild=Can not find rpmbuild {0} or newer.
error.cannot-find-rpmbuild.advice=\ Install packages needed to build RPM, version {0} or newer.
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources_ja.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources_ja.properties Tue Sep 10 14:57:03 2019 -0400
@@ -24,7 +24,7 @@
#
#
app.bundler.name=Linux Application Image
-deb.bundler.name=DEB Installer
+deb.bundler.name=DEB Bundle
rpm.bundler.name=RPM Bundle
param.license-type.default=Unknown
@@ -46,8 +46,8 @@
error.tool-not-found.advice=Please install required packages.
error.no-content-types-for-file-association=No MIME types were specified for File Association number {0}.
error.too-many-content-types-for-file-association=More than one MIME types was specified for File Association number {0}.
-error.invalid-value-for-package-name=Invalid value "{0}" for the package name.
-error.invalid-value-for-package-name.advice=Set the "linux.bundleName" parameter to a valid Debian package name. Note that the package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
+error.invalid-value-for-package-name=Invalid value "{0}" for the bundle name.
+error.invalid-value-for-package-name.advice=Set the "linux-bundle-name" option to a valid Debian package name. Note that the package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
error.cannot-find-rpmbuild=Can not find rpmbuild {0} or newer.
error.cannot-find-rpmbuild.advice=\ Install packages needed to build RPM, version {0} or newer.
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources_zh_CN.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources_zh_CN.properties Tue Sep 10 14:57:03 2019 -0400
@@ -24,7 +24,7 @@
#
#
app.bundler.name=Linux Application Image
-deb.bundler.name=DEB Installer
+deb.bundler.name=DEB Bundle
rpm.bundler.name=RPM Bundle
param.license-type.default=Unknown
@@ -46,8 +46,8 @@
error.tool-not-found.advice=Please install required packages.
error.no-content-types-for-file-association=No MIME types were specified for File Association number {0}.
error.too-many-content-types-for-file-association=More than one MIME types was specified for File Association number {0}.
-error.invalid-value-for-package-name=Invalid value "{0}" for the package name.
-error.invalid-value-for-package-name.advice=Set the "linux.bundleName" parameter to a valid Debian package name. Note that the package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
+error.invalid-value-for-package-name=Invalid value "{0}" for the bundle name.
+error.invalid-value-for-package-name.advice=Set the "linux-bundle-name" option to a valid Debian package name. Note that the package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
error.cannot-find-rpmbuild=Can not find rpmbuild {0} or newer.
error.cannot-find-rpmbuild.advice=\ Install packages needed to build RPM, version {0} or newer.
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -344,4 +344,9 @@
return true;
}
+ @Override
+ public boolean isDefault() {
+ return false;
+ }
+
}
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -323,4 +323,10 @@
// Platform.getPlatform() == Platform.MAC);
return false; // mac-app-store not yet supported
}
+
+ @Override
+ public boolean isDefault() {
+ return false;
+ }
+
}
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -466,4 +466,10 @@
return false;
}
}
+
+ @Override
+ public boolean isDefault() {
+ return true;
+ }
+
}
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -532,4 +532,9 @@
return true;
}
+ @Override
+ public boolean isDefault() {
+ return false;
+ }
+
}
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties Tue Sep 10 14:57:03 2019 -0400
@@ -26,8 +26,8 @@
app.bundler.name=Mac Application Image
store.bundler.name=Mac App Store Ready Bundler
-dmg.bundler.name=DMG Installer
-pkg.bundler.name=PKG Installer
+dmg.bundler.name=DMG Package Bundler
+pkg.bundler.name=PKG Package Bundler
error.invalid-cfbundle-version=Invalid CFBundleVersion: [{0}].
error.invalid-cfbundle-version.advice=Set a compatible 'appVersion' or set a 'mac.CFBundleVersion'. Valid versions are one to three integers separated by dots.
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties Tue Sep 10 14:57:03 2019 -0400
@@ -26,8 +26,8 @@
app.bundler.name=Mac Application Image
store.bundler.name=Mac App Store Ready Bundler
-dmg.bundler.name=DMG Installer
-pkg.bundler.name=PKG Installer
+dmg.bundler.name=DMG Package Bundler
+pkg.bundler.name=PKG Package Bundler
error.invalid-cfbundle-version=Invalid CFBundleVersion: [{0}].
error.invalid-cfbundle-version.advice=Set a compatible 'appVersion' or set a 'mac.CFBundleVersion'. Valid versions are one to three integers separated by dots.
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties Tue Sep 10 14:57:03 2019 -0400
@@ -26,8 +26,8 @@
app.bundler.name=Mac Application Image
store.bundler.name=Mac App Store Ready Bundler
-dmg.bundler.name=DMG Installer
-pkg.bundler.name=PKG Installer
+dmg.bundler.name=DMG Package Bundler
+pkg.bundler.name=PKG Package Bundler
error.invalid-cfbundle-version=Invalid CFBundleVersion: [{0}].
error.invalid-cfbundle-version.advice=Set a compatible 'appVersion' or set a 'mac.CFBundleVersion'. Valid versions are one to three integers separated by dots.
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java Tue Sep 10 14:57:03 2019 -0400
@@ -74,7 +74,6 @@
"(?:(?:([\"'])(?:\\\\\\1|.)*?(?:\\1|$))|(?:\\\\[\"'\\s]|[^\\s]))++");
private DeployParams deployParams = null;
- private String packageType = null;
private int pos = 0;
private List<String> argList = null;
@@ -119,8 +118,6 @@
deployParams = new DeployParams();
- packageType = null;
-
allOptions = new ArrayList<>();
addLaunchers = new ArrayList<>();
@@ -129,8 +126,7 @@
// CLIOptions is public for DeployParamsTest
public enum CLIOptions {
PACKAGE_TYPE("package-type", OptionCategories.PROPERTY, () -> {
- context().packageType = popArg();
- context().deployParams.setTargetFormat(context().packageType);
+ context().deployParams.setTargetFormat(popArg());
}),
INPUT ("input", "i", OptionCategories.PROPERTY, () -> {
@@ -530,9 +526,9 @@
}
private void validateArguments() throws PackagerException {
- String packageType = deployParams.getTargetFormat();
- String ptype = (packageType != null) ? packageType : "default";
- boolean imageOnly = (packageType == null);
+ String type = deployParams.getTargetFormat();
+ String ptype = (type != null) ? type : "default";
+ boolean imageOnly = deployParams.isTargetAppImage();
boolean hasAppImage = allOptions.contains(
CLIOptions.PREDEFINED_APP_IMAGE);
boolean hasRuntime = allOptions.contains(
@@ -550,7 +546,7 @@
if (imageOnly) {
if (!ValidOptions.checkIfImageSupported(option)) {
throw new PackagerException("ERR_InvalidTypeOption",
- option.getIdWithPrefix(), packageType);
+ option.getIdWithPrefix(), type);
}
} else if (installerOnly || runtimeInstaller) {
if (!ValidOptions.checkIfInstallerSupported(option)) {
@@ -579,13 +575,20 @@
}
private jdk.jpackage.internal.Bundler getPlatformBundler() {
- String bundleType = (packageType == null ? "IMAGE" : "INSTALLER");
+ boolean appImage = deployParams.isTargetAppImage();
+ String type = deployParams.getTargetFormat();
+ String bundleType = (appImage ? "IMAGE" : "INSTALLER");
for (jdk.jpackage.internal.Bundler bundler :
Bundlers.createBundlersInstance().getBundlers(bundleType)) {
- if ((packageType == null) ||
- packageType.equalsIgnoreCase(bundler.getID())) {
- if (bundler.supported(runtimeInstaller)) {
+ if (type == null) {
+ if (bundler.isDefault()
+ && bundler.supported(runtimeInstaller)) {
+ return bundler;
+ }
+ } else {
+ if ((appImage || type.equalsIgnoreCase(bundler.getID()))
+ && bundler.supported(runtimeInstaller)) {
return bundler;
}
}
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Bundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Bundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -117,4 +117,9 @@
* Returns "true" if this bundler is supported on current platform.
*/
public boolean supported(boolean runtimeInstaller);
+
+ /**
+ * Returns "true" if this bundler is he default for the current platform.
+ */
+ public boolean isDefault();
}
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java Tue Sep 10 14:57:03 2019 -0400
@@ -54,29 +54,28 @@
String pInstallDir;
switch (platform) {
case MAC:
- types = "{\"pkg\", \"dmg\"}";
+ types = "{\"app-image\", \"dmg\", \"pkg\"}";
pLaunchOptions = I18N.getString("MSG_Help_mac_launcher");
pInstallOptions = "";
pInstallDir
= I18N.getString("MSG_Help_mac_linux_install_dir");
break;
case LINUX:
- types = "{\"rpm\", \"deb\"}";
+ types = "{\"app-image\", \"rpm\", \"deb\"}";
pLaunchOptions = "";
pInstallOptions = I18N.getString("MSG_Help_linux_install");
pInstallDir
= I18N.getString("MSG_Help_mac_linux_install_dir");
break;
case WINDOWS:
- types = "{\"exe\", \"msi\"}";
+ types = "{\"app-image\", \"exe\", \"msi\"}";
pLaunchOptions = I18N.getString("MSG_Help_win_launcher");
pInstallOptions = I18N.getString("MSG_Help_win_install");
pInstallDir
= I18N.getString("MSG_Help_win_install_dir");
break;
default:
- types =
- "{\"exe\", \"msi\", \"rpm\", \"deb\", \"pkg\", \"dmg\"}";
+ types = "{\"app-image\", \"exe\", \"msi\", \"rpm\", \"deb\", \"pkg\", \"dmg\"}";
pLaunchOptions = I18N.getString("MSG_Help_win_launcher")
+ I18N.getString("MSG_Help_mac_launcher");
pInstallOptions = I18N.getString("MSG_Help_win_install")
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java Tue Sep 10 14:57:03 2019 -0400
@@ -52,7 +52,7 @@
final List<RelativeFileSet> resources = new ArrayList<>();
- String targetFormat = null; // means app-image
+ String targetFormat = null; // means default type for this platform
File outdir = null;
@@ -197,10 +197,10 @@
Arguments.CLIOptions.INPUT.getId()) != null);
boolean hasModulePath = (bundlerArguments.get(
Arguments.CLIOptions.MODULE_PATH.getId()) != null);
- boolean runtimeInstaller = targetFormat != null &&
+ boolean runtimeInstaller = !isTargetAppImage() &&
!hasAppImage && !hasModule && !hasMain && hasRuntimeImage;
- if (targetFormat == null) {
+ if (isTargetAppImage()) {
// Module application requires --runtime-image or --module-path
if (hasModule) {
if (!hasModulePath && !hasRuntimeImage) {
@@ -285,6 +285,10 @@
return targetFormat;
}
+ boolean isTargetAppImage() {
+ return ("app-image".equals(targetFormat));
+ }
+
private static final Set<String> multi_args = new TreeSet<>(Arrays.asList(
StandardBundlerParam.JAVA_OPTIONS.getID(),
StandardBundlerParam.ARGUMENTS.getID(),
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties Tue Sep 10 14:57:03 2019 -0400
@@ -29,14 +29,14 @@
Sample usages:\n\
--------------\n\
\ Generate a non-modular application image:\n\
-\ jpackage -o outputdir -i inputdir -n name \\\n\
+\ jpackage --package-type app-image -o outputdir -i inputdir -n name \\\n\
\ --main-class className --main-jar MyJar.jar\n\
\ Generate a modular application image:\n\
-\ jpackage -o outputdir -n name -p modulePath -m moduleName/className\n\
+\ jpackage --package-type app-image -o outputdir -n name -p modulePath -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 -o outputdir -n name \\\n\
+\ jpackage --package-type app-image -o outputdir -n name \\\n\
\ -m moduleName/className --runtime-image appRuntimeImage\n\
\ Generate an application package:\n\
\ jpackage --package-type <type> -o outputdir -n name \\\n\
@@ -46,8 +46,7 @@
\ jpackage --package-type <type> -o outputdir -n name \\\n\
\ --app-image <app image dir>\n\
\ Generate a Java runtime package:\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
-\ --runtime-image <runtime-image>\n\
+\ jpackage -o outputdir -n name --runtime-image <runtime-image>\n\
\n\
Generic Options:\n\
\ @<filename> \n\
@@ -56,8 +55,8 @@
\ --package-type <type> \n\
\ The type of package to create\n\
\ Valid values are: {1} \n\
-\ If this option is not specified an application image will be\n\
-\ created.\n\
+\ If this option is not specified a platform dependent\n\
+\ default package 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 Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties Tue Sep 10 14:57:03 2019 -0400
@@ -29,14 +29,14 @@
Sample usages:\n\
--------------\n\
\ Generate a non-modular application image:\n\
-\ jpackage -o outputdir -i inputdir -n name \\\n\
+\ jpackage --package-type app-image -o outputdir -i inputdir -n name \\\n\
\ --main-class className --main-jar MyJar.jar\n\
\ Generate a modular application image:\n\
-\ jpackage -o outputdir -n name -p modulePath -m moduleName/className\n\
+\ jpackage --package-type app-image -o outputdir -n name -p modulePath -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 -o outputdir -n name \\\n\
+\ jpackage --package-type app-image -o outputdir -n name \\\n\
\ -m moduleName/className --runtime-image appRuntimeImage\n\
\ Generate an application package:\n\
\ jpackage --package-type <type> -o outputdir -n name \\\n\
@@ -46,8 +46,7 @@
\ jpackage --package-type <type> -o outputdir -n name \\\n\
\ --app-image <app image dir>\n\
\ Generate a Java runtime package:\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
-\ --runtime-image <runtime-image>\n\
+\ jpackage -o outputdir -n name --runtime-image <runtime-image>\n\
\n\
Generic Options:\n\
\ @<filename> \n\
@@ -56,8 +55,8 @@
\ --package-type <type> \n\
\ The type of package to create\n\
\ Valid values are: {1} \n\
-\ If this option is not specified an application image will be\n\
-\ created.\n\
+\ If this option is not specified a platform dependent\n\
+\ default package 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 Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties Tue Sep 10 14:57:03 2019 -0400
@@ -29,14 +29,14 @@
Sample usages:\n\
--------------\n\
\ Generate a non-modular application image:\n\
-\ jpackage -o outputdir -i inputdir -n name \\\n\
+\ jpackage --package-type app-image -o outputdir -i inputdir -n name \\\n\
\ --main-class className --main-jar MyJar.jar\n\
\ Generate a modular application image:\n\
-\ jpackage -o outputdir -n name -p modulePath -m moduleName/className\n\
+\ jpackage --package-type app-image -o outputdir -n name -p modulePath -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 -o outputdir -n name \\\n\
+\ jpackage --package-type app-image -o outputdir -n name \\\n\
\ -m moduleName/className --runtime-image appRuntimeImage\n\
\ Generate an application package:\n\
\ jpackage --package-type <type> -o outputdir -n name \\\n\
@@ -46,8 +46,7 @@
\ jpackage --package-type <type> -o outputdir -n name \\\n\
\ --app-image <app image dir>\n\
\ Generate a Java runtime package:\n\
-\ jpackage --package-type <type> -o outputdir -n name \\\n\
-\ --runtime-image <runtime-image>\n\
+\ jpackage -o outputdir -n name --runtime-image <runtime-image>\n\
\n\
Generic Options:\n\
\ @<filename> \n\
@@ -56,8 +55,8 @@
\ --package-type <type> \n\
\ The type of package to create\n\
\ Valid values are: {1} \n\
-\ If this option is not specified an application image will be\n\
-\ created.\n\
+\ If this option is not specified a platform dependent\n\
+\ default package 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/windows/classes/jdk/jpackage/internal/WinAppBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinAppBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -219,4 +219,9 @@
return true;
}
+ @Override
+ public boolean isDefault() {
+ return false;
+ }
+
}
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -89,6 +89,11 @@
}
@Override
+ public boolean isDefault() {
+ return true;
+ }
+
+ @Override
public boolean validate(Map<String, ? super Object> params)
throws ConfigException {
return new WinMsiBundler().validate(params);
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java Tue Sep 10 14:57:03 2019 -0400
@@ -238,6 +238,11 @@
return isSupported();
}
+ @Override
+ public boolean isDefault() {
+ return false;
+ }
+
public static boolean isSupported() {
try {
validateWixTools();
@@ -1168,4 +1173,5 @@
}
}
+
}
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties Tue Sep 10 14:57:03 2019 -0400
@@ -25,13 +25,12 @@
#
app.bundler.name=Windows Application Image
-exe.bundler.name=EXE Installer
-msi.bundler.name=MSI Installer
+exe.bundler.name=EXE Installer Bundler
+msi.bundler.name=MSI Installer Bundler
param.menu-group.default=Unknown
resource.executable-properties-template=Template for creating executable properties file.
-resource.inno-setup-project-file=Inno Setup project file
resource.setup-icon=setup dialog icon
resource.post-install-script=script to run after application image is populated
resource.wxl-file-name=MsiInstallerStrings_en.wxl
@@ -41,8 +40,6 @@
error.no-windows-resources=This copy of the JDK does not support Windows.
error.no-windows-resources.advice=Please use the Oracle JDK for Windows.
error.cannot-find-launcher=Cannot find cfg file in predefined app image directory {0}.
-error.iscc-not-found=Can not find Inno Setup Compiler (iscc.exe).
-error.iscc-not-found.advice=Download Inno Setup 5 or later from http://www.jrsoftware.org and add it to the PATH.
error.copyright-is-too-long=The copyright string is too long for InnoSetup.
error.copyright-is-too-long.advice=Provide a copyright string shorter than 100 characters.
error.no-wix-tools=Can not find WiX tools (light.exe, candle.exe).
@@ -67,7 +64,6 @@
message.tool-version=Detected [{0}] version [{1}].
message.one-shortcut-required=At least one type of shortcut is required. Enabling menu shortcut.
message.running-wsh-script=Running WSH script on application image [{0}].
-message.iscc-file-string=InnoSetup compiler set to {0}.
message.creating-association-with-null-extension=Creating association with null extension.
message.wrong-tool-version=Detected [{0}] version {1} but version {2} is required.
message.version-string-too-many-components=Version sting may have up to 3 components - major.minor.build .
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties Tue Sep 10 14:57:03 2019 -0400
@@ -25,13 +25,12 @@
#
app.bundler.name=Windows Application Image
-exe.bundler.name=EXE Installer
-msi.bundler.name=MSI Installer
+exe.bundler.name=EXE Installer Bundler
+msi.bundler.name=MSI Installer Bundler
param.menu-group.default=Unknown
resource.executable-properties-template=Template for creating executable properties file.
-resource.inno-setup-project-file=Inno Setup project file
resource.setup-icon=setup dialog icon
resource.post-install-script=script to run after application image is populated
resource.wxl-file-name=MsiInstallerStrings_en.wxl
@@ -41,8 +40,6 @@
error.no-windows-resources=This copy of the JDK does not support Windows.
error.no-windows-resources.advice=Please use the Oracle JDK for Windows.
error.cannot-find-launcher=Cannot find cfg file in predefined app image directory {0}.
-error.iscc-not-found=Can not find Inno Setup Compiler (iscc.exe).
-error.iscc-not-found.advice=Download Inno Setup 5 or later from http://www.jrsoftware.org and add it to the PATH.
error.copyright-is-too-long=The copyright string is too long for InnoSetup.
error.copyright-is-too-long.advice=Provide a copyright string shorter than 100 characters.
error.no-wix-tools=Can not find WiX tools (light.exe, candle.exe).
@@ -67,7 +64,6 @@
message.tool-version=Detected [{0}] version [{1}].
message.one-shortcut-required=At least one type of shortcut is required. Enabling menu shortcut.
message.running-wsh-script=Running WSH script on application image [{0}].
-message.iscc-file-string=InnoSetup compiler set to {0}.
message.creating-association-with-null-extension=Creating association with null extension.
message.wrong-tool-version=Detected [{0}] version {1} but version {2} is required.
message.version-string-too-many-components=Version sting may have up to 3 components - major.minor.build .
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties Tue Sep 10 09:18:19 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties Tue Sep 10 14:57:03 2019 -0400
@@ -25,13 +25,12 @@
#
app.bundler.name=Windows Application Image
-exe.bundler.name=EXE Installer
-msi.bundler.name=MSI Installer
+exe.bundler.name=EXE Installer Bundler
+msi.bundler.name=MSI Installer Bundler
param.menu-group.default=Unknown
resource.executable-properties-template=Template for creating executable properties file.
-resource.inno-setup-project-file=Inno Setup project file
resource.setup-icon=setup dialog icon
resource.post-install-script=script to run after application image is populated
resource.wxl-file-name=MsiInstallerStrings_en.wxl
@@ -41,8 +40,6 @@
error.no-windows-resources=This copy of the JDK does not support Windows.
error.no-windows-resources.advice=Please use the Oracle JDK for Windows.
error.cannot-find-launcher=Cannot find cfg file in predefined app image directory {0}.
-error.iscc-not-found=Can not find Inno Setup Compiler (iscc.exe).
-error.iscc-not-found.advice=Download Inno Setup 5 or later from http://www.jrsoftware.org and add it to the PATH.
error.copyright-is-too-long=The copyright string is too long for InnoSetup.
error.copyright-is-too-long.advice=Provide a copyright string shorter than 100 characters.
error.no-wix-tools=Can not find WiX tools (light.exe, candle.exe).
@@ -67,7 +64,6 @@
message.tool-version=Detected [{0}] version [{1}].
message.one-shortcut-required=At least one type of shortcut is required. Enabling menu shortcut.
message.running-wsh-script=Running WSH script on application image [{0}].
-message.iscc-file-string=InnoSetup compiler set to {0}.
message.creating-association-with-null-extension=Creating association with null extension.
message.wrong-tool-version=Detected [{0}] version {1} but version {2} is required.
message.version-string-too-many-components=Version sting may have up to 3 components - major.minor.build .
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java Tue Sep 10 14:57:03 2019 -0400
@@ -132,8 +132,9 @@
public PackageType packageType() {
return getArgumentValue("--package-type",
- () -> PackageType.IMAGE,
- (v) -> PACKAGE_TYPES.get(v));
+ () -> PackageType.DEFAULT,
+ (v) -> ("app-image".equals(v)) ? PackageType.IMAGE :
+ PACKAGE_TYPES.get(v));
}
public Path outputDir() {
@@ -173,6 +174,7 @@
JPackageCommand cmd = new JPackageCommand();
cmd.setDefaultInputOutput().setDefaultAppName();
HelloApp.addTo(cmd);
+ (PackageType.IMAGE).applyTo(cmd);
return cmd;
}
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java Tue Sep 10 14:57:03 2019 -0400
@@ -43,6 +43,8 @@
Test.isLinux() ? "jdk.jpackage.internal.LinuxRpmBundler" : null),
MAC_DMG(".dmg", Test.isOSX() ? "jdk.jpackage.internal.MacDmgBundler" : null),
MAC_PKG(".pkg", Test.isOSX() ? "jdk.jpackage.internal.MacPkgBundler" : null),
+ DEFAULT(null, null),
+
IMAGE(null, null);
PackageType(String bundleSuffix, String bundlerClass) {
@@ -72,7 +74,7 @@
String getName() {
if (suffix == null) {
- return null;
+ return "app-image";
}
return suffix.substring(1);
}
--- a/test/jdk/tools/jpackage/macosx/BundleIdentifierTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/BundleIdentifierTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -49,6 +49,7 @@
private static final String MAIN_CLASS = "Hello";
private static final String [] CMD_1 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", APP_NAME,
@@ -57,6 +58,7 @@
};
private static final String [] CMD_2 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", APP_NAME,
--- a/test/jdk/tools/jpackage/macosx/BundleNameTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/macosx/BundleNameTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -48,6 +48,7 @@
private static final String APP_NAME = "test";
private static final String [] CMD_1 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", APP_NAME,
@@ -56,6 +57,7 @@
};
private static final String [] CMD_2 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", APP_NAME,
--- a/test/jdk/tools/jpackage/share/AddLauncherModuleTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddLauncherModuleTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -34,6 +34,7 @@
public class AddLauncherModuleTest {
private static final String OUTPUT = "output";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/AddLauncherTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddLauncherTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -34,6 +34,7 @@
public class AddLauncherTest {
private static final String OUTPUT = "output";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/AddLaunchersTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddLaunchersTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +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",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -47,6 +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",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/AddModulesTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AddModulesTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
@@ -43,6 +44,7 @@
};
private static final String [] CMD2 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
@@ -51,6 +53,7 @@
};
private static final String [] CMD3 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/AppVersionTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AppVersionTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -40,6 +40,7 @@
private static final String VERSION_DEFAULT = "1.0";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -48,6 +49,7 @@
};
private static final String[] CMD_VERSION = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/ArgumentsModuleTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ArgumentsModuleTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/ArgumentsTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ArgumentsTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/AtFilenameTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/AtFilenameTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/ErrorTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ErrorTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -48,6 +48,7 @@
private static final String EXPECTED2 = "--main-jar or --module";
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -56,6 +57,7 @@
private static final String EXP1 = "main jar does not exist";
private static final String [] CMD2 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -82,8 +84,10 @@
public static void main(String[] args) throws Exception {
JPackageHelper.createHelloImageJar();
- validate(JPackageHelper.executeToolProvider(false, ARG1), EXPECTED1, true);
- validate(JPackageHelper.executeToolProvider(false, ARG2), EXPECTED2, true);
+ validate(JPackageHelper.executeToolProvider(false,
+ "--package-type", "app-image", ARG1), EXPECTED1, true);
+ validate(JPackageHelper.executeToolProvider(false,
+ "--package-type", "app-image", ARG2), EXPECTED2, true);
JPackageHelper.deleteOutputFolder(OUTPUT);
validate(JPackageHelper.executeToolProvider(false, CMD1), EXP1, false);
--- a/test/jdk/tools/jpackage/share/IconTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/IconTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -39,6 +39,7 @@
private static final String appOutput = JPackagePath.getAppOutputFile();
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--name", "test",
"--main-jar", "hello.jar",
--- a/test/jdk/tools/jpackage/share/InvalidArgTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/InvalidArgTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -62,16 +62,22 @@
}
private static void testInvalidArg() throws Exception {
- String output = JPackageHelper.executeCLI(false, ARG1);
+ String output = JPackageHelper.executeCLI(false,
+ "--package-type", "app-image", ARG1);
validate(ARG1, output);
- output = JPackageHelper.executeCLI(false, ARG2);
+
+ output = JPackageHelper.executeCLI(false,
+ "--package-type", "app-image", ARG2);
validate(ARG2, output);
}
private static void testInvalidArgToolProvider() throws Exception {
- String output = JPackageHelper.executeToolProvider(false, ARG1);
+ String output = JPackageHelper.executeToolProvider(false,
+ "--package-type", "app-image", ARG1);
validate(ARG1, output);
- output = JPackageHelper.executeToolProvider(false, ARG2);
+
+ output = JPackageHelper.executeToolProvider(false,
+ "--package-type", "app-image", ARG2);
validate(ARG2, output);
}
--- a/test/jdk/tools/jpackage/share/JLinkModuleTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JLinkModuleTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -38,6 +38,7 @@
private static final String RUNTIME = "runtime";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.other/com.other.Other",
--- a/test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JavaOptionsEqualsTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -47,6 +47,7 @@
= "WARNING: Unknown module: other.mod.bar";
private static final String[] CMD = {
+ "--package-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 Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JavaOptionsModuleTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
@@ -42,6 +43,7 @@
"--java-options", "TBD"};
private static final String[] CMD2 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/JavaOptionsTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/JavaOptionsTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -43,6 +44,7 @@
"--java-options", "TBD"};
private static final String[] CMD2 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/MainClassAttributeTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/MainClassAttributeTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -39,6 +39,7 @@
private static final String appOutput = JPackagePath.getAppOutputFile();
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/MainClassErrorTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/MainClassErrorTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -39,6 +39,7 @@
private static final String appOutput = JPackagePath.getAppOutputFile();
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/MissingArgumentsTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/MissingArgumentsTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -34,6 +34,7 @@
public class MissingArgumentsTest {
private static final String [] RESULT_1 = {"--output"};
private static final String [] CMD_1 = {
+ "--package-type", "app-image",
"--input", "input",
"--name", "test",
"--main-jar", "hello.jar",
@@ -42,6 +43,7 @@
private static final String [] RESULT_2 = {"--input"};
private static final String [] CMD_2 = {
+ "--package-type", "app-image",
"--output", "output",
"--name", "test",
"--main-jar", "hello.jar",
@@ -50,6 +52,7 @@
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",
"--name", "test",
@@ -59,6 +62,7 @@
private static final String [] RESULT_4 = {"main class was not specified"};
private static final String [] CMD_4 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", "output",
"--name", "test",
@@ -67,6 +71,7 @@
private static final String [] RESULT_5 = {"--main-jar"};
private static final String [] CMD_5 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", "output",
"--name", "test",
@@ -75,6 +80,7 @@
private static final String [] RESULT_6 = {"--module-path", "--runtime-image"};
private static final String [] CMD_6 = {
+ "--package-type", "app-image",
"--output", "output",
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/ModularJarTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModularJarTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -43,6 +44,7 @@
};
private static final String [] CMD2 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/ModuleMainClassErrorTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModuleMainClassErrorTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -39,12 +39,14 @@
private static final String appOutput = JPackagePath.getAppOutputFile();
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello",
"--module-path", "input"};
private static final String [] CMD2 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/ModulePathTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModulePathTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -38,6 +38,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
@@ -45,6 +46,7 @@
};
private static final String [] CMD2 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
@@ -52,6 +54,7 @@
};
private static final String [] CMD3 = {
+ "--package-type", "app-image",
"--output", OUTPUT,
"--name", "test",
"--module", "com.hello/com.hello.Hello",
--- a/test/jdk/tools/jpackage/share/ModuleTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ModuleTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--module-path", "module",
"--module", "com.other/com.other.Other",
"--output", OUTPUT,
@@ -42,6 +43,7 @@
};
private static String [] commands = {
+ "--package-type", "app-image",
"--module-path", "module",
"--module", "com.other/com.other.Other",
"--output", OUTPUT,
--- a/test/jdk/tools/jpackage/share/NoNameTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/NoNameTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -39,6 +39,7 @@
private static final String appOutput = JPackagePath.getAppOutputFile();
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--main-jar", "hello.jar",
--- a/test/jdk/tools/jpackage/share/ResourceTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ResourceTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -42,6 +42,7 @@
JPackagePath.getTestSrcRoot() + File.separator + "resources";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--name", "icon",
"--main-jar", "hello.jar",
--- a/test/jdk/tools/jpackage/share/RuntimeModuleTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/RuntimeModuleTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -34,6 +34,7 @@
public class RuntimeModuleTest {
private static final String OUTPUT = "output";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--runtime-image", "runtime",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/RuntimeTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/RuntimeTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -34,6 +34,7 @@
public class RuntimeTest {
private static final String OUTPUT = "output";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--runtime-image", "runtime",
"--input", "input",
"--output", OUTPUT,
--- a/test/jdk/tools/jpackage/share/TempRootTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/TempRootTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -40,6 +40,7 @@
private static final String BUILD_ROOT_TB = "buildRootToolProvider";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -48,6 +49,7 @@
};
private static final String [] CMD_BUILD_ROOT = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/Test.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/Test.java Tue Sep 10 14:57:03 2019 -0400
@@ -35,6 +35,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/VerboseTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/VerboseTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -33,6 +33,7 @@
public class VerboseTest {
private static final String OUTPUT = "output";
private static final String[] CMD = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
@@ -41,6 +42,7 @@
};
private static final String[] CMD_VERBOSE = {
+ "--package-type", "app-image",
"--input", "input",
"--output", OUTPUT,
"--name", "test",
--- a/test/jdk/tools/jpackage/share/WithSpaceTest.java Tue Sep 10 09:18:19 2019 -0400
+++ b/test/jdk/tools/jpackage/share/WithSpaceTest.java Tue Sep 10 14:57:03 2019 -0400
@@ -37,6 +37,7 @@
private static final String OUTPUT = "output";
private static final String [] CMD1 = {
+ "--package-type", "app-image",
"--input", "input dir",
"--output", OUTPUT,
"--name", "test",
@@ -45,6 +46,7 @@
};
private static final String [] CMD2 = {
+ "--package-type", "app-image",
"--input", "input dir2",
"--output", OUTPUT,
"--name", "test",