关于Maven中pom自动补全

写在前面

最近在使用maven时,遇到了pom不会补全的问题,解决方法如下

第一种

更新本地的仓库,在maven设置下的Repositories下,更新本地仓库

第二种

如果上面的方法不能解决的话
setting文件进行如下配置:

<?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>
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 简介 概述 Maven 是一个项目管理和整合工具 Maven 为开发者提供了一套完整的构建生命周期框架 Maven...
    闽越布衣阅读 4,325评论 6 39
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,853评论 18 139
  • |-1-更新内容[6.从仓库解析依赖的机制(重要)] 1Maven仓库作用 仓库用来存储所有项目使用到构件,在ma...
    zlcook阅读 6,108评论 0 25
  • maven maven是一个跨平台的项目管理的工具。隶属于Apache下的一个开源项目。主要服务于Java平台的项...
    jwfy阅读 897评论 0 2
  • 2016即将完美谢幕,2017也即将完美起航。2017年,愿一切都是最好的安排,加油吧,亲爱的自己。 ------...
    英荣摆渡ly阅读 328评论 0 0