码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-03-13 21:29:20      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:color   har   解决方案   include   def   节点   rbo   tle   cycle   

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>

 

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

标签:color   har   解决方案   include   def   节点   rbo   tle   cycle   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!