brianfrankcooper / YCSB

Yahoo! Cloud Serving Benchmark
Apache License 2.0
4.96k stars 2.25k forks source link

Build fails to download dependencies over HTTP in Maven 3.8.1+ #1557

Open harjitdotsingh opened 3 years ago

harjitdotsingh commented 3 years ago

I'm trying to do a mvn clean package and get this error

[ERROR] Failed to execute goal on project mongodb-binding: Could not resolve dependencies for project site.ycsb:mongodb-binding:jar:0.18.0-SNAPSHOT: Failed to collect dependencies at com.allanbank:mongodb-async-driver:jar:2.0.1: Failed to read artifact descriptor for com.allanbank:mongodb-async-driver:jar:2.0.1: Could not transfer artifact com.allanbank:mongodb-async-driver:pom:2.0.1 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [allanbank (http://www.allanbank.com/repo/, default, releases)] -> [Help 1] [ERROR] Failed to execute goal on project solr7-binding: Could not resolve dependencies for project site.ycsb:solr7-binding:jar:0.18.0-SNAPSHOT: Failed to collect dependencies at org.apache.solr:solr-test-framework:jar:7.7.2 -> org.restlet.jee:org.restlet:jar:2.3.0: Failed to read artifact descriptor for org.restlet.jee:org.restlet:jar:2.3.0: Could not transfer artifact org.restlet.jee:org.restlet:pom:2.3.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [maven-restlet (http://maven.restlet.org, default, releases+snapshots), apache.snapshots (http://repository.apache.org/snapshots, default, disabled)] -> [Help 1] [ERROR] Failed to execute goal on project ycsb: Could not resolve dependencies for project site.ycsb:ycsb:pom:0.18.0-SNAPSHOT: The following artifacts could not be resolved: site.ycsb:mongodb-binding:jar:0.18.0-SNAPSHOT, com.allanbank:mongodb-async-driver:jar:2.0.1, site.ycsb:solr7-binding:jar:0.18.0-SNAPSHOT: Could not find artifact site.ycsb:mongodb-binding:jar:0.18.0-SNAPSHOT -> [Help 1]

thatsdone commented 3 years ago

Hi @harjitdotsingh,

Which version of maven are you using? If you use 3.8.1 and later, this behavior comes from the following maven side change.

https://maven.apache.org/docs/3.8.1/release-notes.html#cve-2020-13956

I think currently easiest resolution is to downgrade maven , because it looks like the mongodb-async-driver distribution site does not support HTTPS.

https://github.com/brianfrankcooper/YCSB/blob/master/mongodb/pom.xml#L85

In case of me, I'm using 3.6.3 (Ubuntu 20.04 bundled version) and getting successful build results.

harjitdotsingh commented 3 years ago

Yeah, I was using 3.8.1, let me downgrade and check. Thanks for your help.

Thanks

On Wed, Sep 29, 2021 at 10:27 AM Masanori ITOH @.***> wrote:

Hi @harjitdotsingh https://github.com/harjitdotsingh,

Which version of maven are you using? If you use 3.8.1 and later, this behavior comes from the following maven side change.

https://maven.apache.org/docs/3.8.1/release-notes.html#cve-2020-13956

I think currently easiest resolution is to downgrade maven , because it looks like the mongodb-async-driver distribution site does not support HTTPS.

https://github.com/brianfrankcooper/YCSB/blob/master/mongodb/pom.xml#L85

In case of me, I'm using 3.6.3 (Ubuntu 20.04 bundled version) and getting successful build results.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/brianfrankcooper/YCSB/issues/1557#issuecomment-930230028, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAASJ7UJ3HVFCMG3MJST4UTUEMO4PANCNFSM5CO54HPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

yzstu commented 2 years ago

Wow, i got the same trouble with, but we use maven3.5.2 in our project . Have you solve this problem?

thatsdone commented 2 years ago

@yzstu At least 3.6.3 (Ubuntu 20.04 bundled version) works. Try it!

harjitdotsingh commented 2 years ago

It worked after I downgraded to maven 3.5.4

omyhub commented 1 year ago

原因是 com.allanbank:mongodb-async-driver:jar:2.0.1 资源不支持https 参照下面方法 refer: https://www.cnblogs.com/flying607/p/14780925.html

wget http://www.allanbank.com/repo/com/allanbank/mongodb-async-driver/2.0.1/mongodb-async-driver-2.0.1.jar mv mongodb-async-driver-2.0.1.jar /tmp/ mvn install:install-file -Dfile=/tmp/mongodb-async-driver-2.0.1.jar -DgroupId=com.allanbank -DartifactId=mongodb-async-driver -Dversion=2.0.1 -Dpackaging=jar