Debug changes for broken build

This commit is contained in:
BoykoAlex
2018-11-07 19:04:03 -05:00
parent 94bc7f8a3e
commit 176b0b439d
2 changed files with 11 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
package org.springframework.ide.vscode.commons.java;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -60,11 +61,17 @@ public class BootProjectUtil {
System.out.println("Trying java-home " + home);
Path sources = home.resolve("src.zip");
System.out.println("Trying sources: " + sources);
try {
Files.list(sources).forEach(p -> System.out.println("entry=" + p + " exists=" + Files.exists(p)));
} catch (IOException e) {
e.printStackTrace();
}
if (Files.exists(sources)) {
System.out.println("Found " + sources);
return sources;
}
sources = home.resolve("lib/src.zip");
System.out.println("Trying sources: " + sources);
if (Files.exists(sources)) {
System.out.println("Found " + sources);
return sources;

View File

@@ -87,11 +87,11 @@ public class MavenProjectClasspath implements IClasspath {
if (javaVersion == null) {
javaVersion = "8";
}
try {
// try {
cpe.setSourceContainerUrl(BootProjectUtil.jreSources(path).toUri().toURL());
} catch (Throwable t) {
t.printStackTrace();
}
// } catch (Throwable t) {
// t.printStackTrace();
// }
cpe.setJavadocContainerUrl(new URL("https://docs.oracle.com/javase/" + javaVersion + "/docs/api/"));
cpe.setSystem(true);
entries.add(cpe);