Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-12-06 09:43:53 -0500
committerIgor Fedorenko2011-12-06 09:43:53 -0500
commit7e1e9331ac0d6667fe55f404ba54cf75d1dbe672 (patch)
tree1ca2639a3a4e7d0cc9e627d1ff3e18a04fcacd78
parent0783d2fe070e7882b44bc5156f6cc43f797f2761 (diff)
downloadm2e-core-7e1e9331ac0d6667fe55f404ba54cf75d1dbe672.tar.gz
m2e-core-7e1e9331ac0d6667fe55f404ba54cf75d1dbe672.tar.xz
m2e-core-7e1e9331ac0d6667fe55f404ba54cf75d1dbe672.zip
Suppressed NPE in maven plugin embedded mapping metadata lookupmilestones/1.1/1.1.0.20111210-1509
This NPE causes quite bad failure during project configuration update and workspace build (nothig works, basically). This commit suppresses the NPE, but further investigation is needed to understand the condisions under which m2e is not able to calculate maven build execution plan. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
index 50e47c3d..2155b66c 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
@@ -255,6 +255,11 @@ public class LifecycleMappingFactory {
List<MojoExecution> mojoExecutions, List<ArtifactRepository> remoteRepositories, IProgressMonitor monitor) {
Map<File, LifecycleMappingMetadataSource> result = new LinkedHashMap<File, LifecycleMappingMetadataSource>();
+ if(mojoExecutions == null || mojoExecutions.isEmpty()) {
+ // TODO need to understand under what conditions execution plan is null here
+ return Collections.emptyList();
+ }
+
MavenImpl maven = (MavenImpl) MavenPlugin.getMaven();
for(MojoExecution execution : mojoExecutions) {

Back to the top