Skip to content

Commit faed0c2

Browse files
Bump org.wiremock:wiremock-standalone from 3.12.1 to 3.13.0 in /jablib (#13293)
* Bump org.wiremock:wiremock-standalone from 3.12.1 to 3.13.0 in /jablib Bumps [org.wiremock:wiremock-standalone](https://github.com/wiremock/wiremock) from 3.12.1 to 3.13.0. - [Release notes](https://github.com/wiremock/wiremock/releases) - [Commits](wiremock/wiremock@3.12.1...3.13.0) --- updated-dependencies: - dependency-name: org.wiremock:wiremock-standalone dependency-version: 3.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Add other workaround for Wiremock * Add workarounds * Refine workaround * Remove wrong --add-reads * Add requires to org.slf4j * Add another patch * One more requires * Try to fix deps * More simpler solution to get handlebars running * Workaround for module transformation * Add another requires * Refine handlebars dependencies * More fixes * One more depdenceny * One more * Fix uses * Is this the final fix? --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
1 parent 73082d0 commit faed0c2

File tree

3 files changed

+67
-6
lines changed

3 files changed

+67
-6
lines changed

build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,43 @@ extraJavaModuleInfo {
158158
// PATCH REASON:
159159
exports("com.sun.javafx.scene.control")
160160
}
161+
162+
// Workaround for https://github.com/wiremock/wiremock/issues/2149
163+
module("org.wiremock:wiremock", "wiremock") {
164+
overrideModuleName()
165+
patchRealModule()
166+
exportAllPackages()
167+
168+
requires("wiremock.slf4j.spi.shim")
169+
requires("com.fasterxml.jackson.core")
170+
requires("com.fasterxml.jackson.databind")
171+
requires("com.fasterxml.jackson.datatype.jsr310")
172+
requires("com.google.common")
173+
requires("commons.fileupload")
174+
requires("org.eclipse.jetty.server")
175+
requires("org.eclipse.jetty.servlet")
176+
requires("org.eclipse.jetty.servlets")
177+
requires("org.eclipse.jetty.webapp")
178+
requires("org.eclipse.jetty.proxy")
179+
requires("org.eclipse.jetty.http2.server")
180+
requires("org.eclipse.jetty.alpn.server")
181+
requires("org.eclipse.jetty.alpn.java.server")
182+
requires("org.eclipse.jetty.alpn.java.client")
183+
requires("org.eclipse.jetty.alpn.client")
184+
requires("java.xml")
185+
requires("org.custommonkey.xmlunit")
186+
requires("org.slf4j")
187+
requires("org.xmlunit")
188+
189+
uses("com.github.tomakehurst.wiremock.extension.Extension")
190+
191+
// workaround for https://github.com/wiremock/wiremock/issues/2874
192+
mergeJar("com.github.jknack:handlebars")
193+
mergeJar("com.github.jknack:handlebars-helpers")
194+
195+
// Required to provide package "wiremock.org.slf4j.helpers"
196+
mergeJar("com.github.koppor:wiremock-slf4j-shim")
197+
}
161198
}
162199

163200
testing {

jabgui/build.gradle.kts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,17 @@ dependencies {
137137
}
138138
testImplementation("net.bytebuddy:byte-buddy:1.17.5")
139139

140-
// recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954
141-
testImplementation("org.wiremock:wiremock-standalone:3.12.1")
140+
testImplementation("org.wiremock:wiremock:3.13.0")
141+
// Required by Wiremock - and our patching of Wiremock
142+
implementation("com.github.jknack:handlebars:4.3.1") {
143+
exclude(group = "org.mozilla", module = "rhino")
144+
}
145+
implementation("com.github.jknack:handlebars-helpers:4.3.1") {
146+
exclude(group = "org.mozilla", module = "rhino")
147+
exclude(group = "org.apache.commons", module = "commons-lang3")
148+
}
149+
implementation("com.github.koppor:wiremock-slf4j-shim:main-SNAPSHOT")
150+
testImplementation("com.github.koppor:wiremock-slf4j-spi-shim:main-SNAPSHOT")
142151

143152
testImplementation("com.github.javaparser:javaparser-symbol-solver-core:3.26.4")
144153
}
@@ -436,16 +445,19 @@ if (OperatingSystem.current().isWindows) {
436445
}
437446

438447
javaModuleTesting.whitebox(testing.suites["test"]) {
448+
requires.add("org.jabref.testsupport")
449+
439450
requires.add("org.junit.jupiter.api")
440451
requires.add("org.junit.jupiter.params")
441452
requires.add("org.mockito")
442-
requires.add("org.jabref.testsupport")
453+
requires.add("wiremock")
454+
requires.add("wiremock.slf4j.spi.shim")
443455
}
444456

445457
tasks.test {
446458
jvmArgs = listOf(
447459
"--add-opens", "javafx.graphics/com.sun.javafx.application=org.testfx",
448460
"--add-reads", "org.mockito=java.prefs",
449-
"--add-reads", "org.mockito=javafx.scene",
461+
"--add-reads", "org.jabref=wiremock"
450462
)
451463
}

jablib/build.gradle.kts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,18 @@ dependencies {
237237

238238
testImplementation("org.hamcrest:hamcrest-library:3.0")
239239

240-
// recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954
241-
testImplementation("org.wiremock:wiremock-standalone:3.12.1")
240+
testImplementation("org.wiremock:wiremock:3.13.0")
241+
// Required by Wiremock - and our patching of Wiremock
242+
implementation("com.github.jknack:handlebars:4.3.1") {
243+
exclude(group = "org.mozilla", module = "rhino")
244+
}
245+
implementation("com.github.jknack:handlebars-helpers:4.3.1") {
246+
exclude(group = "org.mozilla", module = "rhino")
247+
exclude(group = "org.apache.commons", module = "commons-lang3")
248+
}
249+
// no "test", because of https://github.com/gradlex-org/extra-java-module-info/issues/134#issuecomment-2956556651
250+
implementation("com.github.koppor:wiremock-slf4j-shim:main-SNAPSHOT")
251+
testImplementation("com.github.koppor:wiremock-slf4j-spi-shim:main-SNAPSHOT")
242252

243253
// Required for LocalizationConsistencyTest
244254
testImplementation("org.testfx:testfx-core:4.0.16-alpha")
@@ -586,6 +596,8 @@ javaModuleTesting.whitebox(testing.suites["test"]) {
586596
requires.add("org.junit.jupiter.params")
587597
requires.add("org.jabref.testsupport")
588598
requires.add("org.mockito")
599+
requires.add("wiremock")
600+
requires.add("wiremock.slf4j.spi.shim")
589601

590602
// --add-reads
591603
//reads.add("org.jabref.jablib=io.github.classgraph")

0 commit comments

Comments
 (0)