diff --git a/gulpfile.js b/gulpfile.js
index 7b5302b7..431dd036 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -20,8 +20,10 @@ gulp.task('build-plugin', (done) => {
cp.execSync(`${mvnw()} clean package`, { cwd: serverDir, stdio: [0, 1, 2] });
gulp.src(path.join(serverDir, 'com.microsoft.java.test.plugin/target/*.jar'))
.pipe(gulp.dest('./server'));
- gulp.src(path.join(serverDir, 'com.microsoft.java.test.runner/target/*-jar-with-dependencies.jar'))
+ gulp.src(path.join(serverDir, 'com.microsoft.java.test.runner/target/*.jar'))
.pipe(gulp.dest('./server'));
+ gulp.src(path.join(serverDir, 'com.microsoft.java.test.runner/target/lib/*.jar'))
+ .pipe(gulp.dest('./server/lib'));
done();
});
diff --git a/java-extension/com.microsoft.java.test.plugin/pom.xml b/java-extension/com.microsoft.java.test.plugin/pom.xml
index fce6cdd3..64244915 100644
--- a/java-extension/com.microsoft.java.test.plugin/pom.xml
+++ b/java-extension/com.microsoft.java.test.plugin/pom.xml
@@ -13,19 +13,49 @@
- org.eclipse.tycho
- tycho-maven-plugin
- ${tycho-version}
- true
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+ 2.15
+
+
+
+ integration-tests
+
+ integration-test
+ verify
+
+
+
+ ${failsafeArgLine}
+
+ ${skip.integration.tests}
+
+
+
org.apache.maven.plugins
maven-dependency-plugin
+ 3.1.1
+
+
+
+ get-libs
+
+ copy
+
+ validate
+
+
+ false
+ ${basedir}/lib/
+
+ true
com.google.code.gson
@@ -35,6 +65,50 @@
+
+ org.eclipse.tycho
+ target-platform-configuration
+ ${tycho-version}
+
+
+ org.eclipse.tycho
+ tycho-maven-plugin
+ ${tycho-version}
+ true
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+
+
+ photon
+ p2
+ http://download.eclipse.org/releases/photon
+
+
+ oss.sonatype.org
+ https://oss.sonatype.org/content/repositories/snapshots/
+
+ true
+
+
+
+ LSP4J
+ p2
+ http://download.eclipse.org/lsp4j/updates/releases/0.5.0/
+
+
+ JDT.LS
+ p2
+ http://download.eclipse.org/jdtls/snapshots/repository/latest/
+
+
+ JBOLL.TOOLS
+ p2
+ http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.0-2018-05-16_00-46-30-H11
+
+
diff --git a/java-extension/com.microsoft.java.test.runner/pom.xml b/java-extension/com.microsoft.java.test.runner/pom.xml
index 1a5a342f..cd9f2c55 100644
--- a/java-extension/com.microsoft.java.test.runner/pom.xml
+++ b/java-extension/com.microsoft.java.test.runner/pom.xml
@@ -53,28 +53,42 @@
org.apache.maven.plugins
- maven-assembly-plugin
- 3.1.0
-
-
-
- com.microsoft.java.test.runner.Launcher
-
-
-
- jar-with-dependencies
-
-
+ maven-dependency-plugin
+ 3.1.1
- make-assembly
+ copy-dependencies
package
- single
+ copy-dependencies
+
+ ${project.build.directory}/lib
+ false
+ false
+ true
+ runtime
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.1.1
+
+
+
+ true
+ lib/
+ com.microsoft.java.test.runner.Launcher
+
+
+ .
+
+
+
+
org.apache.maven.plugins
maven-checkstyle-plugin
diff --git a/java-extension/pom.xml b/java-extension/pom.xml
index c94c2a55..582debb1 100644
--- a/java-extension/pom.xml
+++ b/java-extension/pom.xml
@@ -47,86 +47,7 @@
-
- org.apache.maven.plugins
- maven-failsafe-plugin
- 2.15
-
-
-
- integration-tests
-
- integration-test
- verify
-
-
-
- ${failsafeArgLine}
-
- ${skip.integration.tests}
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
-
- get-libs
-
- copy
-
- validate
-
-
-
- false
- ${basedir}/lib/
-
- true
-
-
-
- org.eclipse.tycho
- target-platform-configuration
- ${tycho-version}
-
-
-
- photon
- p2
- http://download.eclipse.org/releases/photon
-
-
- oss.sonatype.org
- https://oss.sonatype.org/content/repositories/snapshots/
-
- true
-
-
-
- LSP4J
- p2
- http://download.eclipse.org/lsp4j/updates/releases/0.5.0/
-
-
- JDT.LS
- p2
- http://download.eclipse.org/jdtls/snapshots/repository/latest/
-
-
- JBOLL.TOOLS
- p2
- http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.0-2018-05-16_00-46-30-H11
-
-
diff --git a/src/runners/baseRunner/BaseRunner.ts b/src/runners/baseRunner/BaseRunner.ts
index 92a7d195..cfee2df0 100644
--- a/src/runners/baseRunner/BaseRunner.ts
+++ b/src/runners/baseRunner/BaseRunner.ts
@@ -45,12 +45,11 @@ export abstract class BaseRunner implements ITestRunner {
}
public async setup(tests: ITestItem[], isDebug: boolean = false, config?: IExecutionConfig): Promise {
- const runnerJarFilePath: string = await this.getRunnerJarFilePath();
this.port = isDebug ? await getPort() : undefined;
this.tests = tests;
this.isDebug = isDebug;
const testPaths: string[] = tests.map((item: ITestItem) => Uri.parse(item.uri).fsPath);
- const classpaths: string[] = [...await resolveRuntimeClassPath(testPaths), runnerJarFilePath];
+ const classpaths: string[] = [...await resolveRuntimeClassPath(testPaths), await this.getRunnerJarFilePath(), await this.getRunnerLibPath()];
this.storagePathForCurrentSession = path.join(this.storagePath || os.tmpdir(), new Date().getTime().toString());
this.classpath = await classpathUtils.getClassPathString(classpaths, this.storagePathForCurrentSession);
this.config = config;
@@ -188,10 +187,18 @@ export abstract class BaseRunner implements ITestRunner {
protected abstract getRunnerCommandParams(): string[];
private async getRunnerJarFilePath(): Promise {
- const runnerPath: string = path.join(this.runnerDir, 'com.microsoft.java.test.runner-jar-with-dependencies.jar');
- if (await fse.pathExists(runnerPath)) {
- return runnerPath;
+ return this.getPath('com.microsoft.java.test.runner.jar');
+ }
+
+ private async getRunnerLibPath(): Promise {
+ return this.getPath('lib');
+ }
+
+ private async getPath(subPath: string): Promise {
+ const fullPath: string = path.join(this.runnerDir, subPath);
+ if (await fse.pathExists(fullPath)) {
+ return fullPath;
}
- throw new Error('Failed to find runner jar file.');
+ throw new Error(`Failed to find path: ${fullPath}`);
}
}