equal
deleted
inserted
replaced
50 */ |
50 */ |
51 public class DeployParams { |
51 public class DeployParams { |
52 |
52 |
53 final List<RelativeFileSet> resources = new ArrayList<>(); |
53 final List<RelativeFileSet> resources = new ArrayList<>(); |
54 |
54 |
55 String targetFormat = null; // means app-image |
55 String targetFormat = null; // means default type for this platform |
56 |
56 |
57 File outdir = null; |
57 File outdir = null; |
58 |
58 |
59 // raw arguments to the bundler |
59 // raw arguments to the bundler |
60 Map<String, ? super Object> bundlerArguments = new LinkedHashMap<>(); |
60 Map<String, ? super Object> bundlerArguments = new LinkedHashMap<>(); |
195 Arguments.CLIOptions.PREDEFINED_RUNTIME_IMAGE.getId()) != null); |
195 Arguments.CLIOptions.PREDEFINED_RUNTIME_IMAGE.getId()) != null); |
196 boolean hasInput = (bundlerArguments.get( |
196 boolean hasInput = (bundlerArguments.get( |
197 Arguments.CLIOptions.INPUT.getId()) != null); |
197 Arguments.CLIOptions.INPUT.getId()) != null); |
198 boolean hasModulePath = (bundlerArguments.get( |
198 boolean hasModulePath = (bundlerArguments.get( |
199 Arguments.CLIOptions.MODULE_PATH.getId()) != null); |
199 Arguments.CLIOptions.MODULE_PATH.getId()) != null); |
200 boolean runtimeInstaller = targetFormat != null && |
200 boolean runtimeInstaller = !isTargetAppImage() && |
201 !hasAppImage && !hasModule && !hasMain && hasRuntimeImage; |
201 !hasAppImage && !hasModule && !hasMain && hasRuntimeImage; |
202 |
202 |
203 if (targetFormat == null) { |
203 if (isTargetAppImage()) { |
204 // Module application requires --runtime-image or --module-path |
204 // Module application requires --runtime-image or --module-path |
205 if (hasModule) { |
205 if (hasModule) { |
206 if (!hasModulePath && !hasRuntimeImage) { |
206 if (!hasModulePath && !hasRuntimeImage) { |
207 throw new PackagerException("ERR_MissingArgument", |
207 throw new PackagerException("ERR_MissingArgument", |
208 "--runtime-image or --module-path"); |
208 "--runtime-image or --module-path"); |
283 |
283 |
284 String getTargetFormat() { |
284 String getTargetFormat() { |
285 return targetFormat; |
285 return targetFormat; |
286 } |
286 } |
287 |
287 |
|
288 boolean isTargetAppImage() { |
|
289 return ("app-image".equals(targetFormat)); |
|
290 } |
|
291 |
288 private static final Set<String> multi_args = new TreeSet<>(Arrays.asList( |
292 private static final Set<String> multi_args = new TreeSet<>(Arrays.asList( |
289 StandardBundlerParam.JAVA_OPTIONS.getID(), |
293 StandardBundlerParam.JAVA_OPTIONS.getID(), |
290 StandardBundlerParam.ARGUMENTS.getID(), |
294 StandardBundlerParam.ARGUMENTS.getID(), |
291 StandardBundlerParam.MODULE_PATH.getID(), |
295 StandardBundlerParam.MODULE_PATH.getID(), |
292 StandardBundlerParam.ADD_MODULES.getID(), |
296 StandardBundlerParam.ADD_MODULES.getID(), |