Jenkins+maven+svn+tomcat Operation Manual (i)

Source: Internet
Author: User

1.1 Overview

The most common build tool in enterprise development is MAVEN, so the vast majority of projects are developed using MAVEN. In the project development process, often need to do is the project compilation, packaging and release of these repetitive things. How to do the automatic processing of these tedious and boring work is the problem that this article needs to solve.

The solution is to use Jenkins as a tool to help us.

1.2 Preparation conditions

The premise is that the computer already has a Java development environment: Jdk+eclipse (or Myeclipse/netbeans, etc.) +tomcat+svn.

I am the environment of the machine:
System:win7 64
Jdk:1.7.0_45
Eclipse:luna Service Release 2 (4.4.2)
tomcat:7.0.47
maven:3.2.1
tortoisesvn:1.6.16
visualsvn:3.5.1

1.3 Installing the software 1.3.1 Installing Jenkins

: https://jenkins.io/index.html or you can download the appropriate installation files from the http://mirrors.jenkins-ci.org/.
There are two ways to install Jenkins in a Windows environment: one is to download the *.zip compressed file package directly with the Windows installation file with the. msi suffix.

1.3.1.1 War Package mode (for various system)

1. Download the war file directly and copy it to the WebApps directory of Tomcat:

2. Then start tomcat directly and the output information is as follows:

This diagram shows that the deployment was successful.
3. Enter the following address in the browser (the port is set by itself, Tomcat defaults to 8080, here I am 9091): http://localhost:9091/jenkins/

In this way, Jenkins will generate the corresponding Jenkin workspace under C:\Users\Administrator.jenkins, where Administrator is the user name of his native computer:

1.3.1.2 MSI mode (only for Windows environments)

If the download is in MSI mode, as shown in:

For this kind of file, we only need the normal installation, after the successful installation, the corresponding service will appear in the list of services:

As soon as this service is started, Jenkins (the default port is 8080) can be accessed normally:
http://localhost:8080/


This way the Jenkins workspace is in its installation directory under D:\Program Files (x86) \jenkins:

1.3.2 Configuring Jenkins

After Jenkins installs, some plugins are installed automatically, but these plugins do not fully meet our needs, and we need to reinstall the new plugins.

Installing the plugin in Jenkins is fairly straightforward, just install it online in the Web console, and if the installation fails, you can try a few more times, because sometimes the network problem may cause the installation to fail.

1.3.2.1 installing the automatic deployment plug-in

"System Management"-"management plug-in":

Click on the Optional Plugin tab and enter deploy to in the filter input box in the upper right corner to see the results of the search, select Deploy to Container Plugin: then click Install directly:

After clicking on the direct installation, we will go to the Download installation page below, in order to see the progress of the download in real time, we can click the < allow auto Refresh > button in the upper right corner:

Of course we can also choose the bottom of the < after the installation to restart the Jenkins (idle) > This option, so that after the plug-in installation is completed to restart Jenkins, so that the plug-in to take effect, here we need to install more plug-ins, after the installation of the reboot can be:

At this point, the Deploy to container plugin This plugin has been installed, is not quite simple.

1.3.2.2 Install role Rights Management plug-in

When we want to use Jenkins, we first need to log in, which involves the management of user roles and permissions, at which point we need to install role-based Authorization strategy:

The installation is complete as follows:

At this point, all of our plugins have been installed, you can select the bottom option for the Jenkins restart operation:

1.3.2.3 Roles and Permissions configuration

The previous step was to install the plug-in, the bottom is to start using Jenkins, we need to log in before use, where the role and permissions to manage.

First, we need to enable the role Rights Management plug-in:

To enable:

After clicking Save, we will see Manage and Assign Roles in the Returned system administration list:

Click Manage and Assign roles go in, such as:

Add the corresponding roles according to your needs, which we can change according to the needs of project management, here is just a demonstration.

Below you can apply the role you just created:

Next, we perform the user registration operation:

Click Sign In:

This is the login success! The next step is to create the job to use, which we put into the deployment chapter for instructions.

1.3.2.4 precautions

Note: When installing the plug-in, there may be a problem with the network, there will be an update and optional plugin two tab list is empty, this need to check your network problems. If that doesn't work, you can only download the control from the Web yourself and then import it in Jenkins:

Because this kind of import is not very convenient, I haven't done the test yet.

Next we deploy: Jenkins+maven+svn+tomcat operation manual (ii)

Jenkins+maven+svn+tomcat Operation Manual (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.