异常:Unknown lifecycle phase "mvn". You must specify a valid lifecycle
这是在使用maven打包方式启动springboot项目时出现的异常,
我的异常原因属于下面的情况:
此时maven指令行为:mvn spring-boot:run.
如果写成这样会导致最终的maven指令为:mvn mvn spring-boot:run.
所以需要注意修改为:spring-boot:run即可.
还有一种可能,Maven插件[Run As]-[Maven build]时并未为其指定goal或phase
解决方法:
在pom.xml中找到
<build>
节点,
在里面加上
<defaultGoal>compile</defaultGoal>
即可
异常:Unknown lifecycle phase "mvn". You must specify a valid lifecycle的更多相关文章
- Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>
在用maven命令启动storm时候,命令行是:mvn exec:java -Dexec.mainClass="TopologyMain" -Dexec.args="sr ...
- Unknown lifecycle phase "mvn"
Unknown lifecycle phase "mvn" maven执行命令错误 : 执行输入命令即可,不需要添加 mvn 此处不需要写mvn,而是执行写compile就行,否 ...
- You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, i
[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal ...
- PowerShell 中使用 mvn 编译报错 Unknown lifecycle phase ".test.skip=true". 解决办法
nknown lifecycle phase “–Dmaven.test.skip=true”. You must specify a valid lifecycle phase or a goal ...
- maven 错误No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------- ...
- 应用程序发生异常 unknown software exception (0xc00000fd)... - 栈溢出(Stack overflow)
今天在写程序的时候,弹出这样的提示对话框: 应用程序发生异常 unknown software exception (0xc00000fd): 相关代码是这样,在一个函数中读取一个csv文件,先根据这 ...
- No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in t ...
- Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id
报错: [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or ...
- ArcEngine 异常 :The index passed was not within the valid range.
pRowBuffer.set_Value(pFds.FindField("W_Mean"), Re_mean[3]); 此句代码弹出异常:The index passed was ...
随机推荐
- C# 基础之类型(一)
一.类型 类型总共分为两种,一种是值类型(Value Type),如枚举.结构:另一种是引用类型(Reference Type),如类.接口.委托等. 值类型 1,值类型通常分配在线程的堆栈上 2,作 ...
- openwrt下 samba设置
1. 增加用户: 可以手工直接修改 /etc/passwd, 增加一行: samba:x:102:100::/home/samba:#也可命令如下opkg updateopkg install sha ...
- Tomcat Java.OutOfMemoryError : PermGen Space异常
背景:前些日子更新公司多年前一个旧平台发布到Tomcat上之后,频繁收到网站许多模块无法正常使用的反汇. 测试过程中发现平台发布一段时间后,访问相关网页出现如下500页面 解决方案:PermGen s ...
- 详解Java中的clone方法
详解Java中的clone方法 参考:http://blog.csdn.net/zhangjg_blog/article/details/18369201/ 所谓的复制对象,首先要分配一个和源对象同样 ...
- LeetCode 167. Two Sum II - Input array is sorted (两数之和之二 - 输入的是有序数组)
Given an array of integers that is already sorted in ascending order, find two numbers such that the ...
- django-rest-framework之序列化
前言:昨天学习了rest-framework序列化方面的知识,故写了博客记录一下.官网:http://www.django-rest-framework.org/tutorial/1-serializ ...
- Supervised Learning and Unsupervised Learning
Supervised Learning In supervised learning, we are given a data set and already know what our correc ...
- ES6 for-of循环和迭代器使用细节
SE5之前我们可以用for循环来遍历数组,SE5为数组引进了新的方法forEach(),方便了很多,但是该方法不能够通过break或者return返回外层函数. arr.forEach(functio ...
- Game of Connections
Game of Connections Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- zabbix 3.2 高可用实现方式一,亲测无坑
1.架构设计图 2.设计说明 1. 基础架构为LAMP环境,采用keepalived实现zabbix服务器高可用,保证主server的mysql或者httpd宕掉后能切换到从server. 2.数据库 ...