// displayClasspath(cl, "using classpath");
// load("javax.servlet.ServletException", cl);
// load("org.codehaus.xfire.transport.http.XFireServletController", cl);
final WsdlGenTask task = new WsdlGenTask();
task.setProject( antProject );
task.setOutputDirectory( outputDirectory.getAbsolutePath() );
for (Iterator iterator = configs.iterator(); iterator.hasNext();) {
String configUrl = (String) iterator.next();
// required for multi-modules projects
if ( ! new File( configUrl ).exists() ) {
getLog().warn( "configUrl not found. Task will perhaps fail" );
}
task.setConfigUrl( configUrl );
getLog().info( "Executing XFire WsdlGen task for configUrl: " + configUrl );
try
{
task.execute();
}
catch ( BuildException e )
{
throw new MojoExecutionException( "command execution failed", e );
}
getLog().debug( "generated " + task.getGeneratedFile());
}
Thread.currentThread().setContextClassLoader(oldCl);
getLog().debug( "Adding outputDirectory as Project's resource.");
Resource resource = new Resource();