持续集成环境(Hudson)搭建
- General steps:
- Possible problem and it`s solution
Build Hudson Continuous Integration Environment
General steps:
1. Install the jdk environment
You can dowload the jdk in ”deb” suffix (http://www.oracle.com/technetwork/java/javase/downloads/index.html). And using a command "dpkg -i deb file path" to install it.
Then you should set the environment. You can edit "/etc/profile" file, add followings to it`s tail :
JAVA_HOME=/home/liujicheng/java/jdk1.6.0_12
export JRE_HOME=/home/liujicheng/java/jdk1.6.0_12/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
2. Install hudson
On ubuntu, we always install a software with a file with a sufix "deb". You can download hudson with "deb" suffix (http://hudson-ci.org/) . And install it.
3. Install Vncserver
You can use command : "apt-get install tightvncserver".
4. Install subversion
You can use command : "apt-get install subversion".
5. Install svn
You can use command : "apt-get install svnkit".
6. Install smtp
You can use command : "apt-get install sendemail".
7. Configure hudson on hudson web page
The default port is 8080. You can reach to the page by visit "http://:<8080>", if you use the default port.
7.1 Plugins may needed to be installed.
SCP plugin, Gant Plugin, Hudson Emma plugin, Maven 2 job type plugin, Plot plugin, Hudson Dependency Viewer Plugin, Hudson Subversion Plug-in, Performance plugin, ChuckNorris Plugin, Hudson :: Maven 3 :: SNAPSHOT, MonitorJFreeChart Plugin, Maven 3 Build Plugin, Hudson CVS Plug-in, Maven Info Plugin, Measurement Plots, Sonar Plugin, Hudson Xvnc plugin, Hudson Mercurial plugin, Hudson disk-usage plugin, FTP publisher plugin, Redmine Plugin.
7.2 Configures hudson
Example:
8. Build a job
8.1 Build a new job
Example:
8.2 Copy a job
If you want to build a job which has same configuration with existing job
Example:
8.3 Configure a job
9. Commands of hudson
Start/stop/restart hudson : /etc/init.d/hudson start start/stop/restart
10. Install sonar
- Download zip file from official website.
- Unzip the file to any directory you want.
- Go to the directory named "bin" of sonar. Then you will see the version of system you should choose.
- Go to right directory and execute command:"sudo ./sonar.sh start".
- Sonar and other files should can be executed. You can use command:"sudo chmod 770 file_name".
- You can visit sonar by the address like: http://: . The default account: admin/admin.
Possible problem and it`s solution
1. Build JDK environment on ubuntu.
After jdk is installed, you need to set the jdk enironment. You can set a common jdk environment for every user through configuring "/etc/profile". In linux, the global profile always located in "/etc/"
2. Build Hudson Continuous Integration environment
3. Build a job
3.1 Lack vncserver software
Problem: FATAL: Cannot run program "vncserver" (in directory "/var/lib/hudson/jobs/csc_proto/workspace"): java.io.IOException: error=2, No such file or directory java.io.IOException: Cannot run program "vncserver" (in directory "/var/lib/hudson/jobs/csc_proto/workspace"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder?.java:488) at hudson.Proc$LocalProc.(Proc.java:187) at hudson.Proc$LocalProc.(Proc.java:157) at hudson.Launcher$LocalLauncher.launch(Launcher.java:649) at hudson.Launcher$ProcStarter.start(Launcher.java:266) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:94) at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:80) at hudson.model.Build$RunnerImpl.doRun(Build.java:129) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild?.java:434) at hudson.model.Run.run(Run.java:1390) at hudson.model.FreeStyleBuild.run(FreeStyleBuild?.java:40) at hudson.model.ResourceController.execute(ResourceController?.java:82) at hudson.model.Executor.run(Executor.java:137) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.(UNIXProcess.java:164) at java.lang.ProcessImpl.start(ProcessImpl?.java:81) at java.lang.ProcessBuilder.start(ProcessBuilder?.java:470) ... 12 more
Solution: Install a vncserver on the server. You can use command "apt-cache search vncserver" to find the vncserver software name, then use the command "apt-get install vncserver software name"
3.2 Having not set vncserver`s password
Problem: Another problem block the build process. The problem and solution are here:
The problem: Updating ............ revision: May 23, 2013 1:25:27 PM depth:infinity ignoreExternals: false U integration_tests/src/test/java/com/gsegment/.../PacketWorkflowTest.java At revision 2815 Starting xvnc [workspace] $ vncserver :78 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :82 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :59 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :86 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :60 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :23 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :92 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :79 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :37 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :73 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short Starting xvnc [workspace] $ vncserver :87 -localhost -nolisten tcp
You will require a password to access your desktops.
Password: Password too short FATAL: Failed to run 'vncserver :87 -localhost -nolisten tcp' (exit code 1), blacklisting display #87; consider checking the "Clean up before start" option java.io.IOException: Failed to run 'vncserver :87 -localhost -nolisten tcp' (exit code 1), blacklisting display #87; consider checking the "Clean up before start" option at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:110) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:108) at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:80) at hudson.model.Build$RunnerImpl.doRun(Build.java:129) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild?.java:434) at hudson.model.Run.run(Run.java:1390) at hudson.model.FreeStyleBuild.run(FreeStyleBuild?.java:40) at hudson.model.ResourceController.execute(ResourceController?.java:82) at hudson.model.Executor.run(Executor.java:137)
The solution: 1.You should login the serve with hudson, if you do not know the password you can reset it by administrate user. 2.Run command "vncserver".You need enter password at the first time you run this command. -- - 24 May 2013
The analysis: When you run the command "vncserver" at the first time ,you need set the password. Therefore, the server are waiting for your entering password, and can not go on running your command.
3.3 Having not put the "settings" file into maven home named ".m2"
*Problem:*org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project ...: Failed to deploy artifacts: Could not transfer artifact com.gsegment....: :pom:0.1-20130702.005529-277 from/to snapshots (...): Failed to transfer file:... . Return code is: 401, ReasonPhrase?:Unauthorized. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder?.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder?.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter?.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter?.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven?.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven?.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher?.java:79) 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:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 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:724) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact com.gsegment....:...:pom:0.1-20130702.005529-277 from/to snapshots (...): Failed to transfer file: ... . Return code is: 401, ReasonPhrase?:Unauthorized. at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo?.java:193) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager?.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:209) ... 27 more Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.gsegment....:...:pom:0.1-20130702.005529-277 from/to snapshots (...): Failed to transfer file:. Return code is: 401, ReasonPhrase?:Unauthorized. at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer?.java:141) at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo?.java:167) at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo?.java:149) ... 29 more Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.gsegment....:...:pom:0.1-20130702.005529-277 from/to snapshots (...): Failed to transfer file: ... . Return code is: 401, ReasonPhrase?:Unauthorized. at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer?.java:280) at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer?.java:211) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem?.java:443) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer?.java:137) ... 31 more Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.gsegment....:...:pom:0.1-20130702.005529-277 from/to snapshots (...): Failed to transfer file: http://.../nexus/content/repositories/snapshots/com/gsegment/.../.../0.1-SNAPSHOT/...-0.1-20130702.005529-277.pom. Return code is: 401, ReasonPhrase?:Unauthorized. at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector?.java:951) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector?.java:941) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector?.java:837) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector?.java:467) at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer?.java:274) ... 34 more Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file:http://.../nexus/content/repositories/snapshots/com/gsegment/.../.../0.1-SNAPSHOT/...-0.1-20130702.005529-277.pom. Return code is: 401, ReasonPhrase?:Unauthorized. at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon?.java:562) at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon?.java:471) at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon?.java:451) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector?.java:811)
The solution: You should put the "settings" file into ".m2" folder. If you installed hudson , ".m2" folder maybe located in hudson user home. Otherwise, you installed it by a "war" file, you can find it in the user who installed huson. If it still dose not work, you can use command " find / m2 |grep m2" to search if any other palce to set maven. Sometimes, you can find a settings file in the folder path : ".hudson/maven/slavebundle/bundled-maven/conf ".
Analysis: It says hudson is Unauthorized, must be caused by maven`s configuration file named "settings" is not existing or in wrong setting.
3.4 Having not installed subversion
Problem: [ERROR] Provider message: [ERROR] The svn command failed. [ERROR] Command output: [ERROR] /bin/sh: 1: svn: not found
mojoFailed org.apache.maven.plugins:maven-scm-plugin:1.8.1(default-cli) projectFailed com.gsegment....:...:0.1-SNAPSHOT sessionEnded [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] ... 中方科学中心原型系统 ................................... FAILURE [52.922s] [INFO] Core Class Module ................................. SUCCESS [1:37.187s] [INFO] Util .............................................. SUCCESS [18.339s] [INFO] VOEvent Router .................................... SUCCESS [5.058s] [INFO] VOEvent Generator ................................. SUCCESS [10.022s] [INFO] Packet Generator .................................. SUCCESS [2:26.334s] [INFO] Database Management System ........................ SUCCESS [29.147s] [INFO] Input and Output .................................. SUCCESS [3.428s] [INFO] Packet Ingest ..................................... SUCCESS [2:31.760s] [INFO] Electrical Ground Support Equipment ............... SUCCESS [24.669s] [INFO] VOEvent Ingest .................................... SUCCESS [3.863s] [INFO] Quick Look Assessment ............................. SUCCESS [22.936s] [INFO] Auxiliary data router ............................. SUCCESS [3.182s] [INFO] Auxiliary data generator .......................... SUCCESS [7.725s] [INFO] Wrapper for VT Simulator .......................... SUCCESS [3:00.464s] [INFO] voePublish Maven Webapp ........................... SUCCESS [18.261s] [INFO] Engineering Simulator ............................. SUCCESS [6.873s] [INFO] Auxiliary data ingest ............................. SUCCESS [8.945s] [INFO] Integration Tests ................................. SUCCESS [46.115s] [INFO] Hipe Plugin ....................................... SUCCESS [1:11.594s] [INFO] Bin Package for ... ......................... SUCCESS [1:55.598s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18:46.834s [INFO] Finished at: Tue Jul 02 09:44:06 CST 2013 [INFO] Final Memory: 94M/805M [INFO] ------------------------------------------------------------------------ mavenExecutionResult exceptions not empty org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.8.1:status (default-cli) on project ...: Command failed.The svn command failed. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder?.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder?.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter?.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter?.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven?.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven?.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher?.java:79) 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:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 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:724) Caused by: org.apache.maven.plugin.MojoExecutionException: Command failed.The svn command failed. at org.apache.maven.scm.plugin.AbstractScmMojo.checkResult(AbstractScmMojo?.java:439) at org.apache.maven.scm.plugin.StatusMojo.execute(StatusMojo?.java:56) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager?.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:209) ... 27 more Maven failed with error. channel stopped
The solution: You can install subversion with the command : " sudo apt-cache search subversion"
3.5 Svn upgrade
Problem: [ERROR] Provider message: [ERROR] The svn command failed. [ERROR] Command output: [ERROR] svn: E155036: Please see the 'svn upgrade' command svn: E155036: Working copy '/root/.hudson/jobs/csc_proto/workspace' is too old (format 8, created by Subversion 1.4)
mojoFailed org.apache.maven.plugins:maven-scm-plugin:1.8.1(default-cli) projectFailed com.gsegment....:...:0.1-SNAPSHOT sessionEnded [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] ... ................................... FAILURE [5.921s] [INFO] Core Class Module ................................. SUCCESS [15.966s] [INFO] Util .............................................. SUCCESS [18.526s] [INFO] VOEvent Router .................................... SUCCESS [4.937s] [INFO] VOEvent Generator ................................. SUCCESS [6.382s] [INFO] Packet Generator .................................. SUCCESS [1:38.734s] [INFO] Database Management System ........................ SUCCESS [18.027s] [INFO] Input and Output .................................. SUCCESS [3.736s] [INFO] Packet Ingest ..................................... SUCCESS [2:28.716s] [INFO] Electrical Ground Support Equipment ............... SUCCESS [31.217s] [INFO] VOEvent Ingest .................................... SUCCESS [4.040s] [INFO] Quick Look Assessment ............................. SUCCESS [22.190s] [INFO] Auxiliary data router ............................. SUCCESS [3.974s] [INFO] Auxiliary data generator .......................... SUCCESS [7.297s] [INFO] Wrapper for VT Simulator .......................... SUCCESS [2:57.208s] [INFO] voePublish Maven Webapp ........................... SUCCESS [7.241s] [INFO] Engineering Simulator ............................. SUCCESS [8.477s] [INFO] Auxiliary data ingest ............................. SUCCESS [8.651s] [INFO] Integration Tests ................................. SUCCESS [47.235s] [INFO] Hipe Plugin ....................................... SUCCESS [18.703s] [INFO] Bin Package for ... ......................... SUCCESS [2:00.218s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14:45.732s [INFO] Finished at: Tue Jul 02 10:34:38 CST 2013 [INFO] Final Memory: 85M/822M [INFO] ------------------------------------------------------------------------ mavenExecutionResult exceptions not empty org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.8.1:status (default-cli) on project ...: Command failed.The svn command failed. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder?.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder?.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter?.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter?.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven?.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven?.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher?.java:79) 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:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 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:724) Caused by: org.apache.maven.plugin.MojoExecutionException: Command failed.The svn command failed. at org.apache.maven.scm.plugin.AbstractScmMojo.checkResult(AbstractScmMojo?.java:439) at org.apache.maven.scm.plugin.StatusMojo.execute(StatusMojo?.java:56) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager?.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor?.java:209) ... 27 more Maven failed with error.
*The solution: * Go into the workspace directory, then run command: "svn upgrade"
3.6 How to change hudson home location
*Problem: * After we move hudson folder (such like :/home/root/.hudson) to another place, how hudson know that.
*The solution: * One way : You can change the environemt by append "HUDSON_HOME=/home/hudson/hudson-home/" to the file “/etc/profile”.
Another way : You can set hudson home in the file "web.xml" of hudson: <env-entry> <env-entry-name>HUDSON_HOME</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value></env-entry-value> </env-entry>