参考:https://www.digitalocean.com/community/questions/how-to-access-tomcat-8-admin-gui-from-different-host

https://codehaus-cargo.github.io/cargo/Tomcat+8.x.html

在 $TOMCAT_HOME/conf/tomcat_users.xml 下增加用户

修改 $TOMCAT_HOME/webapps/manager/META-INF/context.xml

注解 <Value> 一行。

可以在非部署机器上访问 tomcat,如果能点进去右边的管理菜单,则基本上差不多了。有问题也是 role 角色问题了。

下面是 demo 的 pom 文件

 1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 2     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 3     <modelVersion>4.0.0</modelVersion>
 4     <groupId>org.aisino.maven</groupId>
 5     <artifactId>fpt-fpkj</artifactId>
 6     <packaging>war</packaging>
 7     <version>0.0.1-SNAPSHOT</version>
 8     <name>fpt-fpkj Maven Webapp</name>
 9
10     <properties>
11         <!-- 文件拷贝时的编码 -->
12         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14         <!-- 编译时的编码 -->
15         <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
16     </properties>
17
18     <dependencies>
19         <dependency>
20             <groupId>junit</groupId>
21             <artifactId>junit</artifactId>
22             <version>4.7</version>
23             <scope>test</scope>
24         </dependency>
25         <dependency>
26             <groupId>servletapi</groupId>
27             <artifactId>servlet-api</artifactId>
28             <version>2.4</version>
29             <scope>provided</scope>
30         </dependency>
31         <dependency>
32             <groupId>javax.servlet.jsp</groupId>
33             <artifactId>jsp-api</artifactId>
34             <version>2.0</version>
35             <scope>provided</scope>
36         </dependency>
37         <dependency>
38             <groupId>commons-codec</groupId>
39             <artifactId>commons-codec</artifactId>
40             <version>1.9</version>
41         </dependency>
42         <dependency>
43             <groupId>org.apache.axis</groupId>
44             <artifactId>axis</artifactId>
45             <version>1.4</version>
46         </dependency>
47         <dependency>
48             <groupId>org.lucee</groupId>
49             <artifactId>jaxrpc</artifactId>
50             <version>1.4.0</version>
51         </dependency>
52         <dependency>
53             <groupId>wsdl4j</groupId>
54             <artifactId>wsdl4j</artifactId>
55             <version>1.6.1</version>
56         </dependency>
57         <dependency>
58             <groupId>commons-discovery</groupId>
59             <artifactId>commons-discovery</artifactId>
60             <version>0.2</version>
61         </dependency>
62     </dependencies>
63     <build>
64         <finalName>fpt-fpkj</finalName>
65         <plugins>
66             <plugin>
67                 <groupId>org.codehaus.cargo</groupId>
68                 <artifactId>cargo-maven2-plugin</artifactId>
69                 <version>1.4.9</version>
70                 <configuration>
71                     <container>
72                         <containerId>tomcat8x</containerId>
73                         <type>remote</type>
74                     </container>
75                     <configuration>
76                         <type>runtime</type>
77                         <properties>
78                             <cargo.remote.username>test</cargo.remote.username>
79                             <cargo.remote.password>123456</cargo.remote.password>
80                             <cargo.remote.uri>http://10.70.8.36:8080/manager/text</cargo.remote.uri>
81                         </properties>
82                     </configuration>
83                 </configuration>
84             </plugin>
85         </plugins>
86     </build>
87 </project>

tomcat 版本不同,配置稍有变化,详情可以参考官方文档。

转载于:https://www.cnblogs.com/microcat/p/7263109.html

Maven--Cargo远程部署相关推荐

  1. Eclipse利用Maven的插件部署web项目到远程tomcat服务器

    使用maven的自动部署功能可以很方便的将maven工程自动打包并且部署到远程tomcat服务器,省去一些繁琐的操作,节省大量时间. 我使用的tomcat版本是8.5,tomcat7和tomcat8都 ...

  2. idea插件tomcat8-maven-plugin远程部署项目~

    简介: 在项目中时常需要部署项目,在程序员的工作中大部分时间,不是再解决bug,就是在部署项目的路上,有得时候各种各样的环境,部署时间就占用了一大半. 解决方案: 1.开启tomcat的远程部署,修改 ...

  3. 解放双手 | Jenkins + gitlab + maven 自动打包部署项目

    前言 记录 Jenkins + gitlab + maven 自动打包部署后端项目详细过程! 需求背景 不会偷懒的程序员不是好码农,传统的项目部署,有时候采用本地手动打包,再通过ssh传到服务器部署运 ...

  4. git maven 一键部署_Jenkins Git Maven搭建自动化部署项目环境 邮件通知

    简介 折腾了两个晚上,趁着今晚比较有空,把jenkins+git+maven搭建自动化部署项目环境搭建的过程记录一下,这里我把github作为git的远程仓库(https://github.com/j ...

  5. cargo maven_用于集成测试的Maven Cargo插件

    cargo maven 在项目生命周期中,非常普遍的需求是设置集成测试. 幸运的是,Maven在默认构建生命周期的以下阶段(来自Maven 文档 )具有对这一确切方案的内置支持: 集成前测试 : 执行 ...

  6. 用于集成测试的Maven Cargo插件

    在项目生命周期中,非常普遍的需求是设置集成测试. 幸运的是,Maven具有针对此确切方案的内置支持,具有默认构建生命周期的以下阶段(来自Maven 文档 ): 集成前测试 : 执行集成测试之前所需的操 ...

  7. php脚本实现git自动化,使用PHP脚本远程部署git项目

    准备工作: 1.coding.net创建私有项目 2.安装了Web服务 Git服务的服务器 服务器端: 1.nginx.php-fpm统一用www用户 www 目录,这个可以通过修改配置文件实现. [ ...

  8. 使用IntelliJ IDEA 集成阿里提供的 Alibaba Cloud Toolkit插件,实现自动化远程部署Java项目(jar包,war包两种方式)

    打开IntelliJ IDEA编译器,点击文件==>点击设置(setting) 在设置页面点击插件(英文应该是 Plugins ,对IntelliJ IDEA汉化感兴趣的同学可以在这个页面搜索 ...

  9. Python远程部署利器Fabric详解

    http://www.bjhee.com/fabric.html Fabric是一个Python的库,它提供了丰富的同SSH交互的接口,可以用来在本地或远程机器上自动化.流水化地执行Shell命令.因 ...

  10. SQL Server远程部署

                SQL Server 2000+SP3远程部署 1.        首先介绍下操作环境 本次实验采用Microsoft Virtual PC 2007以及两台Windows S ...

最新文章

  1. 10w行级别数据的Excel导入优化记录
  2. 数据库服务器管理系统,数据库管理系统服务器
  3. 160329(二)、web.xml配置详解
  4. 《大型网站技术架构》读书笔记四:瞬时响应之网站的高性能架构
  5. Redis:安装、配置、操作和简单代码实例(C语言Client端)[转]
  6. idea gui插件_给IDEA换个酷炫的主题,这个有点哇塞啊!
  7. 这些让人看瞎了的设计!实力证明,数学才是世界的最终boss!
  8. 写了一篇关于 NLP 综述的综述!
  9. Android中的Context理解
  10. winform设置按钮流动_支付宝语雀上手体验:让知识流动起来
  11. 程序员最想得到的十大证件
  12. 【flume】flume案例集锦
  13. Region proposal学习笔记
  14. STM32——红外遥控器实验
  15. JavaScript中的时间与日期、正则表达式和Function类型
  16. Amazon亚马逊店铺后台绑定连连跨境支付收款账户教程!
  17. 怎么把跑男里面的图片保存下来
  18. 南理工计算机科学与工程学院,周俊龙 - 南京理工大学 - 计算机科学与工程学院...
  19. 论文撰写八大技巧与八大心得,一文读懂
  20. Exploit WRDS Cloud via Python

热门文章

  1. 编译lame报错:lame_init_old找不到
  2. 天津西站,座才几个?
  3. VC使用命令行编译很复杂
  4. 开发电脑应该是8核(8线)
  5. 遇到问题就请外援,汝作为高手的价值在哪里
  6. 为什么大家都能听懂普通话
  7. DirectShow录屏,帧率不可控制?
  8. 华为手机打开日志输出的几种方法
  9. python 删除文件_lt;python笔记gt;点击工具架,删除filechache的文件
  10. cad管线交叉怎么画_CAD命令:打断(BREAK)命令的使用技巧