Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2013-02-27 18:25:58 -0500
committerIgor Fedorenko2013-02-27 18:26:02 -0500
commitcb6a0383fcd3423df165371fa4e528e124f1839f (patch)
treec81696bd5d46a7d43045ef14bcae715d7e58858a
parentbe7c29dfb8239a08acd6a719841569858db3f2f3 (diff)
downloadm2e-core-cb6a0383fcd3423df165371fa4e528e124f1839f.tar.gz
m2e-core-cb6a0383fcd3423df165371fa4e528e124f1839f.tar.xz
m2e-core-cb6a0383fcd3423df165371fa4e528e124f1839f.zip
397251 fixed NPE when building projects with non-parseable poms
this was a recently introduced regression. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java
index 616d2781..9faf9596 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java
@@ -90,11 +90,16 @@ public class MavenBuilder extends IncrementalProjectBuilder implements DeltaProv
public IProject[] call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException {
final IMavenProjectFacade projectFacade = getProjectFacade(pomResource, project, monitor);
+ if(projectFacade == null) {
+ // TODO unit test me
+ return null;
+ }
+
return projectManager.execute(projectFacade, new ICallable<IProject[]>() {
public IProject[] call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException {
- MavenProject mavenProject = null;
try {
- mavenProject = projectFacade.getMavenProject(monitor);
+ // make sure projectFacade has MavenProject instance loaded
+ projectFacade.getMavenProject(monitor);
} catch(CoreException ce) {
//unable to read the project facade
addErrorMarker(project, ce);

Back to the top