YCSB——编译时Maven报错

  • 问题描述
    在虚拟机上编译YCSB报如下错误。

    [root@node3 YCSB-master]# mvn clean package -Dmaven.test.skip=true
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Build Order:
    [INFO] 
    [INFO] YCSB Root
    [INFO] Core YCSB
    [INFO] Per Datastore Binding descriptor
    [INFO] YCSB Datastore Binding Parent
    [INFO] JDBC DB Binding
    [INFO] YCSB Release Distribution Builder
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building YCSB Root 0.17.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0-M1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] YCSB Root ......................................... FAILURE [0.030s]
    [INFO] Core YCSB ......................................... SKIPPED
    [INFO] Per Datastore Binding descriptor .................. SKIPPED
    [INFO] YCSB Datastore Binding Parent ..................... SKIPPED
    [INFO] JDBC DB Binding ................................... SKIPPED
    [INFO] YCSB Release Distribution Builder ................. SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.192s
    [INFO] Finished at: Tue Jan 14 11:04:38 CST 2020
    [INFO] Final Memory: 18M/1449M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0-M1: 1 problem was encountered while building the effective model
    [ERROR] [FATAL] Non-parseable POM /root/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/3.0.0-M1/maven-enforcer-plugin-3.0.0-M1.pom: entity reference name can not contain character =' (position: START_TAG seen .../index.jsp?wlanuserip=38835e95da7224332fa91e8932ea4b4a&wlanacname=... @1:130)  @ line 1, column 130
    [ERROR] -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using 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] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
    
  • 解决方案
    绕了一大圈,拷贝过缺失的文件,下过jar包,以为不是源是问题,结果还是源的原因,默认的源访问不了,要改成国内的源。
    打开maven安装路径,找到settings.xml文件,在标签下添加标签内容。

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

    修改完配置之后,再编译就不会报错了,会显示“Downloaded xxxxx”。

    Downloaded from alimaven: https://maven.aliyun.com/repository/central/org/sonatype/aether/aether-util/1.7/aether-util-1.7.pom (2.1 kB at 12 kB/s)
    Downloading from alimaven: https://maven.aliyun.com/repository/central/org/sonatype/aether/aether-impl/1.7/aether-impl-1.7.pom
    Downloaded from alimaven: https://maven.aliyun.com/repository/central/org/sonatype/aether/aether-impl/1.7/aether-impl-1.7.pom (3.7 kB at 22 kB/s)
    。。。。。。
    
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值