Skip to content

Commit df9fbcd

Browse files
committed
New LS JAR layout for vscode and eclipse extensions
1 parent 32c8a86 commit df9fbcd

File tree

21 files changed

+345
-99
lines changed

21 files changed

+345
-99
lines changed

eclipse-language-servers/org.springframework.tooling.boot.ls/pom.xml

+75-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
<artifactId>maven-dependency-plugin</artifactId>
2323
<version>3.1.1</version>
2424
<executions>
25+
2526
<execution>
26-
<id>unpack-server</id>
27+
<id>copy-server</id>
2728
<phase>prepare-package</phase>
2829
<goals>
29-
<goal>unpack</goal>
30+
<goal>copy</goal>
3031
</goals>
3132
<configuration>
3233
<artifactItems>
@@ -40,9 +41,29 @@
4041
</artifactItems>
4142
<overWriteReleases>true</overWriteReleases>
4243
<overWriteSnapshots>true</overWriteSnapshots>
43-
<outputDirectory>${project.build.directory}/../servers/spring-boot-language-server</outputDirectory>
44+
<outputDirectory>${project.basedir}/servers</outputDirectory>
45+
</configuration>
46+
</execution>
47+
48+
<execution>
49+
<id>problem-types.json</id>
50+
<phase>prepare-package</phase>
51+
<goals>
52+
<goal>unpack</goal>
53+
</goals>
54+
<configuration>
55+
<artifactItems>
56+
<artifactItem>
57+
<groupId>org.springframework.ide.vscode</groupId>
58+
<artifactId>spring-boot-language-server</artifactId>
59+
<version>${project.version}</version>
60+
<outputDirectory>${project.basedir}/servers/spring-boot-language-server</outputDirectory>
61+
<includes>**/problem-types.json</includes>
62+
</artifactItem>
63+
</artifactItems>
4464
</configuration>
4565
</execution>
66+
4667
<execution>
4768
<id>xml-extension</id>
4869
<phase>prepare-package</phase>
@@ -67,7 +88,57 @@
6788
<stripVersion>true</stripVersion>
6889
<overWriteReleases>true</overWriteReleases>
6990
<overWriteSnapshots>true</overWriteSnapshots>
70-
<outputDirectory>${project.build.directory}/../jars</outputDirectory>
91+
<outputDirectory>${project.basedir}/jars</outputDirectory>
92+
</configuration>
93+
</execution>
94+
</executions>
95+
</plugin>
96+
97+
<plugin>
98+
<groupId>org.codehaus.mojo</groupId>
99+
<artifactId>exec-maven-plugin</artifactId>
100+
<version>3.3.0</version>
101+
<executions>
102+
<execution>
103+
<id>extract</id>
104+
<phase>prepare-package</phase>
105+
<configuration>
106+
<executable>java</executable>
107+
<arguments>
108+
<argument>-Djarmode=tools</argument>
109+
<argument>-jar</argument>
110+
<argument>${project.basedir}/servers/spring-boot-language-server-${project.version}-exec.jar</argument>
111+
<argument>extract</argument>
112+
<argument>--force</argument>
113+
<argument>--destination</argument>
114+
<argument>${project.basedir}/servers/spring-boot-language-server</argument>
115+
</arguments>
116+
</configuration>
117+
<goals>
118+
<goal>exec</goal>
119+
</goals>
120+
</execution>
121+
</executions>
122+
</plugin>
123+
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-antrun-plugin</artifactId>
127+
<version>3.1.0</version>
128+
<executions>
129+
<execution>
130+
<phase>prepare-package</phase>
131+
<goals>
132+
<goal>run</goal>
133+
</goals>
134+
<configuration>
135+
<target>
136+
<delete>
137+
<fileset
138+
dir="${project.basedir}/servers"
139+
includes="spring-boot-language-server-${project.version}-exec.jar" />
140+
</delete>
141+
</target>
71142
</configuration>
72143
</execution>
73144
</executions>

eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServer.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2017, 2021 Pivotal, Inc.
2+
* Copyright (c) 2017, 2024 Pivotal, Inc.
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
@@ -28,10 +28,9 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
2828
public SpringBootLanguageServer() {
2929
super(SPRING_BOOT_SERVER);
3030

31-
initExplodedJarCommand(
31+
initExecutableJarCommand(
3232
Paths.get("servers", "spring-boot-language-server"),
33-
"org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp",
34-
"application.properties",
33+
"spring-boot-language-server",
3534
getJVMArgs()
3635
);
3736

eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/prefs/LanguageServerProblemTypesMetadata.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020, 2022 Pivotal, Inc.
2+
* Copyright (c) 2020, 2024 Pivotal, Inc.
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
@@ -27,7 +27,7 @@ public class LanguageServerProblemTypesMetadata {
2727

2828
public static List<ProblemCategoryData> load() throws IOException {
2929
File root = FileLocator.getBundleFile(BootLanguageServerPlugin.getDefault().getBundle());
30-
File metadataFile = root.toPath().resolve("servers/spring-boot-language-server/BOOT-INF/classes/problem-types.json").toFile();
30+
File metadataFile = root.toPath().resolve("servers/spring-boot-language-server/problem-types.json").toFile();
3131
return readCategoriesFromFile(metadataFile);
3232
}
3333

eclipse-language-servers/org.springframework.tooling.bosh.ls/pom.xml

+53-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
<version>3.1.1</version>
2525
<executions>
2626
<execution>
27-
<id>unpack-server</id>
27+
<id>copy-server</id>
2828
<phase>prepare-package</phase>
2929
<goals>
30-
<goal>unpack</goal>
30+
<goal>copy</goal>
3131
</goals>
3232
<configuration>
3333
<artifactItems>
@@ -41,7 +41,7 @@
4141
</artifactItems>
4242
<overWriteReleases>true</overWriteReleases>
4343
<overWriteSnapshots>true</overWriteSnapshots>
44-
<outputDirectory>${project.build.directory}/../servers/bosh-language-server</outputDirectory>
44+
<outputDirectory>${project.basedir}/servers</outputDirectory>
4545
</configuration>
4646
</execution>
4747

@@ -68,6 +68,56 @@
6868
</executions>
6969
</plugin>
7070

71+
<plugin>
72+
<groupId>org.codehaus.mojo</groupId>
73+
<artifactId>exec-maven-plugin</artifactId>
74+
<version>3.3.0</version>
75+
<executions>
76+
<execution>
77+
<id>extract</id>
78+
<phase>prepare-package</phase>
79+
<configuration>
80+
<executable>java</executable>
81+
<arguments>
82+
<argument>-Djarmode=tools</argument>
83+
<argument>-jar</argument>
84+
<argument>${project.basedir}/servers/bosh-language-server-${project.version}-exec.jar</argument>
85+
<argument>extract</argument>
86+
<argument>--force</argument>
87+
<argument>--destination</argument>
88+
<argument>${project.basedir}/servers/bosh-language-server</argument>
89+
</arguments>
90+
</configuration>
91+
<goals>
92+
<goal>exec</goal>
93+
</goals>
94+
</execution>
95+
</executions>
96+
</plugin>
97+
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-antrun-plugin</artifactId>
101+
<version>3.1.0</version>
102+
<executions>
103+
<execution>
104+
<phase>prepare-package</phase>
105+
<goals>
106+
<goal>run</goal>
107+
</goals>
108+
<configuration>
109+
<target>
110+
<delete>
111+
<fileset
112+
dir="${project.basedir}/servers"
113+
includes="bosh-language-server-${project.version}-exec.jar" />
114+
</delete>
115+
</target>
116+
</configuration>
117+
</execution>
118+
</executions>
119+
</plugin>
120+
71121
<plugin>
72122
<artifactId>maven-clean-plugin</artifactId>
73123
<version>3.1.0</version>

eclipse-language-servers/org.springframework.tooling.bosh.ls/src/org/springframework/tooling/bosh/ls/BoshLanguageServer.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2016, 2019 Pivotal, Inc.
2+
* Copyright (c) 2016, 2024 Pivotal, Inc.
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
@@ -25,16 +25,15 @@ public class BoshLanguageServer extends STS4LanguageServerProcessStreamConnector
2525
public BoshLanguageServer() {
2626
super(BOSH_SERVER);
2727

28-
initExplodedJarCommand(
28+
initExecutableJarCommand(
2929
Paths.get("servers", "bosh-language-server"),
30-
"org.springframework.ide.vscode.bosh.BoshLanguageServerBootApp",
31-
"application.properties",
30+
"bosh-language-server",
3231
Arrays.asList(
3332
"-Dlsp.lazy.completions.disable=true",
3433
"-XX:TieredStopAtLevel=1"
3534
)
3635
);
37-
36+
3837
setWorkingDirectory(getWorkingDirLocation());
3938
}
4039

eclipse-language-servers/org.springframework.tooling.cloudfoundry.manifest.ls/pom.xml

+53-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
<version>3.1.1</version>
2525
<executions>
2626
<execution>
27-
<id>unpack-server</id>
27+
<id>copy-server</id>
2828
<phase>prepare-package</phase>
2929
<goals>
30-
<goal>unpack</goal>
30+
<goal>copy</goal>
3131
</goals>
3232
<configuration>
3333
<artifactItems>
@@ -41,7 +41,7 @@
4141
</artifactItems>
4242
<overWriteReleases>true</overWriteReleases>
4343
<overWriteSnapshots>true</overWriteSnapshots>
44-
<outputDirectory>${project.build.directory}/../servers/manifest-yaml-language-server</outputDirectory>
44+
<outputDirectory>${project.basedir}/servers</outputDirectory>
4545
</configuration>
4646
</execution>
4747

@@ -68,6 +68,56 @@
6868
</executions>
6969
</plugin>
7070

71+
<plugin>
72+
<groupId>org.codehaus.mojo</groupId>
73+
<artifactId>exec-maven-plugin</artifactId>
74+
<version>3.3.0</version>
75+
<executions>
76+
<execution>
77+
<id>extract</id>
78+
<phase>prepare-package</phase>
79+
<configuration>
80+
<executable>java</executable>
81+
<arguments>
82+
<argument>-Djarmode=tools</argument>
83+
<argument>-jar</argument>
84+
<argument>${project.basedir}/servers/manifest-yaml-language-server-${project.version}-exec.jar</argument>
85+
<argument>extract</argument>
86+
<argument>--force</argument>
87+
<argument>--destination</argument>
88+
<argument>${project.basedir}/servers/manifest-yaml-language-server</argument>
89+
</arguments>
90+
</configuration>
91+
<goals>
92+
<goal>exec</goal>
93+
</goals>
94+
</execution>
95+
</executions>
96+
</plugin>
97+
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-antrun-plugin</artifactId>
101+
<version>3.1.0</version>
102+
<executions>
103+
<execution>
104+
<phase>prepare-package</phase>
105+
<goals>
106+
<goal>run</goal>
107+
</goals>
108+
<configuration>
109+
<target>
110+
<delete>
111+
<fileset
112+
dir="${project.basedir}/servers"
113+
includes="manifest-yaml-language-server-${project.version}-exec.jar" />
114+
</delete>
115+
</target>
116+
</configuration>
117+
</execution>
118+
</executions>
119+
</plugin>
120+
71121
<plugin>
72122
<artifactId>maven-clean-plugin</artifactId>
73123
<version>3.1.0</version>

eclipse-language-servers/org.springframework.tooling.cloudfoundry.manifest.ls/src/org/springframework/tooling/cloudfoundry/manifest/ls/CloudFoundryManifestLanguageServer.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2016, 2020 Pivotal, Inc.
2+
* Copyright (c) 2016, 2024 Pivotal, Inc.
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
@@ -41,16 +41,15 @@ public class CloudFoundryManifestLanguageServer extends STS4LanguageServerProces
4141
public CloudFoundryManifestLanguageServer() {
4242
super(CLOUDFOUNDRY_SERVER);
4343

44-
initExplodedJarCommand(
44+
initExecutableJarCommand(
4545
Paths.get("servers", "manifest-yaml-language-server"),
46-
"org.springframework.ide.vscode.manifest.yaml.ManifestYamlLanguageServerBootApp",
47-
"application.properties",
46+
"manifest-yaml-language-server",
4847
Arrays.asList(
4948
"-Dlsp.lazy.completions.disable=true",
5049
"-XX:TieredStopAtLevel=1"
5150
)
5251
);
53-
52+
5453
setWorkingDirectory(getWorkingDirLocation());
5554
}
5655

0 commit comments

Comments
 (0)