Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2015-01-08 19:53:21 -0500
committerIgor Fedorenko2015-01-08 19:53:21 -0500
commitcc592470902677ca515925d93448132aeb0caf78 (patch)
tree6815551d2d74eea9fbb18dcf7da86b6e58cda3ec /org.eclipse.m2e.core
parentee90504a5894ecf1e77cc4ddd19c598001377c89 (diff)
downloadm2e-core-cc592470902677ca515925d93448132aeb0caf78.tar.gz
m2e-core-cc592470902677ca515925d93448132aeb0caf78.tar.xz
m2e-core-cc592470902677ca515925d93448132aeb0caf78.zip
457093 associate missing configurator errors/fixes with plugin executions
Change-Id: I4e4eea28361a7b5d355476cb68da68b4df95a660 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java7
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/MissingConfiguratorProblemInfo.java10
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/discovery/MojoExecutionMappingConfiguration.java4
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties2
4 files changed, 12 insertions, 11 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 c096cbcd..f734d99d 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
@@ -735,11 +735,10 @@ public class LifecycleMappingFactory {
}
} catch(LifecycleMappingConfigurationException e) {
log.debug("Could not instantiate project configurator {}.", configuratorId, e);
- SourceLocation markerLocation = SourceLocationHelper.findLocation(mavenProject, executionKey);
- result.addProblem(new MissingConfiguratorProblemInfo(configuratorId, markerLocation));
if(reportNotCoveredMojoExecutionProblems) {
- result.addProblem(new NotCoveredMojoExecution(executionKey, notCoveredMojoExecutionSeverity
- .getSeverity(), markerLocation));
+ SourceLocation markerLocation = SourceLocationHelper.findLocation(mavenProject, executionKey);
+ result.addProblem(new MissingConfiguratorProblemInfo(configuratorId, executionKey,
+ notCoveredMojoExecutionSeverity.getSeverity(), markerLocation));
}
}
break;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/MissingConfiguratorProblemInfo.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/MissingConfiguratorProblemInfo.java
index b5e58e48..2b6ffea5 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/MissingConfiguratorProblemInfo.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/MissingConfiguratorProblemInfo.java
@@ -17,15 +17,17 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.internal.markers.MavenProblemInfo;
import org.eclipse.m2e.core.internal.markers.SourceLocation;
+import org.eclipse.m2e.core.project.configurator.MojoExecutionKey;
-public class MissingConfiguratorProblemInfo extends MavenProblemInfo {
+public class MissingConfiguratorProblemInfo extends MojoExecutionProblemInfo {
private final String configuratorId;
- public MissingConfiguratorProblemInfo(String configuratorId, SourceLocation markerLocation) {
- super(NLS.bind(Messages.ProjectConfiguratorNotAvailable, configuratorId), markerLocation);
+ public MissingConfiguratorProblemInfo(String configuratorId, MojoExecutionKey mojoExecutionKey, int severity,
+ SourceLocation markerLocation) {
+ super(NLS.bind(Messages.ProjectConfiguratorNotAvailable, configuratorId, mojoExecutionKey.toString()), severity,
+ mojoExecutionKey, markerLocation);
this.configuratorId = configuratorId;
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/discovery/MojoExecutionMappingConfiguration.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/discovery/MojoExecutionMappingConfiguration.java
index 861d5525..095f2e1d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/discovery/MojoExecutionMappingConfiguration.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/discovery/MojoExecutionMappingConfiguration.java
@@ -94,7 +94,7 @@ public class MojoExecutionMappingConfiguration implements ILifecycleMappingEleme
}
public static class ProjectConfiguratorMappingRequirement implements ILifecycleMappingRequirement {
- private final MojoExecutionKey execution; // only to make AggregateMappingLabelProvider happy. not part of the key
+ private final MojoExecutionKey execution;
private final String configuratorId;
@@ -118,7 +118,7 @@ public class MojoExecutionMappingConfiguration implements ILifecycleMappingEleme
ProjectConfiguratorMappingRequirement other = (ProjectConfiguratorMappingRequirement) obj;
- return configuratorId.equals(other.configuratorId);
+ return configuratorId.equals(other.configuratorId) && execution.equals(other.execution);
}
public MojoExecutionKey getExecution() {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties
index fa573572..1d12bfc7 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties
@@ -28,7 +28,7 @@ LifecycleMappingPackagingMismatch=Packaging type {0} configured in embedded life
LifecycleMappingPluginVersionIncompatible=Incompatible lifecycle mapping plugin version {0}
PluginExecutionMappingDuplicate=Conflicting lifecycle mapping (plugin execution "{0}"). To enable full functionality, remove the conflicting mapping and run Maven->Update Project Configuration.
PluginExecutionMappingInvalid=Invalid plugin execution mapping (plugin execution "{0}"). To enable full functionality, correct the invalid mapping and run Maven->Update Project Configuration.
-ProjectConfiguratorNotAvailable=Project configurator "{0}" is not available. To enable full functionality, install the project configurator and run Maven->Update Project Configuration.
+ProjectConfiguratorNotAvailable=Project configurator "{0}" required by plugin execution "{1}" is not available. To enable full functionality, install the project configurator and run Maven->Update Project Configuration.
ProjectConfigurationUpdateRequired=Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project... from the project context menu or use Quick Fix.
LocalProjectScanner_accessDeniedFromFolder=Can not access files from ''{0}''
LocalProjectScanner_task_scanning=Scanning folders

Back to the top