1)安裝插件
Maven Integration plugin
Deploy to container Plugin


2)構建一個Maven項目來發布java



發送郵件

3)部署war包到遠程

3.1)配置tomcat (熱部署)
[root@static manager]# vim META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|10.2.18.*|10.2.11.*" />
</Context>
3.2)
[root@static tomcat]# vim conf/tomcat-users.xml
添加如下
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="Deploy" password="Deploy.123456" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-status,manager-jmx,manager-script"/>
(以上為測試使用)
3.3)在jenkins服務器上配置

- 第一章:Jenkins的基本介紹
- 第二章:Jenkins服務器安裝
- 第一節:在Centos6.8系統上安裝Jenkins服務器
- 第三章:Jenkins服務器配置
- 第一節:jenkins更換初始登錄密碼
- 第二節:全局工具配置
- 第三節:安裝插件
- 第四節:jenkins中配置git
- 第五節:jenkins中配置Publish Over SSH
- 第六節:jenkins郵件配置
- 第七節:Jenkins進階-獲取git tags代碼
- 第八節:Jenkins權限配置錯誤,導致無法登錄
- 第九節: jenkins通過釘釘發送消息
- 第四章:使用 Sonar 進行代碼質量管理
- 第一節:sonar概述
- 第二節:Sonar的安裝
- 第三節:sonar安裝插件
- 第四節:sonar報錯
- 第五節:代碼分析
- 第五章: 持續集成
- 第一節:GitLab觸發jenkins構建項目
- 第六章:jenkins 2.0 pipeline 從入門到精通
- 第一節:jenkins2 hello pipeline
- 第二節:jenkins pipeline基本概念
- 第七章:jenkins部署實戰
- 第一節:jenkins部署php代碼(一)
- 第二節:jenkins部署java代碼(一)
- 第三節:jenkins部署java代碼(pom.xml)二
- 第四節:jenkins部署php代碼(根據tags)
- 第五節:jenkins部署android代碼
- 第八章:jenkins項目構建配置
- 第一節: jenkins參數化構建過程