[root@centos canal-canal-1.1.4]# mvn clean install -Dmaven.test.skip -Denv=release [INFO] Scanning for projects... Downloading: https://maven.aliyun.com/repository/public/org/sonatype/oss/oss-parent/7/oss-parent-7.pom [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.alibaba.otter:canal:1.1.4 (/tmp/canal-canal-1.1.4/pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not transfer artifact org.sonatype.oss:oss-parent:pom:7 from/to aliyunmaven (https://maven.aliyun.com/repository/public): peer not authenticated and 'parent.relativePath' points at wrong local POM @ line 9, column 13 -> [Help 2] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException [root@centos canal-canal-1.1.4]# mvn -v Apache Maven 3.0.5 (Red Hat 3.0.5-17) Maven home: /usr/share/maven Java version: 1.8.0_41, vendor: Oracle Corporation Java home: /data/jdk/java-se-8u41-ri/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-1160.45.1.el7.x86_64", arch: "amd64", family: "unix" [root@centos canal-canal-1.1.4]#
原提问者GitHub用户kennethToyuan
根据错误提示,该问题可能是由于Maven无法从https://maven.aliyun.com/repository/public下载org.sonatype.oss:oss-parent:pom:7的依赖项而导致的。这可能是因为阿里云镜像源未被正确配置或存在连接问题。
您可以尝试在Maven命令中添加-Dmaven.mirrors参数并指定一个可用的镜像源,例如:
mvn clean install -Dmaven.test.skip -Denv=release -Dmaven.mirrors=http://mirrors.aliyun.com/nexus/content/groups/public/ -Dmaven.repo.local=${PWD}/repo
其中${PWD}/repo是本地存储Maven仓库的目录路径。
如果仍然无法解决问题,请检查您的网络连接和阿里云镜像源是否可用。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。