@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { // allow null version for Studio snapshot jar if (key == null) { status.addError("Cannot execute command in installer." + " Invalid rollback syntax: key was not specified."); } }
@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { if (file == null) { status.addError("Invalid install syntax: No file specified"); } }
@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { if (contentToRemove == null || fromFile == null) { status.addError("Cannot execute command in installer." + " Invalid unappend syntax: contentToRemove or fromFile was not specified."); } }
@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { if (file == null) { status.addError("Invalid uninstall syntax: No file specified"); } }
@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { if (addtemplate == null && rmtemplate == null && set == null) { status.addError("Cannot execute command in installer." + " Invalid config syntax: neither addtemplate, rmtemplate " + "or set was specified."); } if (set != null && !set.contains("=")) { status.addError("Invalid config syntax: badly-formed property " + set); } }
@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { if (file == null || tofile == null) { status.addError("Cannot execute command in installer." + " Invalid copy syntax: file, dir, tofile or todir was not specified."); return; } if (tofile.isFile() && !overwrite && !append) { if (removeOnExit) { // a plugin is still there due to a previous action that needs a // restart status.addError("A restart is needed to perform this operation: cleaning " + tofile.getName()); } else { status.addError("Cannot overwrite existing file: " + tofile.getName()); } } if (md5 != null) { try { if (tofile.isFile() && !md5.equals(IOUtils.createMd5(tofile))) { status.addError("MD5 check failed. File: " + tofile + " has changed since its backup"); } } catch (IOException e) { throw new PackageException(e); } } }
@Override protected void doValidate(Task task, ValidationStatus status) throws PackageException { if (file == null || todir == null) { status.addError("Cannot execute command in installer." + " Invalid update syntax: file or todir was not specified."); return; } if (todir.isFile()) { status.addError("Cannot execute command in installer." + " Invalid update command: todir should be a directory!"); } if (file.isFile()) { Match<String> match = JarUtils.findJarVersion(file.getName()); if (match == null) { status.addError("Cannot execute command in installer." + " Cannot use 'update' command for non versioned files!. File name must contain a version: " + file.getName()); } } else if (!file.isDirectory()) { status.addWarning("Ignored command in installer." + " Source file not found! " + file.getName()); } }
@Override public void validate(Task task, ValidationStatus status) throws PackageException { if (fail != null) { if (new Guard(fail).evaluate(guardVars)) { status.addError("Guard failed for command " + getId() + ": " + fail); } } doValidate(task, status); }
DownloadablePackage remotePkg = pm.findRemotePackageById(packageId); if (remotePkg == null) { status.addError(String.format("Cannot perform validation: remote package '%s' not found", packageId)); return; status.addError(String.format("This package is not validated for your current platform: %s", targetPlatform)); status.addError(String.format("Dependency check has failed for package '%s' (%s)", packageId, resolution)); } else { status.addError(resolution.toString().trim().replaceAll("\n", "<br />"));
DownloadablePackage remotePkg = pm.findRemotePackageById(packageId); if (remotePkg == null) { status.addError(String.format("Cannot perform validation: remote package '%s' not found", packageId)); return; status.addError(String.format("This package is not validated for your current platform: %s", targetPlatform)); status.addError(String.format("Dependency check has failed for package '%s' (%s)", packageId, resolution)); } else { status.addError(resolution.toString().trim().replaceAll("\n", "<br />"));