// if (!new File(projectFile).exists())
// {
// throw new MojoExecutionException("soapui-project-file [" + projectFile + "] is not found");
// }
SoapUIToolRunner runner = new SoapUIToolRunner("SoapUI " + SoapUI.SOAPUI_VERSION + " Maven2 Tool Runner");
runner.setProjectFile(projectFile);
if (iface != null)
runner.setInterface(iface);
if (tool != null)
runner.setTool(tool);
if (settingsFile != null)
runner.setSettingsFile(settingsFile);
if (projectPassword != null)
runner.setProjectPassword(projectPassword);
if (settingsPassword != null)
runner.setSoapUISettingsPassword(settingsPassword);
if (outputFolder != null)
runner.setOutputFolder(outputFolder);
if( soapuiProperties != null && soapuiProperties.size() > 0 )
for( Object key : soapuiProperties.keySet() )
{
System.out.println( "Setting " + ( String )key + " value " + soapuiProperties.getProperty( ( String )key ) );
System.setProperty( ( String )key, soapuiProperties.getProperty( ( String )key ) );
}
try
{
runner.run();
}
catch (Exception e)
{
getLog().error(e.toString());
throw new MojoFailureException(this, "SoapUI Tool(s) failed", e.getMessage());