return plugins;
}
private void addPlugin(final MavenPlugin plugin, boolean managedPlugin)
{
MavenCoreFacet mavenCoreFacet = project.getFacet(MavenCoreFacet.class);
Model pom = mavenCoreFacet.getPOM();
Build build = pom.getBuild();
if (build == null)
build = new Build();
if (managedPlugin)
{
PluginManagement pluginManagement = build.getPluginManagement();
if (pluginManagement == null)
{
pluginManagement = new PluginManagement();
build.setPluginManagement(pluginManagement);
}
pluginManagement.addPlugin(new MavenPluginAdapter(plugin));
}
else
{
build.addPlugin(new MavenPluginAdapter(plugin));
}
pom.setBuild(build);
mavenCoreFacet.setPOM(pom);
}