if (effectiveWsdlOptions.size() == 0) {
getLog().info("Nothing to generate");
return;
}
ClassLoaderSwitcher classLoaderSwitcher = new ClassLoaderSwitcher(getLog());
boolean result = true;
Bus bus = null;
try {
Set<URI> cp = classLoaderSwitcher.switchClassLoader(project, useCompileClasspath, classesDir);
if ("once".equals(fork) || "true".equals(fork)) {
forkOnce(cp, effectiveWsdlOptions);
} else {
for (WadlOption o : effectiveWsdlOptions) {
bus = callCodeGenerator(o, bus, cp);
File dirs[] = o.getDeleteDirs();
if (dirs != null) {
for (int idx = 0; idx < dirs.length; ++idx) {
result = result && deleteDir(dirs[idx]);
}
}
}
}
} finally {
// cleanup as much as we can.
if (bus != null) {
bus.shutdown(true);
}
classLoaderSwitcher.restoreClassLoader();
}
if (project != null && sourceRoot != null && sourceRoot.exists()) {
project.addCompileSourceRoot(sourceRoot.getAbsolutePath());
}
if (project != null && testSourceRoot != null && testSourceRoot.exists()) {