508 if (slName.equals(usedName)) {
509 throw new PackagerException("ERR_NoUniqueName");
510 }
511 }
512 usedNames.add(slName);
513 }
514 if (runtimeInstaller && bp.getName() == null) {
515 throw new PackagerException("ERR_NoJreInstallerName");
516 }
517
518 generateBundle(bp.getBundleParamsAsMap());
519 return true;
520 } catch (Exception e) {
521 if (Log.isVerbose()) {
522 Log.verbose(e);
523 } else {
524 String msg1 = e.getMessage();
525 Log.error(msg1);
526 if (e.getCause() != null && e.getCause() != e) {
527 String msg2 = e.getCause().getMessage();
528 if (!msg1.contains(msg2)) {
529 Log.error(msg2);
530 }
531 }
532 }
533 return false;
534 }
535 }
536
537 private void validateArguments() throws PackagerException {
538 String type = deployParams.getTargetFormat();
539 String ptype = (type != null) ? type : "default";
540 boolean imageOnly = deployParams.isTargetAppImage();
541 boolean hasAppImage = allOptions.contains(
542 CLIOptions.PREDEFINED_APP_IMAGE);
543 boolean hasRuntime = allOptions.contains(
544 CLIOptions.PREDEFINED_RUNTIME_IMAGE);
545 boolean installerOnly = !imageOnly && hasAppImage;
546 runtimeInstaller = !imageOnly && hasRuntime && !hasAppImage &&
547 !hasMainModule && !hasMainJar;
548
|
508 if (slName.equals(usedName)) {
509 throw new PackagerException("ERR_NoUniqueName");
510 }
511 }
512 usedNames.add(slName);
513 }
514 if (runtimeInstaller && bp.getName() == null) {
515 throw new PackagerException("ERR_NoJreInstallerName");
516 }
517
518 generateBundle(bp.getBundleParamsAsMap());
519 return true;
520 } catch (Exception e) {
521 if (Log.isVerbose()) {
522 Log.verbose(e);
523 } else {
524 String msg1 = e.getMessage();
525 Log.error(msg1);
526 if (e.getCause() != null && e.getCause() != e) {
527 String msg2 = e.getCause().getMessage();
528 if (msg2 != null && !msg1.contains(msg2)) {
529 Log.error(msg2);
530 }
531 }
532 }
533 return false;
534 }
535 }
536
537 private void validateArguments() throws PackagerException {
538 String type = deployParams.getTargetFormat();
539 String ptype = (type != null) ? type : "default";
540 boolean imageOnly = deployParams.isTargetAppImage();
541 boolean hasAppImage = allOptions.contains(
542 CLIOptions.PREDEFINED_APP_IMAGE);
543 boolean hasRuntime = allOptions.contains(
544 CLIOptions.PREDEFINED_RUNTIME_IMAGE);
545 boolean installerOnly = !imageOnly && hasAppImage;
546 runtimeInstaller = !imageOnly && hasRuntime && !hasAppImage &&
547 !hasMainModule && !hasMainJar;
548
|