java-faker
java-faker copied to clipboard
1.0.2 incompatible with Spring Boot 2.7.0
Describe the bug I'm using javafaker in an application and updated recently to Spring Boot 2.7.0. After upgrading I ran in to the following build error:
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find snakeyaml-1.30-android.jar (org.yaml:snakeyaml:1.30).
I have traced it down to javafaker. By changing my gradle dependency to the following my application builds again:
implementation('com.github.javafaker:javafaker:1.0.2') {
exclude group: 'org.yaml', module: 'snakeyaml'
}
To Reproduce Setup a spring boot 2.7.0 app and add java faker 1.0.2 as dependency.
Expected behavior Should build out of the box.
Versions:
- OS: OSX
- JDK 11
- Faker Version 1.0.2
@hstaudacher thanks for reporting this issue, and yes, there's a few issues with this library, the incompatibility with Spring Boot is one of them. That's why we created a port of this library, which does work with spring boot. You can find it at https://www.datafaker.net, and requires only minimal code changes to get it up and running, only the package name changed (plus we have many improvements, no security issues, etc)
It is also discussed in detail here. Using https://www.datafaker.net is the best option as @bodiam has mentioned above.