use of org.eclipse.m2e.core.project.IMavenProjectFacade in project bndtools by bndtools.
the class MavenImplicitProjectRepository method mavenProjectChanged.
@Override
public void mavenProjectChanged(MavenProjectChangedEvent[] events, IProgressMonitor monitor) {
if (events == null)
return;
for (MavenProjectChangedEvent event : events) {
final IMavenProjectFacade mavenProjectFacade = event.getMavenProject();
if (!mavenProjectFacade.getProject().equals(projectFacade.getProject()) && (event.getFlags() != MavenProjectChangedEvent.FLAG_DEPENDENCIES)) {
continue;
}
createRepo(mavenProjectFacade, monitor);
}
}
use of org.eclipse.m2e.core.project.IMavenProjectFacade in project eclipse.jdt.ls by eclipse.
the class MavenBuildSupport method collectProjects.
public void collectProjects(Collection<IProject> projects, IProject project, IProgressMonitor monitor) {
if (!project.isOpen() || !ProjectUtils.isMavenProject(project)) {
return;
}
projects.add(project);
IMavenProjectFacade projectFacade = registry.create(project, monitor);
if (projectFacade != null && "pom".equals(projectFacade.getPackaging())) {
List<String> modules = projectFacade.getMavenProjectModules();
for (String module : modules) {
IPath pomPath = ResourcesPlugin.getWorkspace().getRoot().getFullPath().append(module).append("pom.xml");
IFile pom = ResourcesPlugin.getWorkspace().getRoot().getFile(pomPath);
if (pom.exists()) {
IProject p = pom.getProject();
if (p.isOpen()) {
collectProjects(projects, p, monitor);
}
}
}
}
}
use of org.eclipse.m2e.core.project.IMavenProjectFacade in project xtext-eclipse by eclipse.
the class IgnoreMavenTargetFolderContribution method isRejected.
@Override
public boolean isRejected(IFolder folder) {
IMavenProjectFacade mavenProjectFacade = MavenPlugin.getMavenProjectRegistry().getProject(folder.getProject());
if (mavenProjectFacade == null) {
return false;
}
IPath outputLocation = mavenProjectFacade.getOutputLocation();
if (outputLocation == null) {
return false;
} else if (folder.getFullPath().equals(outputLocation)) {
return true;
}
IPath testOutputLocation = mavenProjectFacade.getTestOutputLocation();
if (testOutputLocation == null) {
return false;
} else if (folder.getFullPath().equals(testOutputLocation)) {
return true;
}
return false;
}
use of org.eclipse.m2e.core.project.IMavenProjectFacade in project liferay-ide by liferay.
the class LiferayMavenProjectConfiguratorTest method testWarPluginNoWarSourceDirConfigured.
@Test
public void testWarPluginNoWarSourceDirConfigured() throws Exception {
IProject project = importProject("projects/configurators/bad-war-config/pom.xml");
assertNotNull(project);
IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().create(project, monitor);
assertNotNull(facade);
waitForJobsToComplete();
assertTrue(LiferayCore.create(project) instanceof FacetedMavenProject);
}
use of org.eclipse.m2e.core.project.IMavenProjectFacade in project liferay-ide by liferay.
the class LiferayMavenProjectConfiguratorTest method testLiferayFacetNoLiferayPluginConfigured.
@Test
public void testLiferayFacetNoLiferayPluginConfigured() throws Exception {
IProject project = importProject("projects/configurators/default-webapp-no-liferay-plugin/pom.xml");
assertNotNull(project);
IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().create(project, monitor);
assertNotNull(facade);
assertTrue(LiferayCore.create(project) instanceof FacetedMavenProject);
}
Aggregations