-
问题描述
在虚拟机上编译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) 。。。。。。
YCSB——编译时Maven报错
最新推荐文章于 2024-02-27 14:48:47 发布