Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-08-05 15:22:12 -0400
committerIgor Fedorenko2014-08-05 15:22:12 -0400
commitc5ef7307bfcdfc78fe39320df2af2f93351e6ae7 (patch)
treec40df11123a7b66de290173280383e03b3ba2e34 /org.eclipse.m2e.core
parentda8545d8cf36e87948910421a6b167100a1f3457 (diff)
downloadm2e-core-c5ef7307bfcdfc78fe39320df2af2f93351e6ae7.tar.gz
m2e-core-c5ef7307bfcdfc78fe39320df2af2f93351e6ae7.tar.xz
m2e-core-c5ef7307bfcdfc78fe39320df2af2f93351e6ae7.zip
441203 fixed maven runtime is missing extension dependencies
Change-Id: Idb7893ad3e2ba9559fcf436759786fa7fae7f6c1 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/launch/AbstractMavenRuntime.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/AbstractMavenRuntime.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/AbstractMavenRuntime.java
index 238af50a..138f8fa3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/AbstractMavenRuntime.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/AbstractMavenRuntime.java
@@ -23,9 +23,11 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
+import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.project.MavenProject;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMavenLauncherConfiguration;
@@ -105,9 +107,14 @@ public abstract class AbstractMavenRuntime implements MavenRuntime {
if(facade == null) {
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, NLS.bind(
Messages.AbstractMavenRuntime_unknownProject, entry.getProject())));
-
}
collector.addProjectEntry(facade);
+ MavenProject mavenProject = facade.getMavenProject(monitor);
+ for(Artifact dependency : mavenProject.getArtifacts()) {
+ if(Artifact.SCOPE_COMPILE.equals(dependency.getScope()) || Artifact.SCOPE_RUNTIME.equals(dependency.getScope())) {
+ collector.addArchiveEntry(dependency.getFile().getAbsolutePath());
+ }
+ }
}
public boolean equals(Object o) {

Back to the top