我首先描述我尝试过的东西。我在网络中创建了一个网络服务 豆。它工作正常。我想在我的项目中使用 GeoIP [链接][1] 所以[教程][2]说我用Maven安装。所以我有 下载了[专家][3]。然后我提取了整个文件夹并按照 添加环境变量的说明,我已经测试过了 在CMD中运行"
mvn -version
",到目前为止,每件事似乎都很好。 然后我想我必须将一个名为"pom"的 xml 文件添加到根目录 我的项目目录(网络服务(由于这个[文档][4]。 现在它说我必须运行这个:"mvn build
"。我在CMD中尝试过。 它告诉我目录不正确。我更改了CMD的 目录到"Web 服务"项目的根文件夹。和运行 MVN 版本。但我仍然有错误。
错误信息:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building geo-maven 1.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.116 s
[INFO] Finished at: 2014-08-13T12:48:00+04:30
[INFO] Final Memory: 5M/90M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "build". You must specify a valid lifecycle phas
e or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-ar
tifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate,
initialize, generate-sources, process-sources, generate-resources, process-resou
rces, compile, process-classes, generate-test-sources, process-test-sources, gen
erate-test-resources, process-test-resources, test-compile, process-test-classes
, test, prepare-package, package, pre-integration-test, integration-test, post-i
ntegration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site
, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException
now my mind is blowing.
please help me!
[1]: http://dev.maxmind.com/geoip/geoip2/geolite2/
[2]: http://maxmind.github.io/GeoIP2-java/
[3]: http://maven.apache.org/download.cgi
[4]: http://spring.io/guides/gs/maven/
您已经得到:未知的生命周期阶段"构建"。这意味着您给 mvn build 的命令几乎没有意义。
您可能已经阅读了 Maven 文档,例如生命周期简介,您将了解 maven 阶段和目标以发出正确的命令。
现在,请尝试最常见的 mvn 全新安装。