What problem are you trying to solve?
Starting with wiremock 3.x, the coordinates of the dependency changed
From
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
</dependency>
To :
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
</dependency>
Using 2.x versions puts teams at risk such as CVE-2023-44487
Sample diff :
diff --git a/pom.xml b/pom.xml
<!--Testing framework to allow for mocking external service calls-->
<dependency>
- <groupId>com.github.tomakehurst</groupId>
- <artifactId>wiremock-jre8</artifactId>
- <version>2.35.1</version>
+ <groupId>org.wiremock</groupId>
+ <artifactId>wiremock</artifactId>
+ <version>3.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
In my case, changing the coordinates was enough but there are some breaking changes we need to be aware of as well. See the release notes for more details
Describe the solution you'd like
- Replace the coordinates
- Migrate deprecated APIs
Additional context
- v3 no longer supports Java 8 so this recipe should not be applied for Java 8 projects
Relevant :
https://www.cve.org/CVERecord?id=CVE-2023-44487
https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/
openrewrite/rewrite-java-dependencies#58
What problem are you trying to solve?
Starting with wiremock 3.x, the coordinates of the dependency changed
From
To :
Using
2.xversions puts teams at risk such as CVE-2023-44487Sample diff :
In my case, changing the coordinates was enough but there are some breaking changes we need to be aware of as well. See the release notes for more details
Describe the solution you'd like
Additional context
Relevant :
https://www.cve.org/CVERecord?id=CVE-2023-44487
https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/
openrewrite/rewrite-java-dependencies#58