在IDEA中创建maven项目发生 [error] maven execution terminated abnormally (exit code 1)错误

第一次用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> 

配置成功后的项目目录结构:
配置成功后的项目目录结构

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值