From f3561e2aadcb901023c8b257d7afaa2fa886c293 Mon Sep 17 00:00:00 2001 From: Yan Zhang Date: Fri, 31 Aug 2018 13:29:52 +0800 Subject: [PATCH 1/4] Fix: correctly return contructed envrionment variables. (#214) --- .../java/debug/core/adapter/handler/LaunchRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java b/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java index 3a5905192..9334c664a 100644 --- a/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java +++ b/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java @@ -164,7 +164,7 @@ protected static String[] constructEnvironmentVariables(LaunchArguments launchAr envVars[i++] = entry.getKey() + "=" + entry.getValue(); } } - return null; + return envVars; } /** From d1a60b00aedaa55e2d856767624742d784d37e99 Mon Sep 17 00:00:00 2001 From: Yan Zhang Date: Fri, 31 Aug 2018 15:08:16 +0800 Subject: [PATCH 2/4] Bump version to 0.12.1 (#215) --- com.microsoft.java.debug.core/pom.xml | 2 +- com.microsoft.java.debug.plugin/.classpath | 2 +- com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF | 4 ++-- com.microsoft.java.debug.plugin/pom.xml | 6 +++--- com.microsoft.java.debug.repository/category.xml | 4 ++-- com.microsoft.java.debug.repository/pom.xml | 4 ++-- pom.xml | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/com.microsoft.java.debug.core/pom.xml b/com.microsoft.java.debug.core/pom.xml index 5d11456a5..2bc85b9fe 100644 --- a/com.microsoft.java.debug.core/pom.xml +++ b/com.microsoft.java.debug.core/pom.xml @@ -5,7 +5,7 @@ com.microsoft.java java-debug-parent - 0.12.0 + 0.12.1 com.microsoft.java.debug.core jar diff --git a/com.microsoft.java.debug.plugin/.classpath b/com.microsoft.java.debug.plugin/.classpath index e5edef8fd..27def1e0c 100644 --- a/com.microsoft.java.debug.plugin/.classpath +++ b/com.microsoft.java.debug.plugin/.classpath @@ -6,6 +6,6 @@ - + diff --git a/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF b/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF index baaa96028..cc829ee84 100644 --- a/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF +++ b/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Java Debug Server Plugin Bundle-SymbolicName: com.microsoft.java.debug.plugin;singleton:=true -Bundle-Version: 0.12.0 +Bundle-Version: 0.12.1 Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-Activator: com.microsoft.java.debug.plugin.internal.JavaDebuggerServerPlugin @@ -23,4 +23,4 @@ Bundle-ClassPath: lib/commons-io-2.5.jar, ., lib/rxjava-2.1.1.jar, lib/reactive-streams-1.0.0.jar, - lib/com.microsoft.java.debug.core-0.12.0.jar + lib/com.microsoft.java.debug.core-0.12.1.jar diff --git a/com.microsoft.java.debug.plugin/pom.xml b/com.microsoft.java.debug.plugin/pom.xml index fb18ee7c7..421726952 100644 --- a/com.microsoft.java.debug.plugin/pom.xml +++ b/com.microsoft.java.debug.plugin/pom.xml @@ -5,7 +5,7 @@ com.microsoft.java java-debug-parent - 0.12.0 + 0.12.1 com.microsoft.java.debug.plugin eclipse-plugin @@ -45,11 +45,11 @@ com.microsoft.java com.microsoft.java.debug.core - 0.12.0 + 0.12.1 - \ No newline at end of file + diff --git a/com.microsoft.java.debug.repository/category.xml b/com.microsoft.java.debug.repository/category.xml index d121c7515..c906b355d 100644 --- a/com.microsoft.java.debug.repository/category.xml +++ b/com.microsoft.java.debug.repository/category.xml @@ -1,7 +1,7 @@ - + - \ No newline at end of file + diff --git a/com.microsoft.java.debug.repository/pom.xml b/com.microsoft.java.debug.repository/pom.xml index 6c86970f4..ca7aa6e2b 100644 --- a/com.microsoft.java.debug.repository/pom.xml +++ b/com.microsoft.java.debug.repository/pom.xml @@ -4,7 +4,7 @@ com.microsoft.java java-debug-parent - 0.12.0 + 0.12.1 com.microsoft.java.debug.repository eclipse-repository @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/pom.xml b/pom.xml index 1786d9007..3f3ec9f9b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ${base.name} :: Parent The Java Debug Server is an implementation of Visual Studio Code (VSCode) Debug Protocol. It can be used in Visual Studio Code to debug Java programs. https://github.com/Microsoft/java-debug - 0.12.0 + 0.12.1 pom Java Debug Server for Visual Studio Code @@ -172,4 +172,4 @@ http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.0-2018-05-16_00-46-30-H11 - \ No newline at end of file + From 81a3b3bc05097e0f2f38f8e37d6da531323d4fc0 Mon Sep 17 00:00:00 2001 From: "Andy Xu(devdiv)" Date: Thu, 6 Sep 2018 10:08:52 +0800 Subject: [PATCH 3/4] Fix issue #402 missing runtime scope classpath entry (#219) * fix issue #402 missing runtime scope classpath entry, eg: maven.pomderived=true test=true maven.groupId=org.yaml maven.artifactId=snakeyaml maven.version=1.19 maven.scope=runtime --- .../internal/ResolveClasspathsHandler.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveClasspathsHandler.java b/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveClasspathsHandler.java index 04fca2ec4..a1cd757e6 100644 --- a/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveClasspathsHandler.java +++ b/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveClasspathsHandler.java @@ -20,6 +20,8 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.jdt.core.IClasspathAttribute; +import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.search.IJavaSearchConstants; @@ -36,6 +38,7 @@ public class ResolveClasspathsHandler { private static final Logger logger = Logger.getLogger(Configuration.LOGGER_NAME); + private static final String SCOPE_ATTRIBUTE = "maven.scope"; /** * Resolves class path for a java project. @@ -178,10 +181,10 @@ private static String[] computeDefaultRuntimeClassPath(IJavaProject jproject) th for (int i = 0; i < unresolved.length; i++) { IRuntimeClasspathEntry entry = unresolved[i]; if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { - IRuntimeClasspathEntry[] entries = JavaRuntime.resolveRuntimeClasspathEntry(entry, jproject); + IRuntimeClasspathEntry[] entries = JavaRuntime.resolveRuntimeClasspathEntry(entry, jproject, true); for (int j = 0; j < entries.length; j++) { - if (entries[j].getClasspathEntry().isTest()) { + if (entries[j].getClasspathEntry().isTest() && !isRuntime(entries[j].getClasspathEntry())) { continue; } String location = entries[j].getLocation(); @@ -193,4 +196,13 @@ private static String[] computeDefaultRuntimeClassPath(IJavaProject jproject) th } return resolved.toArray(new String[resolved.size()]); } + + private static boolean isRuntime(final IClasspathEntry classpathEntry) { + for (IClasspathAttribute attribute : classpathEntry.getExtraAttributes()) { + if (SCOPE_ATTRIBUTE.equals(attribute.getName()) && "runtime".equals(attribute.getValue())) { + return true; + } + } + return false; + } } From 2a41b810901cd2cd4eef6e6a15fbac5e77b248ab Mon Sep 17 00:00:00 2001 From: "Andy Xu(devdiv)" Date: Thu, 6 Sep 2018 10:23:15 +0800 Subject: [PATCH 4/4] Bump version to 0.12.2 (#220) --- com.microsoft.java.debug.core/pom.xml | 2 +- com.microsoft.java.debug.plugin/.classpath | 2 +- com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF | 4 ++-- com.microsoft.java.debug.plugin/pom.xml | 4 ++-- com.microsoft.java.debug.repository/category.xml | 2 +- com.microsoft.java.debug.repository/pom.xml | 2 +- pom.xml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/com.microsoft.java.debug.core/pom.xml b/com.microsoft.java.debug.core/pom.xml index 2bc85b9fe..0814aa550 100644 --- a/com.microsoft.java.debug.core/pom.xml +++ b/com.microsoft.java.debug.core/pom.xml @@ -5,7 +5,7 @@ com.microsoft.java java-debug-parent - 0.12.1 + 0.12.2 com.microsoft.java.debug.core jar diff --git a/com.microsoft.java.debug.plugin/.classpath b/com.microsoft.java.debug.plugin/.classpath index 27def1e0c..569f730b6 100644 --- a/com.microsoft.java.debug.plugin/.classpath +++ b/com.microsoft.java.debug.plugin/.classpath @@ -6,6 +6,6 @@ - + diff --git a/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF b/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF index cc829ee84..da487b9cf 100644 --- a/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF +++ b/com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Java Debug Server Plugin Bundle-SymbolicName: com.microsoft.java.debug.plugin;singleton:=true -Bundle-Version: 0.12.1 +Bundle-Version: 0.12.2 Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-Activator: com.microsoft.java.debug.plugin.internal.JavaDebuggerServerPlugin @@ -23,4 +23,4 @@ Bundle-ClassPath: lib/commons-io-2.5.jar, ., lib/rxjava-2.1.1.jar, lib/reactive-streams-1.0.0.jar, - lib/com.microsoft.java.debug.core-0.12.1.jar + lib/com.microsoft.java.debug.core-0.12.2.jar diff --git a/com.microsoft.java.debug.plugin/pom.xml b/com.microsoft.java.debug.plugin/pom.xml index 421726952..4e3fc3168 100644 --- a/com.microsoft.java.debug.plugin/pom.xml +++ b/com.microsoft.java.debug.plugin/pom.xml @@ -5,7 +5,7 @@ com.microsoft.java java-debug-parent - 0.12.1 + 0.12.2 com.microsoft.java.debug.plugin eclipse-plugin @@ -45,7 +45,7 @@ com.microsoft.java com.microsoft.java.debug.core - 0.12.1 + 0.12.2 diff --git a/com.microsoft.java.debug.repository/category.xml b/com.microsoft.java.debug.repository/category.xml index c906b355d..a6a58ed67 100644 --- a/com.microsoft.java.debug.repository/category.xml +++ b/com.microsoft.java.debug.repository/category.xml @@ -1,6 +1,6 @@ - + diff --git a/com.microsoft.java.debug.repository/pom.xml b/com.microsoft.java.debug.repository/pom.xml index ca7aa6e2b..84af2fe28 100644 --- a/com.microsoft.java.debug.repository/pom.xml +++ b/com.microsoft.java.debug.repository/pom.xml @@ -4,7 +4,7 @@ com.microsoft.java java-debug-parent - 0.12.1 + 0.12.2 com.microsoft.java.debug.repository eclipse-repository diff --git a/pom.xml b/pom.xml index 3f3ec9f9b..81192487b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ${base.name} :: Parent The Java Debug Server is an implementation of Visual Studio Code (VSCode) Debug Protocol. It can be used in Visual Studio Code to debug Java programs. https://github.com/Microsoft/java-debug - 0.12.1 + 0.12.2 pom Java Debug Server for Visual Studio Code