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远程仓库

 

相关文章:

  • 2021-07-11
  • 2021-06-22
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-10-20
  • 2021-09-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案