第一次用idea来创建maven项目的时候发生了[error] maven execution terminated
abnormally (exit code
1)错误,导致maven项目没有骨架生成,只有**.idea目录,和pom.xml文件,个人认为应该是settings文件配置有点问题**
做了以下解决:
1.重新解压从maven官网下载的zip包,更改path配置路径
2.配置maven解压后的conf目录中的settings.xml文件
添加localRepository标签,中间配置为maven将要下载所有jar包(国内私服仓库中下载)存放的目录
<localRepository>D:/自定义仓库地址</localRepository>
在mirrors标签中加入了一下代码(是用阿里云的maven仓库,推荐):
<mirror>
<id>nexus-aliyun</id>
<name>nexus-aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
配置成功后的项目目录结构: