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)
    。。。。。。
    
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章