编译maven项目出现Could not find artifact org.restlet.jee:org.restlet.parent:pom:2.2.1问题

本文介绍了三种解决Maven编译错误的方法:调整依赖版本、配置远程仓库及手动添加依赖到本地仓库。适用于遇到类似问题的开发者。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

经过几天的折腾,问题最终解决了。

出现的问题:

After correcting the problems, you can resume the build with the command
mvn <goals> -rf :csmp-agent-plugin-fc


解决方式三种:

第一种:首先查看maven仓库中保存的版本是多少,再修改编译项目csmp-agent-plugin-fc下pom.xml

修改前:

<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet</artifactId>
<version>2.2.1</version>
</dependency>

修改后:

<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet</artifactId>
<version>2.0.8</version>
</dependency>


第二种:在编译项目csmp-agent-plugin-fc下pom.xml添加如下配置

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.restlet.maven</groupId>
    <artifactId>org.restlet.maven.test</artifactId>
    <name>${project.artifactId}</name>
    <packaging>jar</packaging>
    <version>1.0.0-snapshot</version>

    <dependencies>
        <dependency>
            <groupId>org.restlet.jee</groupId>
            <artifactId>org.restlet</artifactId>
            <version>2.1.1</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>maven-restlet</id>
            <name>Public online Restlet repository</name>
            <url>http://maven.restlet.com</url>
        </repository>
    </repositories>
</project>

第三种:手动下载2.1.1版本放到本地仓库对应目录

http://maven.restlet.com/org/restlet/jee/org.restlet.parent/2.1.1/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值