Skip to content

Commit 96e9d29

Browse files
Chore(deps): Bump org.glassfish.jersey.core:jersey-server from 3.1.11 to 4.0.0 in /versions (#14305)
* Chore(deps): Bump org.glassfish.jersey.core:jersey-server in /versions Bumps org.glassfish.jersey.core:jersey-server from 3.1.11 to 4.0.0. --- updated-dependencies: - dependency-name: org.glassfish.jersey.core:jersey-server dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * update gralde configs * add org.glassfish.jersey.test-framework:jersey-test-framework-core * fix module name * formatting * add jetty for wiremock * try with jetty 12 * try with jetty 12 * try with jetty 12 * try with jetty 12 * try with jetty 12 * try with wiremock beta * fix * try to fix modules * remove wiremock * readda test * remove comment * format * remove test, andd add jersey test * remove test, andd add jersey test --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Siedlerchr <[email protected]>
1 parent 30b581c commit 96e9d29

File tree

12 files changed

+33
-391
lines changed

12 files changed

+33
-391
lines changed

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

Lines changed: 5 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ jvmDependencyConflicts.patch {
4747
removeDependency("org.apache.xmlgraphics:batik-ext")
4848
removeDependency("org.apache.xmlgraphics:xmlgraphics-commons")
4949
}
50-
module("org.wiremock:wiremock") {
51-
// workaround for https://github.com/wiremock/wiremock/issues/2874
52-
addApiDependency("com.github.koppor:wiremock-slf4j-spi-shim")
53-
}
50+
5451
module("org.apache.logging.log4j:log4j-to-slf4j") {
5552
// remove non-module annotation libraries only used at compile time
5653
removeDependency("com.github.spotbugs:spotbugs-annotations")
@@ -65,19 +62,14 @@ jvmDependencyConflicts.patch {
6562
removeDependency("org.osgi:org.osgi.annotation.bundle")
6663
removeDependency("biz.aQute.bnd:biz.aQute.bnd.annotation")
6764
}
68-
module("org.wiremock:wiremock") {
69-
removeDependency("net.sf.jopt-simple:jopt-simple")
70-
}
65+
7166
module("org.testfx:testfx-core") {
7267
removeDependency("org.osgi:org.osgi.core")
7368
}
74-
module("org.glassfish.jersey.containers:jersey-container-servlet") {
75-
}
76-
module("org.glassfish.jersey.containers:jersey-container-servlet-core") {
77-
}
7869
module("org.xmlunit:xmlunit-legacy") {
7970
removeDependency("junit:junit")
8071
}
72+
8173
}
8274

8375
extraJavaModuleInfo {
@@ -94,6 +86,7 @@ extraJavaModuleInfo {
9486
requires("org.slf4j")
9587
}
9688
module("ai.djl.pytorch:pytorch-engine", "ai.djl.pytorch_engine") {
89+
exportAllPackages()
9790
exportAllPackages()
9891
requires("ai.djl.api")
9992
requires("org.slf4j")
@@ -290,7 +283,6 @@ extraJavaModuleInfo {
290283
requiresTransitive("org.testfx")
291284
}
292285

293-
module("commons-fileupload:commons-fileupload", "commons.fileupload")
294286

295287
module("org.xmlunit:xmlunit-core", "org.xmlunit") {
296288
exportAllPackages()
@@ -385,69 +377,7 @@ extraJavaModuleInfo {
385377
}
386378

387379
module("org.glassfish.hk2.external:aopalliance-repackaged", "org.aopalliance")
388-
module("org.glassfish.jersey.core:jersey-server", "jersey.server") {
389-
exportAllPackages()
390-
requireAllDefinedDependencies()
391-
requires("java.logging")
392-
requires("jakarta.xml.bind")
393-
requires("jersey.hk2")
394-
}
395-
// module("org.glassfish.jersey.containers:jersey-container-servlet", "jersey.servlet")
396-
module("org.glassfish.jersey.inject:jersey-hk2", "jersey.hk2") {
397-
exportAllPackages()
398-
requireAllDefinedDependencies()
399-
requires("java.logging")
400-
}
401-
module("org.glassfish.jersey.core:jersey-client", "jersey.client") {
402-
exportAllPackages()
403-
requireAllDefinedDependencies()
404-
requires("java.logging")
405-
}
406-
module("org.glassfish.jersey.core:jersey-common", "jersey.common") {
407-
exportAllPackages()
408-
requireAllDefinedDependencies()
409-
requires("java.logging")
410-
requires("java.xml")
411-
}
412-
module("org.glassfish.jersey.containers:jersey-container-grizzly2-http", "jersey.container.grizzly2.http") {
413-
exportAllPackages()
414-
requireAllDefinedDependencies()
415-
requires("java.logging")
416-
requires("org.glassfish.grizzly")
417-
requires("org.glassfish.grizzly.http")
418-
}
419-
module("org.glassfish.jersey.test-framework:jersey-test-framework-core", "jersey.test.framework.core") {
420-
exportAllPackages()
421-
requireAllDefinedDependencies()
422-
requires("java.logging")
423-
}
424-
module("org.glassfish.jersey.containers:jersey-container-grizzly2-servlet", "jersey.container.grizzly2.servlet") {
425-
// requires("jersey.servlet")
426-
}
427-
module("org.glassfish.jersey.containers:jersey-container-servlet", "jersey.container.servlet") {
428-
exportAllPackages()
429-
// requireAllDefinedDependencies()
430-
requires("jersey.container.servlet.core")
431-
requires("jakarta.servlet.api")
432-
}
433-
module("jakarta.servlet:jakarta.servlet-api", "jakarta.servlet.api") {
434-
patchRealModule()
435-
exportAllPackages()
436-
}
437-
module("org.glassfish.jersey.containers:jersey-container-servlet-core", "jersey.container.servlet.core") {
438-
exportAllPackages()
439-
requires("jakarta.servlet.api")
440-
}
441-
module("org.glassfish.jersey.media:jersey-media-jaxb", "jersey.media.jaxb") {
442-
requireAllDefinedDependencies()
443-
requires("java.logging")
444-
requires("java.xml")
445-
requires("jakarta.xml.bind")
446-
}
447-
module("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2", "jersey.test.framework.provider.grizzly2") {
448-
requireAllDefinedDependencies()
449-
requires("java.logging")
450-
}
380+
451381
module("org.glassfish.hk2:hk2-locator", "org.glassfish.hk2.locator") {
452382
exportAllPackages()
453383
requireAllDefinedDependencies()
@@ -605,50 +535,6 @@ extraJavaModuleInfo {
605535
requires("java.prefs")
606536
}
607537

608-
// Workaround for https://github.com/wiremock/wiremock/issues/2149
609-
module("org.wiremock:wiremock", "wiremock") {
610-
exportAllPackages()
611-
612-
requires("org.apache.httpcomponents.client5.httpclient5")
613-
requires("com.fasterxml.jackson.core")
614-
requires("com.fasterxml.jackson.databind")
615-
requires("com.fasterxml.jackson.datatype.jsr310")
616-
requires("com.google.common")
617-
requires("commons.fileupload")
618-
requires("java.xml")
619-
requires("json.path")
620-
requires("org.custommonkey.xmlunit")
621-
requires("org.eclipse.jetty.server")
622-
requires("org.eclipse.jetty.servlet")
623-
requires("org.eclipse.jetty.servlets")
624-
requires("org.eclipse.jetty.webapp")
625-
requires("org.eclipse.jetty.proxy")
626-
requires("org.eclipse.jetty.http2.server")
627-
requires("org.eclipse.jetty.alpn.server")
628-
requires("org.eclipse.jetty.alpn.java.server")
629-
requires("org.eclipse.jetty.alpn.java.client")
630-
requires("org.eclipse.jetty.alpn.client")
631-
requires("org.slf4j")
632-
requires("org.xmlunit")
633-
requires("wiremock.slf4j.spi.shim")
634-
635-
uses("com.github.tomakehurst.wiremock.extension.Extension")
636-
637-
// workaround for https://github.com/wiremock/wiremock/issues/2874
638-
mergeJar("com.github.jknack:handlebars")
639-
mergeJar("com.github.jknack:handlebars-helpers")
640-
641-
// Required to provide package "wiremock.org.slf4j.helpers"
642-
mergeJar("com.github.koppor:wiremock-slf4j-shim")
643-
}
644-
module("com.github.koppor:wiremock-slf4j-shim", "wiremock.slf4j.shim") {
645-
patchRealModule()
646-
exportAllPackages()
647-
}
648-
module("com.github.koppor:wiremock-slf4j-spi-shim", "wiremock.slf4j.spi.shim") {
649-
patchRealModule()
650-
exportAllPackages()
651-
}
652538
module("org.objenesis:objenesis", "org.objenesis") {
653539
exportAllPackages()
654540
requireAllDefinedDependencies()

jabgui/build.gradle.kts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,13 @@ dependencies {
116116

117117
testImplementation("org.hamcrest:hamcrest")
118118

119-
testImplementation("org.wiremock:wiremock") {
120-
exclude(group = "net.sf.jopt-simple", module = "jopt-simple")
121-
}
122-
123119
testImplementation("com.github.javaparser:javaparser-symbol-solver-core")
124120
testImplementation("org.ow2.asm:asm")
125121

126122
testImplementation("com.tngtech.archunit:archunit")
127123
testImplementation("com.tngtech.archunit:archunit-junit5-api")
128124
testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine")
125+
129126
}
130127

131128
application {
@@ -223,9 +220,6 @@ javaModuleTesting.whitebox(testing.suites["test"]) {
223220
requires.add("org.testfx")
224221
requires.add("org.testfx.junit5")
225222

226-
requires.add("wiremock")
227-
requires.add("wiremock.slf4j.spi.shim")
228-
229223
requires.add("com.tngtech.archunit")
230224
requires.add("com.tngtech.archunit.junit5.api")
231225
}

jabgui/src/test/java/org/jabref/IconsPropertiesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void existenceOfIconImagesReferencedFromIconsProperties() throws IOException {
3030
try (Reader reader = Files.newBufferedReader(Path.of(iconsPropertiesPath))) {
3131
properties.load(reader);
3232
}
33-
assertFalse(properties.entrySet().isEmpty(), "There must be loaded properties after loading " + iconsPropertiesPath);
33+
assertFalse(properties.isEmpty(), "There must be loaded properties after loading " + iconsPropertiesPath);
3434

3535
// check that each key references an existing file
3636
for (Map.Entry<Object, Object> entry : properties.entrySet()) {

jabgui/src/test/java/org/jabref/gui/linkedfile/DownloadLinkedFileActionTest.java

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,12 @@
2525
import org.jabref.model.entry.BibEntry;
2626
import org.jabref.model.entry.LinkedFile;
2727

28-
import com.github.tomakehurst.wiremock.WireMockServer;
29-
import org.junit.jupiter.api.AfterEach;
3028
import org.junit.jupiter.api.BeforeEach;
3129
import org.junit.jupiter.api.Test;
3230
import org.junit.jupiter.api.io.TempDir;
3331
import org.junit.jupiter.params.ParameterizedTest;
3432
import org.junit.jupiter.params.provider.ValueSource;
3533

36-
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
37-
import static com.github.tomakehurst.wiremock.client.WireMock.configureFor;
38-
import static com.github.tomakehurst.wiremock.client.WireMock.get;
39-
import static com.github.tomakehurst.wiremock.client.WireMock.head;
40-
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
41-
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
4234
import static org.junit.jupiter.api.Assertions.assertEquals;
4335
import static org.mockito.ArgumentMatchers.any;
4436
import static org.mockito.Mockito.mock;
@@ -57,8 +49,6 @@ class DownloadLinkedFileActionTest {
5749
private final FilePreferences filePreferences = mock(FilePreferences.class);
5850
private final GuiPreferences preferences = mock(GuiPreferences.class);
5951

60-
private WireMockServer wireMockServer;
61-
6252
@BeforeEach
6353
void setUp(@TempDir Path tempFolder) throws IOException {
6454
entry = new BibEntry()
@@ -80,15 +70,6 @@ void setUp(@TempDir Path tempFolder) throws IOException {
8070
cookieManager = (CookieManager) CookieHandler.getDefault();
8171
}
8272
cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
83-
84-
wireMockServer = new WireMockServer(2331);
85-
wireMockServer.start();
86-
configureFor("localhost", 2331);
87-
}
88-
89-
@AfterEach
90-
void tearDown() {
91-
wireMockServer.stop();
9273
}
9374

9475
@Test
@@ -161,76 +142,4 @@ void doesntReplaceSourceURL(boolean keepHtml) throws IOException {
161142

162143
assertEquals(List.of(new LinkedFile("", tempFolder.resolve("asdf.pdf"), "PDF", url)), entry.getFiles());
163144
}
164-
165-
@Test
166-
void keepsHtmlFileLink(@TempDir Path tempFolder) throws MalformedURLException {
167-
stubFor(get(urlEqualTo("/html"))
168-
.willReturn(aResponse()
169-
.withStatus(200)
170-
.withHeader("Content-Type", "text/html; charset=utf-8")
171-
.withBody("<html><body><h1>Hi</h1></body></html>")));
172-
173-
stubFor(head(urlEqualTo("/html"))
174-
.willReturn(aResponse()
175-
.withStatus(200)
176-
.withHeader("Content-Type", "text/html; charset=utf-8")));
177-
178-
LinkedFile linkedFile = new LinkedFile(URLUtil.create("http://localhost:2331/html"), "");
179-
when(databaseContext.getFirstExistingFileDir(any())).thenReturn(Optional.of(tempFolder));
180-
when(filePreferences.getFileNamePattern()).thenReturn("[citationkey]");
181-
when(filePreferences.getFileDirectoryPattern()).thenReturn("");
182-
183-
entry.setFiles(List.of(linkedFile));
184-
185-
BibEntry expected = new BibEntry(entry);
186-
187-
DownloadLinkedFileAction downloadLinkedFileAction = new DownloadLinkedFileAction(
188-
databaseContext,
189-
entry,
190-
linkedFile,
191-
linkedFile.getLink(),
192-
dialogService,
193-
preferences.getExternalApplicationsPreferences(),
194-
preferences.getFilePreferences(),
195-
new CurrentThreadTaskExecutor());
196-
downloadLinkedFileAction.execute();
197-
198-
assertEquals(expected, entry);
199-
}
200-
201-
@Test
202-
void removesHtmlFileLink(@TempDir Path tempFolder) throws MalformedURLException {
203-
stubFor(get(urlEqualTo("/html"))
204-
.willReturn(aResponse()
205-
.withStatus(200)
206-
.withHeader("Content-Type", "text/html; charset=utf-8")
207-
.withBody("<html><body><h1>Hi</h1></body></html>")));
208-
209-
stubFor(head(urlEqualTo("/html"))
210-
.willReturn(aResponse()
211-
.withStatus(200)
212-
.withHeader("Content-Type", "text/html; charset=utf-8")));
213-
214-
LinkedFile linkedFile = new LinkedFile(URLUtil.create("http://localhost:2331/html"), "");
215-
when(databaseContext.getFirstExistingFileDir(any())).thenReturn(Optional.of(tempFolder));
216-
when(filePreferences.getFileNamePattern()).thenReturn("[citationkey]");
217-
when(filePreferences.getFileDirectoryPattern()).thenReturn("");
218-
219-
entry.setFiles(List.of(linkedFile));
220-
221-
DownloadLinkedFileAction downloadLinkedFileAction = new DownloadLinkedFileAction(
222-
databaseContext,
223-
entry,
224-
linkedFile,
225-
linkedFile.getLink(),
226-
dialogService,
227-
preferences.getExternalApplicationsPreferences(),
228-
preferences.getFilePreferences(),
229-
new CurrentThreadTaskExecutor(),
230-
"",
231-
false);
232-
downloadLinkedFileAction.execute();
233-
234-
assertEquals(new BibEntry().withCitationKey("asdf"), entry);
235-
}
236145
}

jablib/build.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ dependencies {
224224

225225
testImplementation("org.hamcrest:hamcrest")
226226

227-
testImplementation("org.wiremock:wiremock") {
228-
exclude(group = "net.sf.jopt-simple", module = "jopt-simple")
229-
}
230227
testImplementation("org.ow2.asm:asm")
231228

232229
// Required for LocalizationConsistencyTest
@@ -593,8 +590,7 @@ javaModuleTesting.whitebox(testing.suites["test"]) {
593590

594591
requires.add("org.xmlunit")
595592
requires.add("org.xmlunit.matchers")
596-
requires.add("wiremock")
597-
requires.add("wiremock.slf4j.spi.shim")
593+
598594

599595
requires.add("com.tngtech.archunit")
600596
requires.add("com.tngtech.archunit.junit5.api")

0 commit comments

Comments
 (0)