为什么项目pom.xml显示此不可解析的错误

问题描述 投票:-3回答:1

Dont know whats wrong here. I cloned the project form the bitbucket repo. Upon importing the project as a existing maven project this is occuring

spring maven pom.xml
1个回答
0
投票

我认为问题在于您使用的是Spring引导的快照版本,并且这些依赖项在maven中心不可用,因此必须添加额外的存储库地址。

在pom.xml中的<project>组件中添加以下代码段

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
© www.soinside.com 2019 - 2024. All rights reserved.