*最近广东省内的网络环境问题,经常导致IDEA创建MAVEN项目时 Generating project in Batch mode 等待时间过长问题,本文将给出该问题的解决方法。* - 通过网络请求拦截器的观察,可以看到MAVEN是一直在请求如下这个网址。 ` http://repo1.maven.org/maven3/archetype-catalog.xml` - 因为网络环境问题该请求一直处于等待状态,所以在MAVEN配置文件中添加镜像即可解决该问题。 1. 打开maven目录下的conf/setting.xml,注意要是idea使用的maven。 2. 搜索 ;找到。在节点下添加。 3. 运行MVN命令的时候加上 -DarchetypeCatalog=local这个参数。 ```xml alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central ``` `IDEA -> SEARCH -> MAVEN -> RUNNER` Last modification:February 8, 2023 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 If you think my article is useful to you, please feel free to appreciate