Exchange 2.0 编译报错:Failed to execute goal on project nebula-exchange

文字版报错信息:
[ERROR] Failed to execute goal on project nebula-exchange: Could not resolve dependencies for project com.vesoft:nebula-exchange:jar:2.0.0: The following artifacts could not be resolved: io.streamnative.connectors:pulsar-spark-connector_2.11:jar:2.4.5, org.apache.spark:spark-network-common_2.11:jar:2.4.4, org.rocksdb:rocksdbjni:jar:6.7.3, org.apache.hadoop:hadoop-hdfs:jar:2.6.1: Could not transfer artifact io.streamnative.connectors:pulsar-spark-connector_2.11:jar:2.4.5 from/to bintray-streamnative-maven (https://dl.bintray.com/streamnative/maven): GET request of: io/streamnative/connectors/pulsar-spark-connector_2.11/2.4.5/pulsar-spark-connector_2.11-2.4.5.jar from bintray-streamnative-maven failed: Premature end of Content-Length delimited message body (expected: 36,332,382; received: 15,113,190) → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven with the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] DependencyResolutionException - Apache Maven - Apache Software Foundation

看下你的maven的镜像配置,mirror配置中的mirrorOf的值是不是*

<mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>

如果是*,需要改成central; 或者改成*,!SparkPackagesRepo,!bintray-streamnative-maven

原因:
exchange的pom.xml中有两个依赖包是不在central仓库的,pom.xml中配置了这两个依赖所在的仓库地址。 如果你maven中配置的镜像地址对应的mirrorOf值是*,那么所有依赖都会在中央仓库下载,就下载不到那两个依赖了。

感谢回复,我后来重新执行了

mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true

命令之后就编译成功了,没有做其他改动。

maven 用的是默认配置,里面的 mirrors 是空的,不过添加了您给的这个 mirror 之后编译过程中 download 的速度貌似变快了,感谢:pray:

1 个赞

@Archie 可以帮忙把截图中的错误信息以文字的形式贴一下不
@steam 然后该贴可以转成常见问题,其他用户有相同问题时可以搜索

哦啦,改成 FAQ 了

报错无法复现,我手敲了一下,贴在主帖里了

1 个赞

手敲!!! 感谢~辛苦~

:crazy_face:

1 个赞