Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-02-26 21:06:12 -0500
committerIgor Fedorenko2011-02-26 21:06:12 -0500
commit1f3fcca41c7815ce06a410faa5354dc88577f888 (patch)
tree4915ae626d5a87b297af387774e263f85255c08e /org.eclipse.m2e.discovery/src
parent0b83f43095f517e060ba48777ad6032ba991da2f (diff)
downloadm2e-core-1f3fcca41c7815ce06a410faa5354dc88577f888.tar.gz
m2e-core-1f3fcca41c7815ce06a410faa5354dc88577f888.tar.xz
m2e-core-1f3fcca41c7815ce06a410faa5354dc88577f888.zip
338317 unknown_packaging_type error marker no more
DefaultLifecycleMapping strategy provides good/desired behaviour for vast majority of projects. It does not make sense to require explicit mapping strategy configuration for all projects. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.discovery/src')
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java13
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java3
2 files changed, 3 insertions, 13 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
index ec41ed73..66569796 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
@@ -49,10 +49,7 @@ public class DiscoveryWizardProposal extends WorkbenchMarkerResolution {
}
String type = marker.getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT, null);
- if(IMavenConstants.EDITOR_HINT_UNKNOWN_PACKAGING.equals(type)) {
- MavenDiscovery.launchWizard(Collections.singleton(getPackageType(marker)), Collections.EMPTY_LIST,
- Collections.EMPTY_LIST, Collections.EMPTY_LIST);
- } else if(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(type)) {
+ if(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(type)) {
MavenDiscovery
.launchWizard(Collections.EMPTY_LIST, Collections.singleton(getMojoExecution(marker)), Collections.EMPTY_LIST, Collections.EMPTY_LIST);
} else if(IMavenConstants.EDITOR_HINT_UNKNOWN_LIFECYCLE_ID.equals(type)) {
@@ -79,9 +76,7 @@ public class DiscoveryWizardProposal extends WorkbenchMarkerResolution {
List<String> configuratorIds = new ArrayList<String>();
for(IMarker marker : markers) {
String type = marker.getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT, null);
- if(IMavenConstants.EDITOR_HINT_UNKNOWN_PACKAGING.equals(type)) {
- packagingTypes.add(getPackageType(marker));
- } else if(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(type)) {
+ if(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(type)) {
mojos.add(getMojoExecution(marker));
} else if(IMavenConstants.EDITOR_HINT_UNKNOWN_LIFECYCLE_ID.equals(type)) {
lifecycleIds.add(getLifecycleId(marker));
@@ -106,10 +101,6 @@ public class DiscoveryWizardProposal extends WorkbenchMarkerResolution {
return null;
}
- private String getPackageType(IMarker marker) {
- return marker.getAttribute(IMavenConstants.MARKER_ATTR_PACKAGING, null);
- }
-
private String getLifecycleId(IMarker marker) {
return marker.getAttribute(IMavenConstants.MARKER_ATTR_LIFECYCLE_PHASE, null);
}
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java
index e7a06b0c..d34b376f 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java
@@ -48,8 +48,7 @@ public class MavenDiscoveryMarkerResolutionGenerator implements IMarkerResolutio
public static boolean canResolve(IMarker marker) {
String type = marker.getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT, null);
- return IMavenConstants.EDITOR_HINT_UNKNOWN_PACKAGING.equals(type)
- || IMavenConstants.EDITOR_HINT_MISSING_CONFIGURATOR.equals(type)
+ return IMavenConstants.EDITOR_HINT_MISSING_CONFIGURATOR.equals(type)
|| IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(type)
|| IMavenConstants.EDITOR_HINT_UNKNOWN_LIFECYCLE_ID.equals(type);
}

Back to the top