在哈德森问题上创建maven工作

时间:2013-06-27 19:39:34

标签: continuous-integration hudson maven-3

我正在学习哈德森。我尝试在Tomcat 7中部署的Hudson 3.0.1中设置一个“Maven3项目”,当我尝试执行“clean install”时。首先我看到了以下警告:

[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

谁能让我知道这里有什么问题?如果有人会提到一些显示哈德森创造就业机会的文件,我将不胜感激。

由于

1 个答案:

答案 0 :(得分:0)

  
    org.codehaus.mojo的'build.plugins.plugin.version':缺少tomcat-maven-plugin

  

只需添加插件版本即可摆脱警告。这是comprehensive "tutorial"related question

  
    

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

  

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

您可以查看chapter 7 of the hudson book。它以clean install为例进行说明。