Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2013-09-29 14:32:55 -0400
committerIgor Fedorenko2013-09-29 14:32:55 -0400
commit45412c2df9e9baafd1dca8351b3cd28965d8c284 (patch)
tree5a2d048f5b3768bc9685f769fffe81c8248a3614
parente2cf20ac1ff22fcba532c26a05800936ef00659c (diff)
downloadm2e-core-45412c2df9e9baafd1dca8351b3cd28965d8c284.tar.gz
m2e-core-45412c2df9e9baafd1dca8351b3cd28965d8c284.tar.xz
m2e-core-45412c2df9e9baafd1dca8351b3cd28965d8c284.zip
418280 fixed tesla external runtime version detection
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExternalRuntime.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExternalRuntime.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExternalRuntime.java
index e539678f..60b083de 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExternalRuntime.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExternalRuntime.java
@@ -81,7 +81,7 @@ public class MavenExternalRuntime implements MavenRuntime {
}
return m2Conf; //$NON-NLS-1$
}
-
+
public void createLauncherConfiguration(final IMavenLauncherConfiguration collector, IProgressMonitor monitor)
throws CoreException {
@@ -209,7 +209,7 @@ public class MavenExternalRuntime implements MavenRuntime {
public void setAppMain(String mainClassName, String mainRealmName) {
}
}
- ;
+
VersionHandler handler = new VersionHandler();
Properties properties = new Properties();
@@ -233,14 +233,19 @@ public class MavenExternalRuntime implements MavenRuntime {
}
if(zip != null) {
try {
+ String suffix = "";
ZipEntry zipEntry = zip.getEntry("META-INF/maven/org.apache.maven/maven-core/pom.properties"); //$NON-NLS-1$
+ if(zipEntry == null) {
+ suffix = "-tesla";
+ zipEntry = zip.getEntry("META-INF/maven/io.tesla.maven/maven-core/pom.properties"); //$NON-NLS-1$
+ }
if(zipEntry != null) {
Properties pomProperties = new Properties();
pomProperties.load(zip.getInputStream(zipEntry));
String version = pomProperties.getProperty("version"); //$NON-NLS-1$
if(version != null) {
- return version;
+ return version + suffix;
}
}
} finally {

Back to the top