Am try to build my project using Maven on Eclipse. The first build was awesome. After that I get this error :
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.129s
[INFO] Finished at: Wed Nov 28 17:51:35 GST 2012
[INFO] Final Memory: 2M/121M
[INFO] ------------------------------------------------------------------------
[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, 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/NoGoalSpecifiedException
You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id> New! Save questions or answers and organize your favorite content. Learn more.
There are three built-in build lifecycles: default, clean and site. The default lifecycle handles your project deployment, the clean lifecycle handles project cleaning, while the site lifecycle handles the creation of your project's web site.
Maven is a build tool, but unlike ant
there is not "default" goal. So when you run
mvn
You are not supplying enough arguments, you need to run something like
mvn test
Where the second argument indicates where along the build lifecycle you wish to stop. Maven will then run every step up to the one you specified.
Some common stopping points
mvn compile (just compile)
mvn test (compile and run unit tests)
mvn package (compile, run unit tests, and build the distributable package)
mvn install (all of the above, and install distributable package into local repository.
Install is very useful if you need to build other packages which depend on changes
to this package)
mvn deploy (all of the above, and install package into remote (aka public) repository
for sharing with other developers)
You can set a goal through command or eclipse :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With