/**
* Invokes the com.sun.enterprise.tools.verifier.Verifier
*/
private void invokeVerifier() {
ExecTask exec = (ExecTask)project.createTask("exec");
String argument = "";
//adding the partitioning options
if(partitionOpts != null)
argument = addPartitionOptions();
//adding the fail/warning reporting option
if ((reportingOpts == null) || (reportingOpts.equals("")))
argument += " -rw";
else {// check for valid options a, w and f
if ( reportingOpts.equals("f") || reportingOpts.equals("w")
|| reportingOpts.equals("a") )
argument += " -r"+reportingOpts;
else
throw new BuildException("Provide a valid reporting option. " +
"Valid options are [f, w, a] ");
}
createResultDir("static");
//adding the result directory option
argument += " -d "+resultDir;
//do not run the runtime tests
argument += " -R";
// finally adding the application name in the options
argument += " "+appName.getAbsolutePath();
Commandline.Argument arg = exec.createArg();
arg.setLine(argument);
exec.setExecutable(j2ee_home+"/bin/verifier");
exec.setDir(new File(j2ee_home,"bin"));
exec.setVMLauncher(false);
//the exit status is non-zero if any assertion failed but
// we want to continue to invokeGenReportTool
exec.setFailonerror(false);
exec.execute();
}