Skip to content

Commit f652c8d

Browse files
Migrate to Java 11 (microsoft#393)
* Migrate to Java 11
1 parent 719eb8c commit f652c8d

File tree

8 files changed

+39
-30
lines changed

8 files changed

+39
-30
lines changed

com.microsoft.java.debug.core/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<attribute name="test" value="true"/>
1414
</attributes>
1515
</classpathentry>
16-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
16+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
1717
<attributes>
1818
<attribute name="maven.pomderived" value="true"/>
1919
</attributes>

com.microsoft.java.debug.core/pom.xml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<artifactId>maven-compiler-plugin</artifactId>
2929
<version>3.7.0</version>
3030
<configuration>
31-
<source>1.8</source>
32-
<target>1.8</target>
31+
<source>11</source>
32+
<target>11</target>
3333
</configuration>
3434
</plugin>
3535
<plugin>
@@ -78,21 +78,4 @@
7878
<scope>test</scope>
7979
</dependency>
8080
</dependencies>
81-
<profiles>
82-
<profile>
83-
<id>default-tools.jar</id>
84-
<activation>
85-
<jdk>(,9)</jdk>
86-
</activation>
87-
<dependencies>
88-
<dependency>
89-
<groupId>com.sun</groupId>
90-
<artifactId>tools</artifactId>
91-
<version>1.8</version>
92-
<scope>system</scope>
93-
<systemPath>${java.home}/../lib/tools.jar</systemPath>
94-
</dependency>
95-
</dependencies>
96-
</profile>
97-
</profiles>
9881
</project>

com.microsoft.java.debug.plugin/.classpath

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
<attribute name="limit-modules" value="java.base,java.logging,java.xml,jdk.jdi,java.compiler"/>
7+
</attributes>
8+
</classpathentry>
49
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
510
<classpathentry exported="true" kind="lib" path="lib/commons-io-2.10.0.jar"/>
611
<classpathentry kind="src" path="src/main/java"/>

com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
33
Bundle-Name: Java Debug Server Plugin
44
Bundle-SymbolicName: com.microsoft.java.debug.plugin;singleton:=true
55
Bundle-Version: 0.34.0
6-
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
6+
Bundle-RequiredExecutionEnvironment: JavaSE-11
77
Bundle-ActivationPolicy: lazy
88
Bundle-Activator: com.microsoft.java.debug.plugin.internal.JavaDebuggerServerPlugin
99
Bundle-Vendor: Microsoft

com.microsoft.java.debug.plugin/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@
1717
<artifactId>tycho-maven-plugin</artifactId>
1818
<version>${tycho-version}</version>
1919
<extensions>true</extensions>
20+
</plugin>
21+
<plugin>
22+
<groupId>org.eclipse.tycho</groupId>
23+
<artifactId>tycho-compiler-plugin</artifactId>
24+
<version>${tycho-version}</version>
25+
<configuration>
26+
<compilerArgs>
27+
<arg>--limit-modules</arg>
28+
<arg>java.base,java.logging,java.xml,jdk.jdi,java.compiler</arg>
29+
</compilerArgs>
30+
</configuration>
2031
</plugin>
2132
<plugin>
2233
<groupId>org.apache.maven.plugins</groupId>

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveMainMethodHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018-2020 Microsoft Corporation and others.
2+
* Copyright (c) 2018-2021 Microsoft Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@
2626
import org.eclipse.jdt.core.IJavaElement;
2727
import org.eclipse.jdt.core.IJavaProject;
2828
import org.eclipse.jdt.core.IMethod;
29+
import org.eclipse.jdt.core.IOpenable;
2930
import org.eclipse.jdt.core.ISourceRange;
3031
import org.eclipse.jdt.core.ISourceReference;
3132
import org.eclipse.jdt.core.IType;
@@ -167,7 +168,7 @@ private static MainMethod extractMainMethodInfo(ICompilationUnit typeRoot, IMeth
167168

168169
private static Range getRange(ICompilationUnit typeRoot, IJavaElement element) throws JavaModelException {
169170
ISourceRange r = ((ISourceReference) element).getNameRange();
170-
return JDTUtils.toRange(typeRoot, r.getOffset(), r.getLength());
171+
return JDTUtils.toRange((IOpenable) typeRoot, r.getOffset(), r.getLength());
171172
}
172173

173174
static class MainMethod {

java.debug.target

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,26 @@
66
<unit id="com.ibm.icu.base" version="58.2.0.v20170418-1837"/>
77
<unit id="org.apache.commons.io" version="2.2.0.v201405211200"/>
88
<unit id="org.apache.commons.lang3" version="3.1.0.v201403281430"/>
9-
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
109
<repository location="https://download.eclipse.org/tools/orbit/R-builds/R20170516192513/repository"/>
1110
</location>
11+
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
12+
<unit id="org.eclipse.equinox.core.feature.feature.group" version="0.0.0"/>
13+
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>
14+
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
15+
<unit id="org.eclipse.equinox.p2.core.feature.source.feature.group" version="0.0.0"/>
16+
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
17+
<unit id="org.eclipse.jdt.source.feature.group" version="0.0.0"/>
18+
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
19+
<repository location="https://download.eclipse.org/releases/2021-12/202112081000/"/>
20+
</location>
1221
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
1322
<unit id="org.eclipse.xtend.sdk.feature.group" version="0.0.0"/>
1423
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
15-
<repository location="https://download.eclipse.org/releases/2019-12/"/>
24+
<repository location="https://download.eclipse.org/releases/2021-09/202109151000/"/>
1625
</location>
1726
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
1827
<unit id="org.jboss.tools.maven.apt.core" version="0.0.0"/>
19-
<repository location="https://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.2-2018-12-24_15-46-05-H18/"/>
28+
<repository location="https://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.3-2019-11-08_11-04-22-H22/"/>
2029
</location>
2130
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
2231
<unit id="org.eclipse.jdt.ls.core" version="0.0.0"/>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@
154154
</profiles>
155155
<repositories>
156156
<repository>
157-
<id>201912</id>
157+
<id>202112</id>
158158
<layout>p2</layout>
159-
<url>https://download.eclipse.org/releases/2019-12/</url>
159+
<url>https://download.eclipse.org/releases/2021-12/202112081000/</url>
160160
</repository>
161161
<repository>
162162
<id>oss.sonatype.org</id>
@@ -173,7 +173,7 @@
173173
<repository>
174174
<id>JBOLL.TOOLS</id>
175175
<layout>p2</layout>
176-
<url>https://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.0-2018-05-16_00-46-30-H11</url>
176+
<url>https://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.3-2019-11-08_11-04-22-H22/</url>
177177
</repository>
178178
<repository>
179179
<id>orbit</id>

0 commit comments

Comments
 (0)