public void execute()
throws MojoExecutionException
{
for ( WebReference webreference : webreferences )
{
Vendor vendor = getCompilerVendor();
List<String> commands = getCommandsFor( vendor, webreference );
getLog().debug( "NPANDAY-1300-000: Commands = " + commands.toString() );
CommandExecutor commandExecutor = CommandExecutor.Factory.createDefaultCommmandExecutor();
try
{
commandExecutor.executeCommand( getExecutableFor( vendor, netHome ), commands );
getLog().info(
"NPANDAY-1300-008: Generated WSDL: File = "
+ project.getBuild().getSourceDirectory()
+ File.separator
+ project.getBuild().getSourceDirectory()
+ File.separator
+ webreference.getOutput()
+ File.separator
+ getFileNameFor( project.getBuild().getSourceDirectory() + File.separator
+ webreference.getPath() ) );
}
catch ( ExecutionException e )
{
// TODO: This is a hack to get around the fact that MONO returns a result=1 on warnings and MS returns a
// result=1 on errors.
// I don't want to fail on MONO warning here.
if ( ( vendor.equals( Vendor.MONO ) && commandExecutor.getResult() > 1 )
|| vendor.equals( Vendor.MICROSOFT ) )
{
throw new MojoExecutionException( "NPANDAY-1300-001: Result = " + commandExecutor.getResult(), e );
}
}
}