Skip to content

Commit 8f9b5c7

Browse files
rombertlaeubi
authored andcommitted
Gracefully handle projects that can't be built during project update
If a project fails even a build at VALIDATION_LEVEL_MINIMAL its configuration cannot be updated. One such root cause is an unresolvable paretn pom. Ignore such projects when updating configuration to allow the job to succeed for other projects. Fixes #1605
1 parent db6dd23 commit 8f9b5c7

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

org.eclipse.m2e.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Bundle-Name
44
Bundle-SymbolicName: org.eclipse.m2e.core;singleton:=true
5-
Bundle-Version: 2.7.2.qualifier
5+
Bundle-Version: 2.7.3.qualifier
66
Bundle-Activator: org.eclipse.m2e.core.internal.MavenPluginActivator
77
Bundle-Vendor: %Bundle-Vendor
88
Bundle-Localization: plugin

org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,11 @@ private void refresh(MutableProjectRegistry newState, DependencyResolutionContex
468468
if(!allProcessedPoms.contains(newFacade.getPom())) {
469469
// facade from workspace state that has not been refreshed yet
470470
newFacade = readMavenProjectFacades(Collections.singletonList(pom), newState, context, monitor).get(pom);
471+
if ( newFacade == null ) {
472+
// https://github.com/eclipse-m2e/m2e-core/issues/1605
473+
// projects that fail even minimal validation, e.g. unresolvable parent pom, cannot be read
474+
continue;
475+
}
471476
} else {
472477
// recreate facade instance to trigger project changed event
473478
// this is only necessary for facades that are refreshed because their dependencies changed

org.eclipse.m2e.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.m2e.feature"
44
label="%featureName"
5-
version="2.9.0.qualifier"
5+
version="2.9.1.qualifier"
66
provider-name="%providerName"
77
plugin="org.eclipse.m2e.core"
88
license-feature="org.eclipse.license"

0 commit comments

Comments
 (0)