Skip to content

Commit f9a9f20

Browse files
authored
fix: avoid crash when printing help in wiremock-standalone (wiremock#2351)
1 parent 34d4930 commit f9a9f20

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ shadowJar {
311311
relocate "org.hamcrest", "wiremock.org.hamcrest"
312312
relocate "org.slf4j", "wiremock.org.slf4j"
313313
relocate "joptsimple", "wiremock.joptsimple"
314+
exclude 'joptsimple/HelpFormatterMessages.properties'
314315
relocate "org.yaml", "wiremock.org.yaml"
315316
relocate "com.ethlo", "wiremock.com.ethlo"
316317
relocate "com.networknt", "wiremock.com.networknt"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# This is copied from joptsimple.
3+
# Properties prefixed with "wiremock" to match after relocation into standalone jar
4+
# Without this, the "--help" command will throw MissingResourceException
5+
#
6+
wiremock.joptsimple.BuiltinHelpFormatter.no.options.specified = No options specified
7+
wiremock.joptsimple.BuiltinHelpFormatter.non.option.arguments.header = Non-option arguments:
8+
wiremock.joptsimple.BuiltinHelpFormatter.option.header.with.required.indicator = Option (* = required)
9+
wiremock.joptsimple.BuiltinHelpFormatter.option.divider.with.required.indicator = ---------------------
10+
wiremock.joptsimple.BuiltinHelpFormatter.option.header = Option
11+
wiremock.joptsimple.BuiltinHelpFormatter.option.divider = ------
12+
wiremock.joptsimple.BuiltinHelpFormatter.description.header = Description
13+
wiremock.joptsimple.BuiltinHelpFormatter.description.divider = -----------
14+
wiremock.joptsimple.BuiltinHelpFormatter.default.value.header = default:
15+
wiremock.joptsimple.AlternativeLongOptionSpec.description = Alternative form of long options
16+
wiremock.joptsimple.AlternativeLongOptionSpec.arg.description = opt=value

0 commit comments

Comments
 (0)