Repository: wiremock/wiremock (language: java)

Issue:
WireMock Webhook Extension 3.0.0 JAR is broken
### Proposal

It looks like https://repo1.maven.org/maven2/org/wiremock/wiremock-webhooks-extension/3.0.0/wiremock-webhooks-extension-3.0.0.jar is a broken JAR. It does not contain all metadata and shaded dependencies (`/wiremock/...`), and it explodes in Testcontainers when running it

## 3.0.0 JAR

![image](https://github.com/wiremock/wiremock/assets/3000480/58309388-bb93-4990-8bfc-1119eef68146)

## 2.35.0 JAR

![image](https://github.com/wiremock/wiremock/assets/3000480/a257dbb3-8fcb-4052-9164-e6fb503fdecf)

## Test log

```
14:05:33.983 [main] INFO  tc.wiremock/wiremock:3.0.0-1 - Container wiremock/wiremock:3.0.0-1 is starting: 3ddcb89f7a1b4a8db17109c1081937e6c8145e944347a09e2a559fada0b9ec04
14:05:34.608 [main] INFO  org.testcontainers.containers.wait.strategy.HttpWaitStrategy - /strange_babbage: Waiting for 60 seconds for URL: http://localhost:51446/__admin/mappings (where port 51446 maps to container port 8080)
14:05:35.464 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/client5/http/io/HttpClientConnectionManager
14:05:35.464 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.lang.Class.forName0(Native Method)
14:05:35.465 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.lang.Class.forName(Unknown Source)
14:05:35.466 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at com.github.tomakehurst.wiremock.extension.Extensions.loadClass(Extensions.java:172)
14:05:35.467 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
14:05:35.467 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
14:05:35.467 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
14:05:35.468 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
14:05:35.468 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source)
14:05:35.469 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
14:05:35.470 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
14:05:35.471 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
14:05:35.471 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
14:05:35.472 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
14:05:35.472 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
14:05:35.472 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
14:05:35.473 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at com.github.tomakehurst.wiremock.extension.Extensions.load(Extensions.java:70)
14:05:35.474 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at com.github.tomakehurst.wiremock.core.WireMockApp.<init>(WireMockApp.java:92)
14:05:35.474 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:70)
14:05:35.475 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.run(WireMockServerRunner.java:69)
14:05:35.476 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at wiremock.Run.main(Run.java:23)
14:05:35.477 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.hc.client5.http.io.HttpClientConnectionManager
14:05:35.477 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
14:05:35.478 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
14:05:35.478 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
14:05:35.479 [docker-java-stream--1372179660] INFO  org.wiremock.integrations.testcontainers.WireMockContainerExtensionsWebhookTest - STDERR: 	... 20 more
```

### Reproduction steps

- See https://github.com/wiremock/wiremock-testcontainers-java/pull/72 or just download the JAR

### References

_No response_


Discussion / hints:
Looks like it's started overwriting the fat JAR with the thin JAR (ordering dependency).

Attempting a fix by pinning the order for now so that the fat JAR is generated last and overwrites the thin JAR.

Fix patch:
diff --git a/build.gradle b/build.gradle
index e33df4dd79..668a0cf290 100644
--- a/build.gradle
+++ b/build.gradle
@@ -255,6 +255,8 @@ allprojects {
       property "sonar.host.url", "https://sonarcloud.io"
     }
   }
+
+  shadowJar.dependsOn jar
 }
 
 java {
diff --git a/wiremock-webhooks-extension/build.gradle b/wiremock-webhooks-extension/build.gradle
index 80273543a1..932478b1de 100644
--- a/wiremock-webhooks-extension/build.gradle
+++ b/wiremock-webhooks-extension/build.gradle
@@ -31,7 +31,9 @@ dependencies {
   implementation("com.github.jknack:handlebars-helpers:$versions.handlebars") {
     exclude group: 'org.mozilla', module: 'rhino'
   }
-  implementation "com.google.guava:guava:$versions.guava"
+  implementation "com.google.guava:guava:$versions.guava", {
+    exclude group: 'com.google.code.findbugs', module: 'jsr305'
+  }
   implementation "org.apache.httpcomponents.client5:httpclient5:5.2.1"
 
   testImplementation project(":")
@@ -47,10 +49,11 @@ shadowJar {
   archiveClassifier.set('')
 
   relocate "org.apache", 'wiremock.webhooks.org.apache'
-
-  dependencies {
-    exclude(dependency('org.slf4j:slf4j-api'))
-  }
+  relocate "org.slf4j",  "wiremock.webhooks.org.slf4j"
+  relocate "com.google", 'wiremock.webhooks.com.google'
+  relocate "com.fasterxml.jackson", 'wiremock.webhooks.com.fasterxml.jackson'
+  relocate "org.checkerframework", "wiremock.webhooks.org.checkerframework"
+  relocate "com.github.jknack", "wiremock.webhooks.com.github.jknack"
 }
 
 task sourcesJar(type: Jar, dependsOn: classes) {


Test patch: