Unknown lifecycle phase “”. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. 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, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1]http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
Reason 1:
Using Eclipse Maven plug-in [Run As]-[Maven build] did not specify a goal or phase for it
Solution.
Find the <build>
node in pom.xml, add <defaultGoal>compile</defaultGoal>
to it
Reason 2:
Using Eclipse Maven plugin [Run As]-[Maven build] with more mvn commands
Because the Eclipse Maven plugin has already prefixed the mvn command for you, manually outputting a command like mvn clean install will become mvn mvn clean install
Similar Posts:
- New Maven project — pom.xml error [How to Solve]
- Eclipse: Troubleshooting of error reports packaged with Maven
- [Solved] Maven install failed (package com.google.gson does not exist)
- Maven Error: No goals have been specified for this build [How to Solve]
- Idea Maven install is stuck. Check if there is no error report.
- [Solved] Maven Error: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean
- How to Solve compile error: package junit.framework does not exist
- mvn -V No goals have been specified for this build. You must specify a valid lifecycle phase……
- Maven Project Error: “No goals have been specified for this build” [How to Solve]
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?