Jenkins + maven + svn + tomcat for automatic deployment, jenkinsmaven

Source: Internet
Author: User

Jenkins + maven + svn + tomcat for automatic deployment, jenkinsmaven

Jenkins maven svn tomcat installation is skipped and Baidu is required.

1. log on to jenkins and create a maven project.

2. For source code management, select svn and make the following settings:

Repository URL: Path of the Code on svn

Credentials: username and password for logging on to svn

3. Build a trigger

Check Poll Scm, set the calendar to H/5 *****, and check for code updates every 5 minutes.

4. Build settings

Root POM: pom. xml

Goals and options: clean install

5. Set email notification to build the email address that fails to be sent

6. Post-build operations

WAR/EAR files: Path of the war package

Context path: Project path

Containers: tomcat8 used here

Credentials: the username and password used to access tomcat. Locate the tomat-users.xml In the conf file under the tomcat installation directory and add the following two lines of code

Rolename must be manage-script

Tomcat URL: tomcat path, set http: // 127.0.0.1: 8082/

7. The settings are complete, save, and build now. You must start tomcat before building it. Otherwise, the building fails.

Ps:

At the beginning of building an error was reported, some of the information said tomcat-users.xml files need to be set like this

Later I found that this is not the reason. The tomcat URL path is set incorrectly. The original http: // 127.0.0.1: 8082/hello/is to put the project in this directory. Correct settings are shown in, and placed in content path.

Before that, you need to configure jdk and maven in system Settings> global tool configuration.

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.