0

我正在学习哈德森。我尝试在 Tomcat 7 中部署的 Hudson 3.0.1 中设置一个“Maven3 项目”,然后尝试执行“全新安装”。首先我看到以下警告:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for     DummyProject :DummyProject :war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:tomcat-maven-plugin is missing. @ line 46, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

我在 POM 中有这个插件。我不知道为什么会出现这个警告。此警告之后是以下错误:

[INFO] ------------------------------------------------------------------------
[INFO] Building DummyProject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://localhost:8081/nexus/content/groups/public/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml
Downloaded: http://localhost:8081/nexus/content/groups/public/org/codehaus/mojo/tomcat-maven-    plugin/maven-metadata.xml (439 B at 2.1 KB/sec)
projectFailed DummyProject :DummyProject :0.0.1-SNAPSHOT
[HUDSON] Archiving C:\tomcat7\webapps\hudson-3.0.1\jobs\DummyProject\workspace\pom.xml to C:\tomcat7\webapps\hudson-3.0.1\jobs\DummyProject \modules\DummyProject $DummyProject \builds\2013-    06-27_10-58-26\archive\DummyProject \DummyProject \0.0.1-SNAPSHOT\pom.xml
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.234s
[INFO] Finished at: Thu Jun 27 10:58:29 PDT 2013
[INFO] Final Memory: 5M/245M
[INFO] ------------------------------------------------------------------------
mavenExecutionResult exceptions not empty
org.apache.maven.lifecycle.LifecyclePhaseNotFoundException: Unknown lifecycle phase "mvn". 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.
 [DEBUG] Skipping watched dependency update for build: DummyProject #2 due to result: FAILURE
Finished: FAILURE

谁能让我知道这里有什么问题?如果有人会参考一些文件,这些文件也显示了哈德逊的 Maven 就业机会,我将不胜感激。

谢谢

4

1 回答 1

0

org.codehaus.mojo:tomcat-maven-plugin 的“build.plugins.plugin.version”缺失

只需添加插件版本即可消除警告。这是全面的“教程”相关问题

未知的生命周期阶段“mvn”。您必须指定有效的生命周期阶段或目标

确保您的目标是clean install而不是mvn clean installmvn确实不是有效的生命周期阶段或目标

你可以看看哈德森书的第 7 章clean install它作为一个例子进行演示。

于 2013-06-27T20:38:16.820 回答