diff --git a/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/pom.xml b/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/pom.xml
index cd62db957..4bbe46059 100644
--- a/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/pom.xml
+++ b/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/pom.xml
@@ -6,7 +6,7 @@
org.springframework.ide.vscode
org.springframework.tooling.jdt.ls.commons.test
1.0.0-SNAPSHOT
- org.springframework.tooling.jdt.ls.commons
+ org.springframework.tooling.jdt.ls.commons.test
org.springframework.tooling
@@ -15,4 +15,44 @@
../pom.xml
+
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+ ${tycho-version}
+
+
+
+
+ eclipse-feature
+ org.eclipse.jdt
+ 0.0.0
+
+
+ eclipse-feature
+ org.eclipse.platform
+ 0.0.0
+
+
+ eclipse-feature
+ org.eclipse.rcp
+ 0.0.0
+
+
+
+
+
+
+ org.eclipse.tycho
+ tycho-surefire-plugin
+ ${tycho-version}
+
+ 200
+ **/*Test.java
+
+
+
+
+
diff --git a/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/src/org/springframework/tooling/jdt/ls/commons/ClasspathListenerHandlerTest.java b/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/src/org/springframework/tooling/jdt/ls/commons/ClasspathListenerHandlerTest.java
index 561eabf3a..68e886551 100644
--- a/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/src/org/springframework/tooling/jdt/ls/commons/ClasspathListenerHandlerTest.java
+++ b/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons.test/src/org/springframework/tooling/jdt/ls/commons/ClasspathListenerHandlerTest.java
@@ -30,10 +30,13 @@ import org.eclipse.jdt.core.JavaCore;
import org.junit.After;
import org.junit.Test;
import org.springframework.tooling.jdt.ls.commons.classpath.Classpath;
+import org.springframework.tooling.jdt.ls.commons.classpath.Classpath.CPE;
import org.springframework.tooling.jdt.ls.commons.classpath.ClientCommandExecutor;
import org.springframework.tooling.jdt.ls.commons.classpath.ReusableClasspathListenerHandler;
import org.springsource.ide.eclipse.commons.frameworks.test.util.ACondition;
+import junit.framework.AssertionFailedError;
+
public class ClasspathListenerHandlerTest {
static class Info {
@@ -99,10 +102,21 @@ public class ClasspathListenerHandlerTest {
ACondition.waitFor("Project with classpath to appear", Duration.ofSeconds(5), () -> {
Classpath cp = classpaths.getFor(project).classpath;
assertTrue(cp.getEntries().stream().filter(cpe -> Classpath.isSource(cpe)).count()==1); //has 1 source entry
- assertTrue(cp.getEntries().stream().filter(cpe -> Classpath.isBinary(cpe) && cpe.isSystem()).count()>=1); //has some system libraries
+ assertClasspath(cp, cp.getEntries().stream().filter(cpe -> Classpath.isBinary(cpe) && cpe.isSystem()).count()>=1); //has some system libraries
});
}
+ private static void assertClasspath(Classpath cp, boolean b) {
+ if (!b) {
+ StringBuilder buf = new StringBuilder();
+ for (CPE cpe : cp.getEntries()) {
+ buf.append("\n ");
+ buf.append(cpe);
+ }
+ throw new AssertionFailedError("Unexpected classpath:" + buf);
+ }
+ }
+
private IProject createTestProject(String name) throws Exception {
File testProjectLocation = new File(FileLocator.toFileURL(Platform.getBundle("org.springframework.tooling.jdt.ls.commons.test").getEntry("test-projects/"+name)).toURI());
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
diff --git a/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons/src/org/springframework/tooling/jdt/ls/commons/classpath/Classpath.java b/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons/src/org/springframework/tooling/jdt/ls/commons/classpath/Classpath.java
index 9bf1f96a1..0f9c02b05 100644
--- a/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons/src/org/springframework/tooling/jdt/ls/commons/classpath/Classpath.java
+++ b/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.commons/src/org/springframework/tooling/jdt/ls/commons/classpath/Classpath.java
@@ -128,8 +128,11 @@ public class Classpath {
@Override
public String toString() {
- return "CPE [kind=" + kind + ", path=" + path + "]";
+ return "CPE [kind=" + kind + ", isSystem=" + isSystem + ", path=" + path + ", outputFolder=" + outputFolder
+ + ", sourceContainerUrl=" + sourceContainerUrl + ", javadocContainerUrl=" + javadocContainerUrl
+ + "]";
}
+
}
public static boolean isSource(CPE e) {
diff --git a/vscode-extensions/vscode-spring-boot/package.json b/vscode-extensions/vscode-spring-boot/package.json
index 0e36fbbc5..4ac6b180c 100644
--- a/vscode-extensions/vscode-spring-boot/package.json
+++ b/vscode-extensions/vscode-spring-boot/package.json
@@ -69,12 +69,18 @@
"description": "Enable/Disable Spring running Boot application live hints decorators in Java source code"
},
"spring-boot.ls.java.home": {
- "type": ["string", null],
+ "type": [
+ "string",
+ null
+ ],
"default": null,
"description": "Override JAVA_HOME used for launching the spring-boot-language-server JVM process."
},
"spring-boot.ls.java.heap": {
- "type": ["string", null],
+ "type": [
+ "string",
+ null
+ ],
"default": null,
"description": "Max JVM heap value, passed via -Xmx argument when launching spring-boot-language-server JVM process."
}
diff --git a/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh b/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh
index 7e1e832b3..1660292ab 100755
--- a/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh
+++ b/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh
@@ -17,7 +17,7 @@ mkdir -p ${workdir}/jars
# Use maven to build jdt ls extension
cd ../../headless-services/jdt-ls-extension
-../mvnw clean package
+../mvnw clean integration-test
cp org.springframework.tooling.jdt.ls.extension/target/*.jar ${workdir}/jars/jdt-ls-extension.jar
cp org.springframework.tooling.jdt.ls.commons/target/*.jar ${workdir}/jars/jdt-ls-commons.jar