MAVEN的几个问题的解决方案

来源:互联网 发布:学播音主持软件 编辑:程序博客网 时间:2024/05/21 09:56

中央仓库慢

使用阿里云镜像

     <mirror>         <id>maven-aliyun</id>         <name>Maven Aliyun Mirror</name>         <url>http://maven.aliyun.com/nexus/content/groups/public</url>         <mirrorOf>central</mirrorOf>       </mirror>    

亲测速度极快
另外有几个备用镜像
1. http://www.sonatype.org/nexus/
2. http://mvnrepository.com/
3. http://repo1.maven.org/maven2
4.https://repo.spring.io/libs-snapshot/

建立项目失败或卡慢

使用create失败的时候换用generate
下载archetype-catalog.xml
放在maven仓库目录下
并使用-DarchetypeCatalog=local使它不从中央仓库下载archetype-catalog.xml

XML配置太复杂

这个……不妨试试Gradle
据说较新版的Gradle,项目可以和maven互转,不妨碍兼容性

0 0