多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
1)安装插件 Maven Integration plugin Deploy to container Plugin ![](https://box.kancloud.cn/8ad6bae9c80c5eb62cec6ad183bb216f_995x88.png) ![](https://box.kancloud.cn/c09a6d25dcef03bac93ebfbde8916fb3_1010x174.png) 2)构建一个Maven项目来发布java ![](https://box.kancloud.cn/ccf5b93f8a0f169f0e63dfc8a2cf0651_1091x465.png) ![](https://box.kancloud.cn/bb405408edcfbcc526adec727acdc49b_987x527.png) ![](https://box.kancloud.cn/c00226f87bc66887ef8a8359f8b9bad2_998x560.png) 发送邮件 ![](https://box.kancloud.cn/7889b189bae806b55a90c58ce7535d14_1010x484.png) 3)部署war包到远程 ![](https://box.kancloud.cn/86b6e63d281f034dfb4a5483603e7b70_999x342.png) 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服务器上配置 ![](https://box.kancloud.cn/a8a30a535ac273c9a08564fe2d501a64_1029x378.png)