报错:

[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. Tomcat上文件的绝对路径访问笔记

    部署到Tomcat上的web项目的文件在代码中访问,可以先通过request获取到项目的根目录绝对路径,然后自己拼接子目录路径,直到文件.方法如下: String realpath=request.g ...

  2. Android File Transfer

    about a question in developing.. When you run app and created a file of db,but Android File Transfer ...

  3. PhpStorm 2017.1安装及破解过程

    1.下载原安装文件和破解文件:magnet:?xt=urn:btih:7FD357910B7AFBFC8FBA3647A2FAC8F15F0D02F0  (直接放到迅雷里下载) 2.Licence S ...

  4. 〖Linux〗Ubuntu14.04安装32位运行库

    在终端操作: sudo dpkg --add-architecture i386 echo "deb http://old-releases.ubuntu.com/ubuntu/ rarin ...

  5. php Socket表单提交学习一下

    <?php //发送请求指定的页面 $file = "1.php"; $filename = "gitignore.txt"; //文件名 $path = ...

  6. Eclipse和MyEclipse使用技巧--Eclipse中使用Git-让版本管理更简单

    详细步骤: 第一部分  GIT介绍 (1)GIT往世今生 2005年开发Samba的Andrew试图破解BitKeeper(一款商业的版本控制系统)的协议(这么干的其实也不只他一个),被BitMove ...

  7. Maven+Nexus+Jenkins+Svn+Tomcat+Sonar搭建持续集成环境

    使用Maven+Nexus+Jenkins+Svn+Tomcat+Sonar搭建持续集成环境(一) 2015-01-14 20:28 by 飘扬的红领巾, 4322 阅读, 5 评论, 收藏, 编辑 ...

  8. 修改windows默认的远程连接端口

    打开注册表,找到以下路径项,并修改为你想要的端口,重启服务器即可. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Serve ...

  9. 搭建 Node.js 环境

    安装 Node.js 环境 任务时间:5min ~ 10min Node.js 是运行在服务端的 JavaScript, 是基于 Chrome JavaScript V8 引擎建立的平台. 下载并安装 ...

  10. EntityFramework 5.0 CodeFirst 教程01-搭建环境和快速上手

    ----------------------------目录------------------------------ EntityFramework 5.0 CodeFirst 教程03-数据结构 ...