java上的maven构建错误

时间:2014-11-12 12:57:50

标签: java maven

当我尝试构建maven时,我收到以下错误,如何纠正此错误。这是我的代码

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Gooru
[INFO] gooru-core
[INFO] Gooru Cassandra Core
[INFO] Gooru API
[INFO] gooru-mail
[INFO] Gooru Application - Rest V2 WAR(Spring MVC)
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Gooru 1.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Gooru ............................................. FAILURE [0.005s]
[INFO] gooru-core ........................................ SKIPPED
[INFO] Gooru Cassandra Core .............................. SKIPPED
[INFO] Gooru API ......................................... SKIPPED
[INFO] gooru-mail ........................................ SKIPPED
[INFO] Gooru Application - Rest V2 WAR(Spring MVC) ....... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.581s
[INFO] Finished at: Wed Nov 12 17:52:58 IST 2014
[INFO] Final Memory: 6M/149M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "Dmaven.test.skip=true". 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/LifecyclePhaseNotFoundException

1 个答案:

答案 0 :(得分:2)

您缺少-个字符。 做-Dmaven.test.skip=true

在命令行中定义属性时,正确的命令语法为-D加上属性名称,您可以查看有关它的更多信息here