/** * Log the specified Throwable. * @param t the Throwable to log. * @since 1.6.2 */ private void log(Throwable t) { log(StringUtils.getStackTrace(t), Project.MSG_ERR); }
/** * Deprecated: use nested arg instead. * Set the command line arguments for the class. * * @param s arguments. * * @ant.attribute ignore="true" */ public void setArgs(String s) { log("The args attribute is deprecated. Please use nested arg elements.", Project.MSG_WARN); getCommandLine().createArgument().setLine(s); }
/** * Set the command line arguments for the JVM. * * @param s jvmargs. */ public void setJvmargs(String s) { log("The jvmargs attribute is deprecated. Please use nested jvmarg elements.", Project.MSG_WARN); getCommandLine().createVmArgument().setLine(s); }
/** * Set up our environment variables. * @param exe executable. */ private void setupEnvironment(Execute exe) { String[] environment = env.getVariables(); if (environment != null) { for (String element : environment) { log("Setting environment variable: " + element, Project.MSG_VERBOSE); } } exe.setNewenvironment(newEnvironment); exe.setEnvironment(environment); }
log("When using 'jar' attribute classpath-settings are ignored. See the manual for more information.", Project.MSG_VERBOSE); log("Assertion statements are currently ignored in non-forked mode"); log("Permissions can not be set this way in forked mode.", Project.MSG_WARN); log(getCommandLine().describeCommand(), Project.MSG_VERBOSE); } else { if (getCommandLine().getVmCommand().size() > 1) { log("JVM args ignored when same JVM is used.", Project.MSG_WARN); log("Working directory ignored when same JVM is used.", Project.MSG_WARN); log("Changes to environment variables are ignored when same JVM is used.", Project.MSG_WARN); log("bootclasspath ignored when same JVM is used.", Project.MSG_WARN); log("running " + this.getCommandLine().getClassname() + " with default permissions (exit forbidden)", Project.MSG_VERBOSE); log("Running in same VM " + getCommandLine().describeJavaCommand(), Project.MSG_VERBOSE);
/** * Do the execution. * @throws BuildException if failOnError is set to true and the application * returns a nonzero result code. */ @Override public void execute() throws BuildException { File savedDir = dir; Permissions savedPermissions = perm; int err = -1; try { checkConfiguration(); err = executeJava(); if (err != 0) { if (failOnError) { throw new ExitStatusException("Java returned: " + err, err, getLocation()); } else { log("Java Result: " + err, Project.MSG_ERR); } } maybeSetResultPropertyValue(err); } finally { dir = savedDir; perm = savedPermissions; } }
bootstrapTask.createArg().setValue("-a"); bootstrapTask.createArg().setValue(fileName); bootstrapTask.log("Deploying '" + fileName + "'...", Project.MSG_INFO); } else if (action.equals(ACTION_DELETE) || action.equals(ACTION_UNDEPLOY)) { bootstrapTask.setTaskName("JOnAS/Undeploy"); bootstrapTask.createArg().setValue("-r"); bootstrapTask.createArg().setValue(fileName); bootstrapTask.log("Undeploying '" + fileName + "'...", Project.MSG_INFO); } else if (action.equals(ACTION_LIST)) { bootstrapTask.setTaskName("JOnAS/List");