protected WSDL2CodeMojo newMojo( String pDir, String pGoal ) throws Exception
{
File baseDir = new File(new File(getBasedir()), pDir);
File testPom = new File( baseDir, "pom.xml" );
WSDL2CodeMojo mojo = (WSDL2CodeMojo) lookupMojo( pGoal, testPom );
MavenProjectStub project = new MavenProjectStub();
project.setDependencyArtifacts( new HashSet() );
setVariableValueToObject(mojo, "project", project);
setVariableValueToObject(mojo, "pluginArtifacts", new ArrayList());
setVariableValueToObject(mojo, "wsdlFile", new File(baseDir, "src/main/axis2/service.wsdl"));
setVariableValueToObject(mojo, "outputDirectory", new File(baseDir, "target/generated-sources/axis2/wsdl2code"));
setVariableValueToObject(mojo, "syncMode", "both");