报错:

[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>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile,

解决方式:

打开pom.xml 在build节点中 增加

<defaultGoal>compile</defaultGoal>

...
<build>
<defaultGoal>compile</defaultGoal> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.3</version>
<configuration>
<groups>unit</groups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<compilerVersion>1.5</compilerVersion>
</configuration>
</plugin> </plugins>
</build>
</project>

  

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的更多相关文章

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

    打开pom.xml 在build标签中 增加 <defaultGoal>compile</defaultGoal> 如下: <build><defaultGo ...

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

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

  4. IDEA配置maven报错解决方案

    主要是得分清楚你的本地maven库,以及maven安装根目录 ,一般你自己安装maven成功后,电脑默认读取的库位置在C盘下面. 只要把路径指向搞对了,就没什么问题了 .

  5. Maven报错,没有有效的生命周期

    [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a g ...

  6. Maven 报错:Compilation of Maven projects is supported only if external build is started from an IDE.

    Maven 报错: Error:Maven Resources Compiler: Maven project configuration required for module 'yourProje ...

  7. 【maven 报错】maven项目执行maven install时报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

    在使用maven新建的web项目中,执行 执行如上的这两个操作,报错: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-co ...

  8. VS2008 安装WINCE插件报错 ToolsMsmCA(Error)解决方案___VS2008

    在win7系统,VS2008环境下安装EFMS9280_SDK.msi文件出现报错 ToolsMsmCA(Error):IHxFilters filter registration failure: ...

  9. 使用spring boot 2.1.8生成的maven项目pom.xml第一行报错unknown error

    问题:eclipse neon4.6.3新建springboot项目时pom.xml报错unknown error 原因: spring boot 2.1.8更新了maven插件,eclipse不兼容 ...

随机推荐

  1. Five Steps to Avoiding Java Heap Space Errors

    来自:https://www.mapr.com/blog/how-to-avoid-java-heap-space-errors-understanding-and-managing-task-att ...

  2. 最好使的歌词编辑工具--Beslyric

      https://www.cnblogs.com/BensonLaur/p/6262565.html 感谢开发这么好的工具! 下载地址:http://beslyric.320.io/BesBlog/ ...

  3. 一个简单的 JSON 生成/解析库

    这是一个单文件的,适用于C语言的, JSON 读写库. 先说明,不想造轮子,代码是从这里拿来的: https://www.codeproject.com/Articles/887604/jWrite- ...

  4. mvn test

    mvn -B install -Dmaven.test.skip=true -Dautoconfig.skipmvn -B org.codehaus.mojo:cobertura-maven-plug ...

  5. 要想找出以“y”结尾的名字

    要想找出以“y”结尾的名字:mysql> SELECT * FROM pet WHERE name LIKE '%y'“_”:匹配任何单个字符“%”:匹配任意数目字符(包括零字符)

  6. 特殊字符导致json字符串转换成json对象出错

    在对数据库取出来的数据(特别是描述信息)里面含有特殊字符的话,使用JSON.parse将json字符串转换成json对象的时候会出错,主要是双引号,回车换行等影响明显,左尖括号和右尖括号也会导致显示问 ...

  7. 严重: The web application [] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDB

    idea项目启动报如下错误, 网上的方法都试了都没用, 一直没解决, 干掉项目, 重新从svn检出就好了...坑 啊 Root WebApplicationContext: initializatio ...

  8. 转载:kafka c接口librdkafka介绍之二:生产者接口

    转载:from:http://www.verydemo.com/demo_c92_i210679.html 这个程序虽然我调试过,也分析过,但是没有记录笔记,发现下边这篇文章分析直接透彻,拿来借用,聊 ...

  9. 重写Checkbox 改写选择框的大小

    /* 作者:Starts_2000 * 日期:2009-07-30 * 网站:http://www.csharpwin.com CS 程序员之窗. * 你可以免费使用或修改以下代码,但请保留版权信息. ...

  10. SaltStack 入门到精通第三篇:Salt-Minion配置文件详解

    SaltStack 入门到精通第三篇:Salt-Minion配置文件详解 作者:ArlenJ  发布日期:2014-06-09 17:52:16   ##### 主要配置设置 ##### 配置 默认值 ...