Skip to content

Commit

Permalink
Merge pull request #9 from bsmahi/main
Browse files Browse the repository at this point in the history
Upgraded Apache HttpClient Dependency
  • Loading branch information
sambsnyd authored Mar 25, 2024
2 parents 1a62bf4 + 81e4f27 commit 86f78af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
testImplementation("commons-codec:commons-codec:1.+")

testRuntimeOnly("org.apache.httpcomponents:httpclient:4.5.14")
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5:5.1.+")
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5:5.2.+")


testImplementation("org.junit.jupiter:junit-jupiter-engine:latest.release")
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/rewrite/apache-httpclient-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ recipeList:
oldArtifactId: httpclient
newGroupId: org.apache.httpcomponents.client5
newArtifactId: httpclient5
newVersion: 5.1.x
newVersion: 5.2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.apache.httpcomponents
oldArtifactId: httpcore
newGroupId: org.apache.httpcomponents.core5
newArtifactId: httpcore5
newVersion: 5.1.x
newVersion: 5.2.x
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_ClassMapping
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_DeprecatedMethods
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_TimeUnit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ void migrateDependencies() {
</dependencies>
</project>
""", spec -> spec.after(pom -> {
Matcher version = Pattern.compile("5\\.1\\.\\d+").matcher(pom);
assertThat(version.find()).describedAs("Expected 5.1.x in %s", pom).isTrue();
Matcher version = Pattern.compile("5\\.2\\.\\d+").matcher(pom);
assertThat(version.find()).describedAs("Expected 5.2.x in %s", pom).isTrue();
return """
<project>
<modelVersion>4.0.0</modelVersion>
Expand Down

0 comments on commit 86f78af

Please sign in to comment.