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