这是在使用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的更多相关文章

  1. 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 ...

  2. Unknown lifecycle phase "mvn"

    Unknown lifecycle phase "mvn" maven执行命令错误  : 执行输入命令即可,不需要添加 mvn 此处不需要写mvn,而是执行写compile就行,否 ...

  3. 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 ...

  4. 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 ...

  5. 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] ------------------------------------------------------------- ...

  6. 应用程序发生异常 unknown software exception (0xc00000fd)... - 栈溢出(Stack overflow)

    今天在写程序的时候,弹出这样的提示对话框: 应用程序发生异常 unknown software exception (0xc00000fd): 相关代码是这样,在一个函数中读取一个csv文件,先根据这 ...

  7. 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 ...

  8. 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 ...

  9. ArcEngine 异常 :The index passed was not within the valid range.

    pRowBuffer.set_Value(pFds.FindField("W_Mean"), Re_mean[3]); 此句代码弹出异常:The index passed was ...

随机推荐

  1. 细品 - 逻辑回归(LR)

    1. LR的直观表述 1.1 直观表述 今天我们来深入了解一个人见人爱,花见花开,工业界为之疯狂,学术界..额,好像学术界用的不多哎.不过没关系,就算学术界用的不多也遮不住它NB的光芒,它就是LR模型 ...

  2. 62、django之MTV模型(urls,view)

    今天就进入到python最重要的阶段了django框架,框架就像胶水一样会将我们前面学的所有知识点粘合在一起,所以以前有哪些部分模糊的可以看看前面的随笔.本篇主要介绍djangoMTV模型,视图层之路 ...

  3. eclipse远程调试Linux环境下的web项目

    前提: 远程服务器上的代码和本地的代码同步 第一步 : 配置远程服务器下的startup.sh文件 在第一行添加 : declare -x CATALINA_OPTS="-server -X ...

  4. emacs 配置

    个人的Emacs配置,环境是archlinux,参考了不少网上资料,因为太多,就不一一列举了,在这里感谢那些作者的辛苦经验劳动. (custom-set-variables ;; custom-set ...

  5. ClassLoader 工作机制

    ClassLoader 采用上级委托接待机制加载 class JVM 平台提供三层 ClassLoader 1.Bootstrap ClassLoader:主要加载 JVM 自身工作需要的类 2.Ex ...

  6. 初学者易上手的SSH-hibernate03 三大状态与缓存

    这章主要来浅的学习下hibernate三大状态与缓存.首先来看下三大状态: 如上图,三大状态分别为临时状态(Transient),持久化状态(Persistent),游离状态(Detached).那么 ...

  7. Linux进程管理与作业控制

    进程和作业的关系:一个作业可以包含多个进程. 进程分类: 1. 交互进程:由一个shell启动的进程.交互进程既可以在前台运行,也可以在后台运行. 2. 批处理进程:这种进程和终端没有联系,是一个进程 ...

  8. 微信小程序获取微信的openid

    通过登录接口获取登录凭证,然后通过request请求后台获取openid,需要把后台域名放到小程序后台的request 合法域名内: 1.wx.login  获取登录凭证 2.wx.request 发 ...

  9. Ubuntu下OpenGL开发环境的搭建

    由于上了计算机图形学的课,老师叫我们安装OpenGL开发环境,晚上安装了一两个小时,终于搞定了. 1.      建立基本编译环境 sudo apt-get install build-essenti ...

  10. 一个比较实用的商业级图表Echarts

      了解了解                    ECharts,缩写来自Enterprise Charts,商业级数据图表,一个纯Javascript的图表库,可以流畅的运行在PC和移动设备上,兼 ...