From 9aeef9976d6877032a6b14e8cbc63522332b6eb9 Mon Sep 17 00:00:00 2001 From: Stephen Edwards Date: Mon, 10 Oct 2016 13:59:40 -0700 Subject: [PATCH 1/2] Use Eclipse Mars for compilation and tests. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ae4db5..e4cbb84 100644 --- a/pom.xml +++ b/pom.xml @@ -69,7 +69,7 @@ under the License. UTF-8 0.23.0 - http://download.eclipse.org/releases/luna + http://download.eclipse.org/releases/mars sdedwards/m2e-nar From b434553014935088e7d8acc0647b6851bf7748ec Mon Sep 17 00:00:00 2001 From: Stephen Edwards Date: Mon, 10 Oct 2016 14:00:51 -0700 Subject: [PATCH 2/2] Fix NullPointerException when importing some projects. --- .../sdedwards/m2e_nar/internal/CProjectConfigurator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.github.sdedwards.m2e-nar/src/com/github/sdedwards/m2e_nar/internal/CProjectConfigurator.java b/com.github.sdedwards.m2e-nar/src/com/github/sdedwards/m2e_nar/internal/CProjectConfigurator.java index 77dc814..d580900 100644 --- a/com.github.sdedwards.m2e-nar/src/com/github/sdedwards/m2e_nar/internal/CProjectConfigurator.java +++ b/com.github.sdedwards.m2e-nar/src/com/github/sdedwards/m2e_nar/internal/CProjectConfigurator.java @@ -51,13 +51,13 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.m2e.core.internal.IMavenConstants; +import org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory; import org.eclipse.m2e.core.lifecyclemapping.model.IPluginExecutionMetadata; import org.eclipse.m2e.core.project.IMavenProjectFacade; import org.eclipse.m2e.core.project.configurator.AbstractBuildParticipant; import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator; import org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant; import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest; -import org.eclipse.m2e.jdt.internal.JavaProjectConfigurator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,6 +73,7 @@ public class CProjectConfigurator extends AbstractProjectConfigurator { private static final Logger logger = LoggerFactory.getLogger(CProjectConfigurator.class); public static final String CONFIGURATOR_ID = "com.github.sdedwards.m2e_nar.cConfigurator"; + public static final String JAVA_CONFIGURATOR_ID = "org.eclipse.m2e.jdt.javaConfigurator"; @Override public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException { @@ -111,7 +112,7 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor moni } } - JavaProjectConfigurator jConfig = new JavaProjectConfigurator(); + AbstractProjectConfigurator jConfig = LifecycleMappingFactory.createProjectConfigurator(JAVA_CONFIGURATOR_ID); jConfig.configure(request, monitor); // ensure CDT builder is after the Maven one