java-faker icon indicating copy to clipboard operation
java-faker copied to clipboard

1.0.2 incompatible with Spring Boot 2.7.0

Open hstaudacher opened this issue 2 years ago • 2 comments

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 avatar Jun 05 '22 18:06 hstaudacher

@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)

bodiam avatar Jun 05 '22 22:06 bodiam

It is also discussed in detail here. Using https://www.datafaker.net is the best option as @bodiam has mentioned above.

ahmetgeymen avatar Aug 17 '22 09:08 ahmetgeymen