New LS JAR layout for vscode and eclipse extensions
This commit is contained in:
@@ -22,11 +22,12 @@
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>unpack-server</id>
|
||||
<id>copy-server</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
@@ -40,9 +41,29 @@
|
||||
</artifactItems>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../servers/spring-boot-language-server</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/servers</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>problem-types.json</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.springframework.ide.vscode</groupId>
|
||||
<artifactId>spring-boot-language-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<outputDirectory>${project.basedir}/servers/spring-boot-language-server</outputDirectory>
|
||||
<includes>**/problem-types.json</includes>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>xml-extension</id>
|
||||
<phase>prepare-package</phase>
|
||||
@@ -67,7 +88,57 @@
|
||||
<stripVersion>true</stripVersion>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../jars</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/jars</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract</id>
|
||||
<phase>prepare-package</phase>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-Djarmode=tools</argument>
|
||||
<argument>-jar</argument>
|
||||
<argument>${project.basedir}/servers/spring-boot-language-server-${project.version}-exec.jar</argument>
|
||||
<argument>extract</argument>
|
||||
<argument>--force</argument>
|
||||
<argument>--destination</argument>
|
||||
<argument>${project.basedir}/servers/spring-boot-language-server</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete>
|
||||
<fileset
|
||||
dir="${project.basedir}/servers"
|
||||
includes="spring-boot-language-server-${project.version}-exec.jar" />
|
||||
</delete>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017, 2021 Pivotal, Inc.
|
||||
* Copyright (c) 2017, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -28,10 +28,9 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
|
||||
public SpringBootLanguageServer() {
|
||||
super(SPRING_BOOT_SERVER);
|
||||
|
||||
initExplodedJarCommand(
|
||||
initExecutableJarCommand(
|
||||
Paths.get("servers", "spring-boot-language-server"),
|
||||
"org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp",
|
||||
"application.properties",
|
||||
"spring-boot-language-server",
|
||||
getJVMArgs()
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2020, 2022 Pivotal, Inc.
|
||||
* Copyright (c) 2020, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -27,7 +27,7 @@ public class LanguageServerProblemTypesMetadata {
|
||||
|
||||
public static List<ProblemCategoryData> load() throws IOException {
|
||||
File root = FileLocator.getBundleFile(BootLanguageServerPlugin.getDefault().getBundle());
|
||||
File metadataFile = root.toPath().resolve("servers/spring-boot-language-server/BOOT-INF/classes/problem-types.json").toFile();
|
||||
File metadataFile = root.toPath().resolve("servers/spring-boot-language-server/problem-types.json").toFile();
|
||||
return readCategoriesFromFile(metadataFile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user