Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle

Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle

报错:

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

        <finalName>CharlieWebDemo</finalName>
        <resources>
            <!--表示把java目录下的有关xml文件,properties文件编译/打包的时候放在resource目录下-->
            <resource>
                <directory>${basedir}/src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <!--mybatis 逆向工程插件-->
            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.5</version>
                <configuration>
                    <verbose>true</verbose>
                    <overwrite>true</overwrite>
                </configuration>
            </plugin>
        </plugins>
    </build>

原文地址:https://www.cnblogs.com/2549372994jing/p/10526185.html

时间: 2024-08-10 17:03:15

Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle的相关文章

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] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.079 s [INFO] Fin

IDEA配置maven报错解决方案

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

Error:Cannot build artifact &#39;XXX:war exploded&#39; because it is included into a circular dependency (artifact &#39;XXXX:war exploded&#39;, artifact &#39;XXX:war exploded&#39;) Idea启动项目报错解决方案

在Idea中使用Maven创建父子工程,第一个Model的那个项目可以很好的运行,在创建一个Model运行时报这个错.原因是tomcat部署了多个Web项目,可能最开始是两个项目的配置文件混用用,最后就报这个错. 网上找的解决方案: 步骤:File--  Porject Struccture ---- Artifacts 在Tomcat部署时war和war exploded区别: war模式:将WEB工程以包的形式上传到服务器 : war exploded模式:将WEB工程以当前文件夹的位置关系

Xcode - xcode-select: error: tool &#39;xcodebuild&#39; requires Xcode报错解决方案

用mac 自带的终端执行的命令,安装安装Vapor和toolbox 安装指令: macdeMacBook-Pro:~ mac$ curl -sL check.vapor.sh| bash 结果报这个错误: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools

使用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不兼容. 解决方法: 在pom.xml的中加入maven-jar-plugin的版本或把spring boot降到2.1.4及以下即可,然后update projects就可以了. 1 <parent> 2 <groupId>org.springframework.boot</grou

MyEclipse10破解replaceJar一步报错解决方案

MyEclipse10破解replaceJar一步报错解决方案 前段时间MyEclipse10到期了,于是去找破解.网上倒是有一个给力的破解器--MyEclipse 9.x Crack.不过在按照步骤破解时却意外的报了一个错误:在进行到replaceJar这一步时,按照步骤的说明应该会弹出一个文件选择框,然后选中MyEclipse目录->Common->plugins目录.但是这里却无法弹出文件选择器,此时查看控制台会发现错误信息: 似乎和操作系统有关? 看看按下replaceJar按钮后的处

Maven报错“未结束的字符串字面值” “需要为 class、interface 或 enum”等

eclipse里面编译完全正常,mvn clean install 这么惨的错误: Compilation failure: [ERROR] *.java:[38,27] 未结束的字符串字面值 [ERROR] *.java:[38,53] 需要 ';' [ERROR] *.java:[41,19] 需要 ')' [ERROR] *.java:[41,12] 不是语句 [ERROR] *.java:[41,23] 需要 ';' [ERROR] *.java:[41,26] 不是语句 [ERROR]

Ubuntu 14.04.2 root登陆报错解决方案

I. 报错信息 Error found when loading /root/.profile:stdin: is not a ttyAs a result the session will not be configured correctly. You should fix the problem as soon as feasible. II. 解决方案 gedit /root/.profile mesg n -> tty -s && mesg n III. 相关资料 &quo

安装opesntack mysql报错 解决方案

安装opesntack mysql报错 ERROR : Error appeared during Puppet run: 192.168.1.103_mysql.ppError: mysqladmin -u root  password 'f40e1dec1deb43d3' returned 1 instead of one of [0] # rpm -qa | grep -i mysqlmysql-server-5.1.71-1.el6.x86_64perl-DBD-MySQL-4.013-