Skip to content

Commit aa1d8f9

Browse files
Siedlerchrkoppor
andauthored
Fix lsp4j modules (#13835)
* fix git modules requires and uses * Fix module name of lsp4j and use maven download instead of jitpack Fixes #13702 * Fix linting issues * Remove empty line --------- Co-authored-by: Oliver Kopp <[email protected]>
1 parent ccad1c3 commit aa1d8f9

File tree

5 files changed

+17
-29
lines changed

5 files changed

+17
-29
lines changed

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -293,52 +293,38 @@ extraJavaModuleInfo {
293293
module("com.github.javaparser:javaparser-symbol-solver-core", "com.github.javaparser.symbolsolver.core")
294294
module("net.sf.jopt-simple:jopt-simple", "jopt.simple")
295295

296-
// "com.github.eclipse:org.eclipse.lsp4j", "lsp4j"
297-
// - The name 'org.eclipse.lsp4j' is different than the name derived from the Jar file name 'lsp4j'; turn off 'failOnModifiedDerivedModuleNames' or explicitly allow override via 'overrideModuleName()'
298-
// - Not a module and no mapping defined: lsp4j-0.24.0.jar
299-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j", "lsp4j") {
300-
overrideModuleName()
296+
module("org.eclipse.lsp4j:org.eclipse.lsp4j", "org.eclipse.lsp4j") {
301297
exportAllPackages()
302298
requireAllDefinedDependencies()
303-
// Note the missing "lsp4j" at the group
304-
mergeJar("com.github.eclipse:lsp4j")
305299
requires("com.google.gson")
306-
307300
}
308-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j.debug", "lsp4j.debug") {
309-
overrideModuleName()
301+
module("org.eclipse.lsp4j:org.eclipse.lsp4j.debug", "org.eclipse.lsp4j.debug") {
310302
exportAllPackages()
311303
}
312-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j.generator", "lsp4j.generator") {
313-
overrideModuleName()
304+
module("org.eclipse.lsp4j:org.eclipse.lsp4j.generator", "org.eclipse.lsp4j.generator") {
314305
exportAllPackages()
315306
}
316-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc", "lsp4j.jsonrpc") {
317-
overrideModuleName()
307+
module("org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc", "org.eclipse.lsp4j.jsonrpc") {
318308
exportAllPackages()
319309
requires("com.google.gson")
320310
requires("java.logging")
321311
}
322-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc.debug", "lsp4j.jsonrpc.debug") {
323-
overrideModuleName()
312+
module("org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc.debug", "org.eclipse.lsp4j.jsonrpc.debug") {
324313
exportAllPackages()
325314
}
326-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j.websocket", "lsp4j.websocket") {
327-
overrideModuleName()
315+
module("org.eclipse.lsp4j:org.eclipse.lsp4j.websocket", "org.eclipse.lsp4j.websocket") {
328316
exportAllPackages()
329317
requireAllDefinedDependencies()
330318
}
331-
module("com.github.eclipse.lsp4j:org.eclipse.lsp4j.websocket.jakarta", "lsp4j.websocket.jakarta") {
332-
overrideModuleName()
319+
module("org.eclipse.lsp4j:org.eclipse.lsp4j.websocket.jakarta", "org.eclipse.lsp4j.websocket.jakarta") {
333320
exportAllPackages()
334321
requireAllDefinedDependencies()
335322
}
336323
module("jakarta.websocket:jakarta.websocket-api", "jakarta.websocket") {
337324
overrideModuleName()
338325
exportAllPackages()
339326
}
340-
module("javax.websocket:javax.websocket-api", "javax.websocket") {
341-
overrideModuleName()
327+
module("javax.websocket:javax.websocket-api", "javax.websocket.api") {
342328
exportAllPackages()
343329
}
344330
module("org.eclipse.xtend:org.eclipse.xtend", "xtend") {

jabls/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ dependencies {
1111
implementation("org.slf4j:slf4j-api")
1212

1313
// LSP4J for LSP Server
14-
implementation("com.github.eclipse:lsp4j")
14+
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j")
15+
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j.websocket")
1516

1617
// route all requests to java.util.logging to SLF4J (which in turn routes to tinylog)
1718
testImplementation("org.slf4j:jul-to-slf4j")
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module org.jabref.jabls {
22
exports org.jabref.languageserver;
3-
opens org.jabref.languageserver to lsp4j, lsp4j.jsonrpc, com.google.gson;
3+
opens org.jabref.languageserver to org.eclipse.lsp4j, org.eclipse.lsp4j.jsonrpc, com.google.gson;
44
exports org.jabref.languageserver.controller;
55
exports org.jabref.languageserver.util;
66

77
requires org.jabref.jablib;
88

99
requires org.slf4j;
1010

11-
requires lsp4j;
12-
requires lsp4j.jsonrpc;
13-
requires lsp4j.websocket;
11+
requires org.eclipse.lsp4j;
12+
requires org.eclipse.lsp4j.jsonrpc;
13+
requires org.eclipse.lsp4j.websocket;
1414
requires com.google.gson;
1515
}

jabsrv/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies {
3737
implementation("org.hibernate.validator:hibernate-validator")
3838

3939
// LSP4J for LSP Server
40-
implementation("com.github.eclipse:lsp4j")
40+
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j")
4141

4242
implementation("com.konghq:unirest-modules-gson")
4343

versions/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ dependencies.constraints {
3838
api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.19.2")
3939
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0")
4040
api("com.fasterxml:aalto-xml:1.3.3")
41-
api("com.github.eclipse:lsp4j:0.24.0")
41+
api("org.eclipse.lsp4j:org.eclipse.lsp4j:0.24.0")
42+
api("org.eclipse.lsp4j:org.eclipse.lsp4j.websocket:0.24.0")
4243
api("com.github.javakeyring:java-keyring:1.0.4")
4344
api("com.github.javaparser:javaparser-symbol-solver-core:3.27.0")
4445
api("com.github.jknack:handlebars-helpers:4.3.1") // Required by Wiremock - and our patching of Wiremock

0 commit comments

Comments
 (0)