-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shadow additional packages in wiremock-standalone #2327
Conversation
58e8f82
to
19dede3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but it would benefit a second check by @tomakehurst w.r.t javax.annotation
@@ -306,6 +306,9 @@ shadowJar { | |||
relocate "org.checkerframework", "wiremock.org.checkerframework" | |||
relocate "org.hamcrest", "wiremock.org.hamcrest" | |||
relocate "org.slf4j", "wiremock.org.slf4j" | |||
relocate "joptsimple", "wiremock.joptsimple" | |||
relocate "javax.annotation", "wiremock.javax.annotation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure we have enough test coverage to ensure it does not explode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick review and feedback, @oleg-nenashev! As an alternative, we could try excluding javax.annotation
from the standalone artifact ...
build.gradle
Outdated
@@ -306,6 +306,9 @@ shadowJar { | |||
relocate "org.checkerframework", "wiremock.org.checkerframework" | |||
relocate "org.hamcrest", "wiremock.org.hamcrest" | |||
relocate "org.slf4j", "wiremock.org.slf4j" | |||
relocate "joptsimple", "wiremock.joptsimple" | |||
relocate "javax.annotation", "wiremock.javax.annotation" | |||
relocate "org.yaml.snakeyaml", "wiremock.org.yaml.snakeyaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest we shorten this to org.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can we also add:
com.ethlo
com.networknt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, @tomakehurst! Updated the PR
897795b
to
d21a684
Compare
Thanks! |
* Add annotations for Beta and Internal APIs * Spotless * Excluded transitive jsr305 dependency from build to avoid javax.annotation classes ending up in the standalone JAR * Replace Guava by JDK (Partly) * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * Replace Guava by JDK (Partly) * Replace Guava by JDK (Partly) * Replace Guava by JDK (Partly) * update * update * Shadow additional packages (#2327) * Removed redundant relocation of javax.annotation from the build * Fixed Spotless errors --------- Co-authored-by: Tom Akehurst <tom@wiremock.org> Co-authored-by: Kirill Peshin <kirill.peshin@bscmsc.ru> Co-authored-by: jluehe <janluehe@yahoo.com>
Thank you, @tomakehurst! Are there any plans to do another 2.x release? If so, could you please tell me which branch I should use for backporting these changes? |
The
joptsimple
,javax.annotation
, andorg.yaml.snakeyaml
packages are currently not being shadowed in thewiremock-standalone
artifact:This can cause conflicts when
wiremock-standalone
is integrated into another project which pulls in different versions of these dependencies.The proposed fix adds these packages to the list of packages to be shadowed.
Verification:
References
Submitter checklist
#help-contributing
or a project-specific channel like#wiremock-java