关于Maven中pom自动补全

第一种
更新本地的仓库,在maven设置下的Repositories下,更新本地仓库
第二种
如果上面的方法不能解决的话
setting文件进行如下配置:
文件路径:maven安装目录的配置文件
如:E:\software\maven\apache-maven-3.8.1\conf\setting.xml

<?xml version="1.0"?>  
<settings>  
<localRepository>/home/yizhenn/.m2/repository</localRepository>  
    <mirrors>  
        <mirror>  
            <id>alimaven</id>  
            <name>aliyun maven</name>  
            <url>https://maven.aliyun.com/nexus/content/groups/public/</url>  
            <mirrorOf>central</mirrorOf>  
        </mirror>  
    </mirrors>  
  <profiles>  
    <profile>  
       <id>nexus</id>   
        <repositories>  
            <repository>  
                <id>nexus</id>  
                <name>local private nexus</name>  
                <url>https://maven.oschina.net/content/groups/public/</url>  
                <releases>  
                    <enabled>true</enabled>  
                </releases>  
                <snapshots>  
                    <enabled>false</enabled>  
                </snapshots>  
            </repository>  
        </repositories>  
           
        <pluginRepositories>  
            <pluginRepository>  
            <id>nexus</id>  
            <name>local private nexus</name>  
            <url>https://maven.oschina.net/content/groups/public/</url>  
            <releases>  
                <enabled>true</enabled>  
            </releases>  
            <snapshots>  
                <enabled>false</enabled>  
            </snapshots>  
            </pluginRepository>  
        </pluginRepositories>  
    </profile>  
    </profiles>  
</settings>

注意改变后要重启idea才能生效

相关文章

前言 此种方式已过时,不再推荐,当下推荐方式:自我救赎 →...
前言 项目中用到了maven,而且用到的内容不像利用maven/ecli...
开心一刻 今天去幼儿园接小侄女,路上聊起了天 小侄女:小叔...
本篇文章和大家了解一下怎么搭建maven私有仓库。有一定的参考...
今天小编给大家分享的是如何解决Maven依赖冲突,相信很多人都...
这篇文章主要介绍了Maven仓库分类的优先级是什么的相关知识,...