One - One Code All

Blog Content

IDEA创建MAVEN项目卡住,修改为阿里镜像mirror

Java   2014-02-15 16:07:35


IDEA创建MAVEN项目卡在Generating project in Batch mode。是MAVEN一直在请求:


 http://repo1.maven.org/maven2/archetype-catalog.xml

这个项目目录的xml文件,由于墙的问题,加载缓慢,等待时间十分漫长。

解决方法:修改setting.xml文件,把mirror改成阿里的镜像。


①:打开maven目录下的conf/setting.xml,注意要是idea使用的maven。


②:搜索 ;找到。在节点下添加。



      alimaven
      aliyun maven
      http://maven.aliyun.com/nexus/content/groups/public/
      central        



③:运行MVN命令的时候加上 -DarchetypeCatalog=local这个参数。在IDEA中:


Maven-Runner-VM Options 加上:-DarchetypeCatalog=local



idea创建项目没有src文件:就是本地maven的配置文件和仓库地址不一致



上一篇:python的dataframe和matrix的互换
下一篇:airflow中dag上下文context传参数

The minute you think of giving up, think of the reason why you held on so long.