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-10-09 17:45:05