List<MavenPlugin> plugins = new ArrayList<MavenPlugin>();
List<org.apache.maven.model.Plugin> pomPlugins = getPluginsPOM(managedPlugin, effectivePlugin);
for (org.apache.maven.model.Plugin plugin : pomPlugins)
{
MavenPluginAdapter adapter = new MavenPluginAdapter(plugin);
MavenPluginBuilder pluginBuilder = MavenPluginBuilder
.create()
.setCoordinate(
CoordinateBuilder.create().setGroupId(plugin.getGroupId())
.setArtifactId(plugin.getArtifactId()).setVersion(plugin.getVersion()))
.setConfiguration(adapter.getConfig());
for (Execution execution : adapter.listExecutions())
{
pluginBuilder.addExecution(execution);
}
plugins.add(pluginBuilder);
}
return plugins;
}