Skip to content

Commit

Permalink
eclipse-che#5356 use java for maven server which ws-agent use (eclips…
Browse files Browse the repository at this point in the history
…e-che#5363)

Signed-off-by: Even Vidolob <evidolob@codenvy.com>
  • Loading branch information
evidolob authored and Eugene Ivantsov committed Jun 13, 2017
1 parent 8720ded commit e4f0f23
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.name.Named;

import org.eclipse.che.maven.data.MavenExplicitProfiles;
import org.eclipse.che.maven.data.MavenModel;
import org.eclipse.che.maven.server.MavenRemoteServer;
Expand Down Expand Up @@ -192,7 +191,7 @@ protected synchronized void cleanUp() {

public JavaParameters buildMavenServerParameters() {
JavaParameters parameters = new JavaParameters();
parameters.setJavaExecutable("java");
parameters.setJavaExecutable(System.getProperties().getProperty("java.home") + "/bin/java");
parameters.setWorkingDirectory(System.getProperty("java.io.tmpdir"));
parameters.setMainClassName(MAVEN_SERVER_MAIN);
//TODO read and set MAVEN_OPTS system properties
Expand All @@ -203,9 +202,7 @@ public JavaParameters buildMavenServerParameters() {
String mavenHome = System.getenv("M2_HOME");
addDirToClasspath(classPath, new File(mavenHome, "lib"));
File bootDir = new File(mavenHome, "boot");
File[] classworlds = bootDir.listFiles((dir, name) -> {
return name.contains("classworlds");
});
File[] classworlds = bootDir.listFiles((dir, name) -> name.contains("classworlds"));

if (classworlds != null) {
for (File file : classworlds) {
Expand Down

0 comments on commit e4f0f23

Please sign in to comment.