idea 中添加maven远程仓库
IDEA中本地MAVEN配置如图
查看仓库配置如图
配置第三方远程仓库,这里以阿里maven仓库为例,在pom.xml文件中添加配置
<repositories> <repository> <id>alimavenid> <name>Maven Aliyun Mirrorname> <url>http://maven.aliyun.com/nexus/content/repositories/central/url> <releases> <enabled>trueenabled> releases> <snapshots> <enabled>falseenabled> snapshots> repository> repositories>
编译程序时提示“Cannot access alimaven (https://maven.aliyun.com/repository/public/) in offline mode and the artifac”,解决办法取消 work offline 对勾,编译程序顺利通过