8247779: Remove deprecated --bind-services option from jpackage
Reviewed-by: asemenyuk, almatvee
This commit is contained in:
parent
5146474954
commit
83a458c5f7
@ -296,11 +296,6 @@ public class Arguments {
|
||||
|
||||
MODULE_PATH ("module-path", "p", OptionCategories.MODULAR),
|
||||
|
||||
BIND_SERVICES ("bind-services", OptionCategories.PROPERTY, () -> {
|
||||
showDeprecation("bind-services");
|
||||
setOptionValue("bind-services", true);
|
||||
}),
|
||||
|
||||
MAC_SIGN ("mac-sign", "s", OptionCategories.PLATFORM_MAC, () -> {
|
||||
setOptionValue("mac-sign", true);
|
||||
}),
|
||||
@ -606,11 +601,6 @@ public class Arguments {
|
||||
CLIOptions.PREDEFINED_RUNTIME_IMAGE.getIdWithPrefix(),
|
||||
CLIOptions.ADD_MODULES.getIdWithPrefix());
|
||||
}
|
||||
if (allOptions.contains(CLIOptions.BIND_SERVICES)) {
|
||||
throw new PackagerException("ERR_MutuallyExclusiveOptions",
|
||||
CLIOptions.PREDEFINED_RUNTIME_IMAGE.getIdWithPrefix(),
|
||||
CLIOptions.BIND_SERVICES.getIdWithPrefix());
|
||||
}
|
||||
if (allOptions.contains(CLIOptions.JLINK_OPTIONS)) {
|
||||
throw new PackagerException("ERR_MutuallyExclusiveOptions",
|
||||
CLIOptions.PREDEFINED_RUNTIME_IMAGE.getIdWithPrefix(),
|
||||
@ -822,8 +812,4 @@ public class Arguments {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void showDeprecation(String option) {
|
||||
Log.error(MessageFormat.format(I18N.getString("warning.deprecation"),
|
||||
option));
|
||||
}
|
||||
}
|
||||
|
@ -67,9 +67,6 @@ final class JLinkBundlerHelper {
|
||||
LauncherData launcherData = StandardBundlerParam.LAUNCHER_DATA.fetchFrom(
|
||||
params);
|
||||
|
||||
boolean bindServices =
|
||||
StandardBundlerParam.BIND_SERVICES.fetchFrom(params);
|
||||
|
||||
// Modules
|
||||
if (!launcherData.isModular() && addModules.isEmpty()) {
|
||||
addModules.add(ALL_DEFAULT);
|
||||
@ -81,8 +78,7 @@ final class JLinkBundlerHelper {
|
||||
modules.add(launcherData.moduleName());
|
||||
}
|
||||
|
||||
runJLink(outputDir, modulePath, modules, limitModules,
|
||||
options, bindServices);
|
||||
runJLink(outputDir, modulePath, modules, limitModules, options);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -160,7 +156,7 @@ final class JLinkBundlerHelper {
|
||||
|
||||
private static void runJLink(Path output, List<Path> modulePath,
|
||||
Set<String> modules, Set<String> limitModules,
|
||||
List<String> options, boolean bindServices)
|
||||
List<String> options)
|
||||
throws PackagerException, IOException {
|
||||
|
||||
ArrayList<String> args = new ArrayList<String>();
|
||||
@ -188,9 +184,6 @@ final class JLinkBundlerHelper {
|
||||
args.add(option);
|
||||
}
|
||||
}
|
||||
if (bindServices) {
|
||||
args.add("--bind-services");
|
||||
}
|
||||
|
||||
StringWriter writer = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(writer);
|
||||
|
@ -259,16 +259,6 @@ class StandardBundlerParam<T> extends BundlerParamInfo<T> {
|
||||
(s, p) -> null
|
||||
);
|
||||
|
||||
static final StandardBundlerParam<Boolean> BIND_SERVICES =
|
||||
new StandardBundlerParam<>(
|
||||
Arguments.CLIOptions.BIND_SERVICES.getId(),
|
||||
Boolean.class,
|
||||
params -> false,
|
||||
(s, p) -> (s == null || "null".equalsIgnoreCase(s)) ?
|
||||
true : Boolean.valueOf(s)
|
||||
);
|
||||
|
||||
|
||||
static final StandardBundlerParam<Boolean> VERBOSE =
|
||||
new StandardBundlerParam<>(
|
||||
Arguments.CLIOptions.VERBOSE.getId(),
|
||||
|
@ -81,7 +81,6 @@ class ValidOptions {
|
||||
options.put(CLIOptions.ARGUMENTS.getId(), USE.LAUNCHER);
|
||||
options.put(CLIOptions.JAVA_OPTIONS.getId(), USE.LAUNCHER);
|
||||
options.put(CLIOptions.ADD_LAUNCHER.getId(), USE.LAUNCHER);
|
||||
options.put(CLIOptions.BIND_SERVICES.getId(), USE.LAUNCHER);
|
||||
options.put(CLIOptions.JLINK_OPTIONS.getId(), USE.LAUNCHER);
|
||||
|
||||
options.put(CLIOptions.LICENSE_FILE.getId(), USE.INSTALL);
|
||||
|
@ -104,10 +104,6 @@ Generic Options:\n\
|
||||
\ modular jar.\n\
|
||||
\ (each path is absolute or relative to the current directory)\n\
|
||||
\ This option can be used multiple times.\n\
|
||||
\ --bind-services \n\
|
||||
\ Pass on --bind-services option to jlink (which will link in \n\
|
||||
\ service provider modules and their dependences) \n\
|
||||
\ This option is deprecated. Use "--jlink-options" option instead. \n\
|
||||
\ --jlink-options <jlink options> \n\
|
||||
\ A space separated list of options to pass to jlink \n\
|
||||
\ If not specified, defaults to "--strip-native-commands \n\
|
||||
|
@ -74,7 +74,6 @@ error.jlink.failed=jlink failed with: {0}
|
||||
error.blocked.option=jlink option [{0}] is not permitted in --jlink-options
|
||||
|
||||
warning.no.jdk.modules.found=Warning: No JDK Modules found
|
||||
warning.deprecation=Warning: Option "{0}" is deprecated and may be removed in a future release
|
||||
|
||||
MSG_BundlerFailed=Error: Bundler "{1}" ({0}) failed to produce a package
|
||||
MSG_BundlerConfigException=Bundler {0} skipped because of a configuration problem: {1} \n\
|
||||
|
@ -74,7 +74,6 @@ error.jlink.failed=jlink\u304C\u6B21\u3067\u5931\u6557\u3057\u307E\u3057\u305F:
|
||||
error.blocked.option=jlink\u30AA\u30D7\u30B7\u30E7\u30F3[{0}]\u306F--jlink-options\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
|
||||
|
||||
warning.no.jdk.modules.found=\u8B66\u544A: JDK\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
|
||||
warning.deprecation=\u8B66\u544A: \u30AA\u30D7\u30B7\u30E7\u30F3"{0}"\u306F\u975E\u63A8\u5968\u3067\u3042\u308A\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
MSG_BundlerFailed=\u30A8\u30E9\u30FC: \u30D0\u30F3\u30C9\u30E9"{1}" ({0})\u304C\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F
|
||||
MSG_BundlerConfigException=\u69CB\u6210\u306E\u554F\u984C\u306E\u305F\u3081\u3001\u30D0\u30F3\u30C9\u30E9{0}\u304C\u30B9\u30AD\u30C3\u30D7\u3055\u308C\u307E\u3057\u305F: {1} \n\u6B21\u306E\u4FEE\u6B63\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044: {2}
|
||||
|
@ -74,7 +74,6 @@ error.jlink.failed=jlink \u5931\u8D25\uFF0C\u51FA\u73B0 {0}
|
||||
error.blocked.option=\u4E0D\u5141\u8BB8\u5728 --jlink-options \u4E2D\u4F7F\u7528 jlink \u9009\u9879 [{0}]
|
||||
|
||||
warning.no.jdk.modules.found=\u8B66\u544A: \u672A\u627E\u5230 JDK \u6A21\u5757
|
||||
warning.deprecation=\u8B66\u544A\uFF1A\u9009\u9879 "{0}" \u5DF2\u8FC7\u65F6\uFF0C\u5728\u5C06\u6765\u7684\u53D1\u884C\u7248\u4E2D\u53EF\u80FD\u4F1A\u88AB\u5220\u9664
|
||||
|
||||
MSG_BundlerFailed=\u9519\u8BEF\uFF1A\u6253\u5305\u7A0B\u5E8F "{1}" ({0}) \u65E0\u6CD5\u751F\u6210\u7A0B\u5E8F\u5305
|
||||
MSG_BundlerConfigException=\u7531\u4E8E\u914D\u7F6E\u95EE\u9898, \u8DF3\u8FC7\u4E86\u6253\u5305\u7A0B\u5E8F{0}: {1} \n\u4FEE\u590D\u5EFA\u8BAE: {2}
|
||||
|
@ -75,9 +75,8 @@ public final class JLinkOptionsTest {
|
||||
null,
|
||||
},
|
||||
|
||||
// bind-services and jpackage option --bind-services (deprecated)
|
||||
// jlink-options --bind-services
|
||||
{"com.other/com.other.Hello", new String[]{
|
||||
"--bind-services",
|
||||
"--jlink-options", "--bind-services",
|
||||
},
|
||||
// with bind-services should have some services
|
||||
@ -98,6 +97,7 @@ public final class JLinkOptionsTest {
|
||||
|
||||
// bind-services and limit-options
|
||||
{"com.other/com.other.Hello", new String[]{
|
||||
"--jlink-options",
|
||||
"--bind-services",
|
||||
"--jlink-options",
|
||||
"--limit-modules java.base,java.datatransfer,java.xml,java.prefs,java.desktop,com.other,java.smartcardio",
|
||||
|
Loading…
Reference in New Issue
Block a user