Slackbot
09/11/2023, 3:26 PMLee Turner
09/11/2023, 3:50 PMjava -jar wiremock-standalone-3.0.4.jar
• Then you need to download the webhooks extension from this page - https://wiremock.org/docs/webhooks-and-callbacks/ Make sure both jars are in the same directory.
• You then need to add both the wiremock jar and the extension to the classpath, start wiremock passing in the webhooks extension as a parameter. This is also detailed on the above page:
Mac OS/Linux:
java -cp wiremock-standalone-3.0.4.jar:wiremock-webhooks-extension-3.0.4.jar \
wiremock.Run --extensions org.wiremock.webhooks.Webhooks
Windows:
java -cp wiremock-standalone-3.0.4.jar;wiremock-webhooks-extension-3.0.4.jar \
wiremock.Run --extensions org.wiremock.webhooks.Webhooks
RASHMI K YAMAKANAMARDI
09/11/2023, 5:10 PMLee Turner
09/11/2023, 5:19 PMjava -jar wiremock-standalone-3.0.4.jar
?Brandon Trautmann
09/11/2023, 5:34 PMshadowJar
plugin.
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.0'
}
...
dependencies {
implementation group: 'org.wiremock', name: 'wiremock', version: '3.0.4'
}
...
jar {
manifest {
attributes 'Main-Class': 'wiremock.Run'
}
}
...
assemble.dependsOn 'shadowJar'
shadowJar {
archiveBaseName.set('my-wiremock-extensions')
archiveClassifier.set('')
}
Then when you build, it’ll create a fat jar with both standalone and your extensions and they can be invoked doing simply
java -jar my-wiremock-extensions-1.0-SNAPSHOT.jar --bind-address 127.0.0.1 --extensions com.example.MyExtensions --verbose --disable-banner &
Brandon Trautmann
09/11/2023, 5:34 PMRASHMI K YAMAKANAMARDI
09/11/2023, 5:38 PMRASHMI K YAMAKANAMARDI
09/11/2023, 5:43 PMLee Turner
09/11/2023, 5:47 PMRASHMI K YAMAKANAMARDI
09/11/2023, 5:47 PMLee Turner
09/11/2023, 5:48 PM3.0.4
of standalone ?Lee Turner
09/11/2023, 5:52 PMProhibitedNetworkAddressException
was introduced recentlyLee Turner
09/11/2023, 5:52 PMRASHMI K YAMAKANAMARDI
09/11/2023, 6:02 PMRASHMI K YAMAKANAMARDI
09/11/2023, 6:03 PMLee Turner
09/11/2023, 6:03 PMRASHMI K YAMAKANAMARDI
09/12/2023, 2:19 AMLee Turner
09/12/2023, 6:50 AMRASHMI K YAMAKANAMARDI
09/13/2023, 6:00 AM