Hudson+MAVEN+SVN+Tomcat实现快速构建

请先参见:http://quicker.iteye.com/blog/2321982和http://quicker.iteye.com/blog/2322029两文

有关部署只是ANT与MAVEN的区别

步骤:(只描述与ANT不同的部分)

1、安装hudson maven插件

2、系统配置maven主目录

3、任务配置maven相关

4、建立测试项目部署

详细步骤如下:

1、安装hudson maven插件



 

2、系统配置maven主目录


Hudson+MAVEN+SVN+Tomcat实现快速构建_第1张图片
 

3、任务配置maven相关


Hudson+MAVEN+SVN+Tomcat实现快速构建_第2张图片
 
Hudson+MAVEN+SVN+Tomcat实现快速构建_第3张图片
 

4、建立测试项目部署


Hudson+MAVEN+SVN+Tomcat实现快速构建_第4张图片


Hudson+MAVEN+SVN+Tomcat实现快速构建_第5张图片
 
 测试结果:


Hudson+MAVEN+SVN+Tomcat实现快速构建_第6张图片

 

注意:

MAVEN版本使用问题:

hudson3.3.3这个版本,如果使得我下载的maven最新版本apache-maven-3.3.9,在测试的时候报以下错误,后面我换成apache-maven-3.0.4没问题。

Parsing POMs
[workspace] $ D:\Java\jdk1.7.0_17/bin/java -cp F:\HudsonHome\plugins\maven-plugin\WEB-INF\lib\maven3-agent-3.0.2.jar;D:\Java\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar org.jvnet.hudson.maven3.agent.Maven3Main D:\Java\apache-maven-3.3.9 D:\Java\apache-tomcat-6.0.37\webapps\hudson-3.3.3\WEB-INF\lib\hudson-remoting-3.0.3.jar F:\HudsonHome\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-3.0.2.jar 56259
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f F:\HudsonHome\jobs\testdemomn\workspace\pom.xml package
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
	at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
	at hudson.remoting.UserRequest.perform(UserRequest.java:107)
	at hudson.remoting.UserRequest.perform(UserRequest.java:41)
	at hudson.remoting.Request$2.run(Request.java:276)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/cli/MavenLoggerManager
	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:73)
	... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.cli.MavenLoggerManager
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	... 19 more
channel stopped
ERROR: Failed to parse POMs

 
 

你可能感兴趣的:(系统构建)