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 对勾,编译程序顺利通过

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM