Maven编辑出现Process terminated

  今天在编译某个 Maven 项目的时候突然出现了 Process terminated 的错误提示,咋眼一看心生疑惑:我平时按照这样执行都好好的,为啥今天就不行了呢。

原因一

我只是很单纯地执行了个“clean”命令,怎么就被突然终止了呢?于是找到了较为完整的执行过程日志信息,如下:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 3, column 110
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.hy:hy-blogs:0.0.1-SNAPSHOT (/Users/hy/code_repository/hy-blogs/pom.xml) has 1 error
[ERROR]     'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 3, column 110
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

看完这一段日志,仿佛明白了点儿什么,因为上面的日志中已经说明了是什么错误异常导致的执行“clean”被终止。重点就是这句

[ERROR]     'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 3, column 110

大概意思就是说不能指定打包类型为 jar,必须要指定为 pom。于是乎,我便跟着指引,将 pom.xml 文件中的 “packaging” 配置为了 “pom”,如下:

...
<groupId>com.hy</groupId>
<artifactId>hy-blogs</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
...

原因二

当我再次执行“clean”的时候,本以为它会顺利执行完成,结果没想到还是提示 Process terminated ,这就纳闷儿了,我不是按照提示修改了,咋还会这样呢。没办法,只能继续看看日志了,日志如下:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 20, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 25, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.hy:office:0.0.1-SNAPSHOT (/Users/hy
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值