Error running ‘spring-boot-helloworld [package]’: No valid Maven installation found.

今天在敲一个springboot的程序,打jar包的时候停止在maven环境中

Error running ‘spring-boot-helloworld [package]’: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system
然后我就查看了自己idea中的maven设置。

file-settings-maven

上图是Maven home directory要更换一下maven路径。

网上说如果直接用的是别人的项目,maven版本会不兼容。我是自己另开了一个项目,有两个maven路径搞混了。

我干脆直接把之前的springboot项目那边加敲代码,用了之前的环境,jar打成了。

总结:就是尝试自己先敲一个简单的springboot程序,然后看看能不能打成jar包,看能不能跑起来。如果不能就用图上的截图方式更换一下maven版本,再不行就重装一下idea中的maven。

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值