Configure Hudson+svn+maven under Windows

    Hudson is a powerful tool for code configuration management and an extensible continuous integration engine. Hudson is very easy to install and configure. It is simple and easy to use. Let's see how we can quickly build a continuous integration environment in a few minutes.

1. Install hudson:

  download address. http://www.eclipse.org/downloads/download.php?file=/hudson/war/hudson-3.3.1.war
Throw the downloaded war package directly under tomcat and start tomcat. Another way is to configure Hudson as a windows service, see the official website documentation for details. http://wiki.eclipse.org/Hudson-ci/Installing_Hudson_Windows_Service

Second, configure hudson:
     1. Visit http://localhost:8080/hudson/ in the browser , the first time you enter the default configuration screen
, you can choose according to your needs Install some plug-ins, choose svn, maven3 plug-ins, choose install, after installation, choose finish.
     2. First perform system settings.
          1) Permission setting.


 After selecting, you can register the user, and you can do any operation after logging in.

         2) Email alarm settings. System settings are set below. Configure System, set at the bottom.



    3. Create a new JOB and click new job in the upper left corner



 

 

Set the URL of the code svn. The svn url hudson will be checked by default. If authentication is required, there will be a prompt in the lower right corner to click to output username password. 

Check-out Strategy

This needs to be selected to update, otherwise the checkout will be slow every time.
 

 



 

 

Build Triggers, triggers are set as needed, generally not needed.

Build this place is the key. You can choose the build step according to your situation. linux sh, windows command, maven, ant, etc. What you need to pay attention to is the path problem. Since the code downloaded from svn is under the workspace by default, you can adjust your compilation directory according to the needs of the project. I tested the maven project, and you need to execute the mvn command in the root directory of the project. 

cd %WORKSPACE%/%JOB_NAME%/ module_test Your own project name.

mvn clean install

 

Post-build Actions E-mail Notification settings

If there is a problem with the build, it will send you an email according to your settings. After save, you're done.

 

Then go back to the home page, in the job just made, click build to compile, click Console to view the log.



 

 




 

 
 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326293721&siteId=291194637