开发者社区> 问答> 正文

Canal 源代码编译错误

[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

展开
收起
后端老大 2023-04-26 15:41:44 240 0
2 条回答
写回答
取消 提交回答
  • 根据错误提示,该问题可能是由于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仓库的目录路径。

    如果仍然无法解决问题,请检查您的网络连接和阿里云镜像源是否可用。

    2023-05-23 16:39:25
    赞同 展开评论 打赏
  • org.sonatype.oss:oss-parent:pom,这个文件下载不了

    原回答者GitHub用户agapple

    2023-04-26 18:31:39
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载