-
Notifications
You must be signed in to change notification settings - Fork 864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.yaml:snakeyaml dependency is giving an error because 'android' classifier #327
Comments
Same issue here :-/ |
I have also encountered this issue. please fix. I am using this library in a spring boot project
|
For all those reporting the same issue, i did configure my project to avoid this problem.
|
Which version of java-faker are you using? The latest version uses snake-yaml 1.20 which is resolvable. |
In my case, i'm using the version 0.14. The POM file for this release has the snake-yaml 1.19 with the classifier "android", so Gradle or Maven can't find the library in any remote repository. Here's an extract from the POM file for the release version 0.14 of Java-Faker:
|
This works.. |
@yolave could you use the latest version 0.16 and see if you've get the same error? Thanks |
OK @codingricky , i've performed some tests over my project changing the library version. What i've found is there are two problems with the mentioned library above. The first problem is with the org.yaml:snakeyaml:1.17 library. This library is used in other projects like Spring Boot (1.5.9-RELEASE) and Google Cloud Appengine Plugin (0.3.9) and they eventually replace the version defined by java-faker when build. When i run the
Another library is overwriting the default version of the dependency used by java-faker (1.20 -> 1.17). I've tried to force to use the defined version of the library in java-faker's pom but with no success. Suggestions will be accepted to try to fix this. The second problem is related to the library itself. where the classifier is defined in the project's pom file. As i posted above, the pom.xml for the java-faker project has the If you need any other test, drop me a comment and I'll try to help out. |
UPDATE I perform a new test and i found what is going on. My project is a spring boot type one, so i have in the root build.gradle file, the option to apply the spring boot plugin ( |
Same issue ! :'( |
You should exclude library by artifact, not by group. |
This solved it for me
But dirty workaround anyway. |
@Samyssmile what you did should be solved with #470 |
This issue is fixed with version 0.18 of Javafaker |
I'm still having this issue with javafaker 1.0.2 |
i checked with Javafaker 1.0.2 version after your message. I don't get issue in that version even. i was facing issue with javafaker 0.14. with Upgrade my problem got resolved. Javafaker 1.0.2 they use both snakyaml 1.2.3 and snakeyaml 1.2.3-android. |
Hi,
try to include javafaker as lib in another lib. Then try to use that lib in
a project referencing it by maveLocal.
Gradle complains about missing snakeyaml android: probably the fix is not
working using Gradle on maven local.
Bye.
Il giorno mar 24 nov 2020 alle ore 01:36 Sonali Das <
[email protected]> ha scritto:
… This issue is fixed with version 0.18 of Javafaker
I'm still having this issue with javafaker 1.0.2
i checked with Javafaker 1.0.2 version after your message. I don't get
issue in that version even. i was facing issue with javafaker 0.14. with
Upgrade my problem got resolved. Javafaker 1.0.2 they use both snakyaml
1.2.3 and snakeyaml 1.2.3-android.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#327 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATA4NI6HKQAGLVSF7LSXXDSRL5ZXANCNFSM4GAJ7FZQ>
.
--
Mentire al software non è mai una buona idea.
|
@vinz486 , please make a sample project where your problem could be reproduced. |
0.18 works Using maven |
I've suddenly got this issue because a different dependency brought in
I checked out this project and it builds fine if I remove |
@Mahoney'm this has been fixed in Datafaker, an active clone of this repo with most of not all issues fixed. |
@bodiam thanks - I'll consider migrating to datafaker. In the meantime, this works as a way to strip the configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.module.toString() == 'org.yaml:snakeyaml') {
details.artifactSelection {
it.selectArtifact(DependencyArtifact.DEFAULT_TYPE, null, null)
}
}
}
} |
@Mahoney Thanks your suggestion. it works. this is kotlin-dsl port configurations.all {
resolutionStrategy.eachDependency {
if(requested.module.toString() == "org.yaml:snakeyaml") {
artifactSelection {
selectArtifact(DependencyArtifact.DEFAULT_TYPE, null, null)
}
}
}
} |
Hi there, I got the issue |
@RyoSaeba06 this if a known issue. The recommendation is to use Datafaker.net, a maintained fork of this library |
If you are using gradle-kotlin, use the below code to resolve this issue.
|
I'm using gradle-groovy and the following work for me:
|
it works for me |
In the pom.xml file, the declared dependency for org.yaml:snakeyaml has the 'android' classifier so, when a project compiles, it gets an error because the name of the library who is tried to be downloaded (from jcenter: https://jcenter.bintray.com/org/yaml/snakeyaml/1.17/snakeyaml-1.17-android.jar, from maven central: https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.17/snakeyaml-1.17-android.jar). My project is a normal java one (not android) and i'm using Gradle instead Maven.
Thank you!
The text was updated successfully, but these errors were encountered: