Jenkins remotely publishes projects through MAVEN's Tomcat7-maven-plugin

Source: Internet
Author: User

First, the Environment preparation

Two servers

Jenkins Server yum install and configure Maven

Tomcat Server Tomcat version apache-tomcat-8.0.33.tar.gz

JDK version jdk-8u77-linux-x64.tar.gz

Tomcat to deploy the manager project with Tomcat rights support

Tomcat Tomcat-users.xml as configured

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8B/02/wKiom1hBIXOTwpTqAAAMEXLlYZM251.png "title=" Tomcat Configuration "alt=" Wkiom1hbixotwptqaaamexllyzm251.png "/>

The username and password here are consistent with the MAVEN settings server written below.




Second, configuration management

Maven Settings File configuration

1. Add in the plugingroups tag

<plugingroup>org.apache.tomcat.maven</plugingroup> To allow the use of unofficial tomcat7-maven-plugin;


2. Add in the servers tag

<server>

<id>tomcat</id>

<username>tomcat</username>

<password>12345611</password>

</server>

Authorizing Tomcat user access rights


3. Join in Profiles

<profile>

<id>soa</id>

<properties>

<!--Tomcat Begin--

<tomcat.hostname>192.168.2.77</tomcat.hostname>

<tomcat.port>8040</tomcat.port>

<!--Tomcat End--

</properties>

</profile>

Specify the configuration file


Add tomcat7-maven-plugin configuration to Project Pom


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8A/FE/wKiom1hAz0awVFpxAABL3ho73HM726.png-wh_500x0-wm_3 -wmp_4-s_3189003623.png "title=" plug-in Information "alt=" Wkiom1haz0awvfpxaabl3ho73hm726.png-wh_50 "/>

The variables in the URL tomcat.hostname and Tomcat.port are assigned in Maven settings profile (written above), Tomcat in the Server tab and maven settings Same as the ID in servers


Iii. Creating a Jenkins Job


Main configuration source management and build


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8B/02/wKiom1hBJ5nTBXgQAACWTk-U0mY560.png "title=" + "alt = "Wkiom1hbj5ntbxgqaacwtk-u0my560.png"/>


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8B/02/wKiom1hBJ0qz-NGgAABinA2eolc549.png "title=" + "alt = "Wkiom1hbj0qz-nggaabina2eolc549.png"/>





This article is from the technical Documentation blog, so be sure to keep this source http://jiangzm.blog.51cto.com/8314502/1878894

Jenkins remotely publishes projects through MAVEN's Tomcat7-maven-plugin

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.