String goal = "test";
Plugin plugin = new Plugin();
plugin.setGroupId( "org.apache.maven.plugins" );
plugin.setArtifactId( "maven-surefire-plugin" );
plugin.setVersion( "2.4.2" );
<BUG>MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( plugin, goal, session.getCurrentProject(), session.getLocalRepository() );
assertPluginDescriptor( mojoDescriptor, "org.apache.maven.plugins", "maven-surefire-plugin", "2.4.2" );</BUG>
System.out.println( session.getCurrentProject().getBuild().getPluginsAsMap() );
Xpp3Dom configuration = (Xpp3Dom) session.getCurrentProject().getBuild().getPluginsAsMap().get( plugin.getKey() ).getExecutions().get( 0 ).getConfiguration();
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, configuration );

String goal = "test";
Plugin plugin = new Plugin();
plugin.setGroupId( "org.apache.maven.plugins" );
plugin.setArtifactId( "maven-surefire-plugin" );
plugin.setVersion( "2.4.2" );
MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( plugin, goal, session.getLocalRepository(), session.getCurrentProject().getRemoteArtifactRepositories() );
assertPluginDescriptor( mojoDescriptor, "org.apache.maven.plugins", "maven-surefire-plugin", "2.4.2" );
System.out.println( session.getCurrentProject().getBuild().getPluginsAsMap() );
Xpp3Dom configuration = (Xpp3Dom) session.getCurrentProject().getBuild().getPluginsAsMap().get( plugin.getKey() ).getExecutions().get( 0 ).getConfiguration();
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, configuration );
