@Override
public void configure(ProjectConfigurationRequest configRequest, IProgressMonitor monitor) throws CoreException {
// at this point the JDT project is already created by the tycho plugin
// we just need to setup the appropriate facets
Logger logger = Activator.getDefault().getPluginLogger();
IProject project = configRequest.getProject();
logger.trace("BundleProjectActivator called for POM {0} and project {1}", configRequest.getPom().getFullPath(),
project.getName());
// check for maven-sling-plugin as well (to make sure this is a Sling project)
for (Plugin plugin : configRequest.getMavenProject().getBuildPlugins()) {
if (plugin.getArtifactId().equals(MAVEN_SLING_PLUGIN_ARTIFACT_ID)
&& plugin.getGroupId().equals(MAVEN_SLING_PLUGIN_GROUP_ID)) {
logger.trace(
"Found maven-sling-plugin in build plugins for project {0}, therefore adding sling bundle facets!",
project.getName());
ConfigurationHelper.convertToBundleProject(project);
return;
}
}
logger.trace("Couldn't find maven-sling-plugin in build plugins for project {0}", project.getName());
}