其他分享
首页 > 其他分享> > idea 中添加maven远程仓库

idea 中添加maven远程仓库

作者:互联网

IDEA中本地MAVEN配置如图

 

 查看仓库配置如图

 

 配置第三方远程仓库,这里以阿里maven仓库为例,在pom.xml文件中添加配置

<repositories>
        <repository>
            <id>alimaven</id>
            <name>Maven Aliyun Mirror</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

编译程序时提示“Cannot access alimaven (https://maven.aliyun.com/repository/public/) in offline mode and the artifac”,解决办法取消 work offline 对勾,编译程序顺利通过

 

标签:仓库,idea,maven,aliyun,alimaven,offline,com,远程
来源: https://www.cnblogs.com/zsg88/p/15547770.html