Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvladt2011-02-23 17:35:26 +0000
committervladt2011-02-23 17:35:26 +0000
commita7116cd190fd769264fb68c4a3fe58f8729f023f (patch)
treec63595135ce4fd5825e3ec7ce8059c9ff1014bb4 /org.eclipse.m2e.tests.common
parentccac2d36d92bf43058665aa83205cf0c2310ff1f (diff)
downloadm2e-core-a7116cd190fd769264fb68c4a3fe58f8729f023f.tar.gz
m2e-core-a7116cd190fd769264fb68c4a3fe58f8729f023f.tar.xz
m2e-core-a7116cd190fd769264fb68c4a3fe58f8729f023f.zip
337220: Added source id to SourceLocation
Diffstat (limited to 'org.eclipse.m2e.tests.common')
-rw-r--r--org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/WorkspaceHelpers.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/WorkspaceHelpers.java b/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/WorkspaceHelpers.java
index ebd25c27..be069013 100644
--- a/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/WorkspaceHelpers.java
+++ b/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/WorkspaceHelpers.java
@@ -37,6 +37,8 @@ import org.eclipse.core.runtime.Status;
import org.codehaus.plexus.util.FileUtils;
+import org.apache.maven.project.MavenProject;
+
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.internal.markers.SourceLocation;
import org.eclipse.m2e.core.project.configurator.MojoExecutionKey;
@@ -44,6 +46,9 @@ import org.eclipse.m2e.core.project.configurator.MojoExecutionKey;
@SuppressWarnings("restriction")
public class WorkspaceHelpers {
+ public static String getModelId(MavenProject mavenProject) {
+ return mavenProject.getGroupId() + ":" + mavenProject.getArtifactId() + ":" + mavenProject.getVersion();
+ }
public static void cleanWorkspace() throws InterruptedException, CoreException {
Exception cause = null;
@@ -323,6 +328,8 @@ public class WorkspaceHelpers {
Assert.assertEquals("Wrong cause resource path", markerLocation.getResourcePath(),
marker.getAttribute(IMavenConstants.MARKER_CAUSE_RESOURCE_PATH));
+ Assert.assertEquals("Wrong cause resource id", markerLocation.getResourceId(),
+ marker.getAttribute(IMavenConstants.MARKER_CAUSE_RESOURCE_ID));
Assert.assertEquals("Wrong cause line number", markerLocation.getLineNumber(),
marker.getAttribute(IMavenConstants.MARKER_CAUSE_LINE_NUMBER));
Assert.assertEquals("Wrong cause column start", markerLocation.getColumnStart(),

Back to the top