微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

关于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才能生效

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐