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..9830aedd6 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.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;
+ }
}
diff --git a/com.microsoft.java.debug.repository/category.xml b/com.microsoft.java.debug.repository/category.xml
index c906b355d..288280d00 100644
--- a/com.microsoft.java.debug.repository/category.xml
+++ b/com.microsoft.java.debug.repository/category.xml
@@ -1,7 +1,7 @@
-
-
+
+
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