Skip to content

Pin Datafaker to 1.x when migrating from Java Faker - #1199

Merged
timtebeek merged 1 commit into
mainfrom
tim/datafaker-mavendownloadingexception
Oct 19, 2026
Merged

timtebeek merged 1 commit into
mainfrom
tim/datafaker-mavendownloadingexception

Conversation

@timtebeek

Copy link
Copy Markdown
Member

JavaFakerToDataFaker swapped com.github.javafaker:javafaker for net.datafaker:datafaker without a newVersion, so it kept the old version, and net.datafaker:datafaker:1.0.2 has never been published, which caused a MavenDownloadingException on any project using the last Java Faker release.
The dependency change now uses newVersion: 1.x, which resolves to 1.9.0: the last Datafaker release that runs on Java 8 (2.x requires Java 17), and new enough (1.7.0+) to have the providers.base.Hashing and Relationship types the recipe renames to.
A new test migrates a pom on javafaker:1.0.2 to datafaker:1.9.0; without the fix it fails with the same download error.

ChangeDependency without a newVersion kept the Java Faker version, and
net.datafaker:datafaker:1.0.2 does not exist. 1.x resolves to 1.9.0, the
last Java 8 release, which also has the providers.base types the recipe
renames to.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Oct 19, 2026
@timtebeek
timtebeek merged commit 55617d6 into main Oct 19, 2026
1 of 2 checks passed
@timtebeek
timtebeek deleted the tim/datafaker-mavendownloadingexception branch October 19, 2026 12:02
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant