cargo远程部署项目到tomcat
来源:互联网 发布:win8.1 固态硬盘优化 编辑:程序博客网 时间:2024/06/05 18:29
tomcat-users.xml,至少要添加manager,manager-gui,manager-script,manager-jmx,manager-status,
添加权限
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<!--admin角色没有的要注意添上-->
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="admin" password="admin" roles="admin,manager,tomcat,manager-gui,manager-script,manager-jmx,manager-status"/>
<!--你用哪个用户做管理员,则需要分配相应的角色,我给admin用户分配了admin和manager连个角色-->
</tomcat-users>
新版无需修改maven的settings.xml文件,网上很多误导别人的
mvn cargo:redeploy
<!-- 远程部署 ,tomcat必须启动-->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.9</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.hostname>localhost</cargo.hostname>
<cargo.servlet.port>80</cargo.servlet.port>
<cargo.servlet.port>80</cargo.servlet.port>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>admin</cargo.remote.password>
<cargo.remote.manager.url>http://localhost/manager</cargo.remote.manager.url>
</properties>
</configuration>
</configuration>
</plugin>
注意:cargo.hostname是必须配置的,如果不配置默认是localhost!也就是说cargo.tomcat.manager.url里配置了什么都是不起作用的。端口也一样,要配置。
如果服务器上已运行了部署项目,必须mvn cargo:redeploy启动,用mvn cargo:deploy会报错Error writing request body to server
如果出现The username you provided is not allowed to use the text-based Tomcat Manager (error 403)错误,必须把tomcat7部署用户的权限定义为“manager-script”,才可以成功部署。
Encountered exception javax.management.RuntimeErrorException: Error invoking method check,缺少manager-jmx权限
manager-gui — Access to the HTML interface.
manager-status — Access to the "Server Status" page only.
manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
manager-jmx — Access to JMX proxy interface and to the "Server Status" page.
添加权限
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<!--admin角色没有的要注意添上-->
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="admin" password="admin" roles="admin,manager,tomcat,manager-gui,manager-script,manager-jmx,manager-status"/>
<!--你用哪个用户做管理员,则需要分配相应的角色,我给admin用户分配了admin和manager连个角色-->
</tomcat-users>
新版无需修改maven的settings.xml文件,网上很多误导别人的
mvn cargo:redeploy
<!-- 远程部署 ,tomcat必须启动-->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.9</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.hostname>localhost</cargo.hostname>
<cargo.servlet.port>80</cargo.servlet.port>
<cargo.servlet.port>80</cargo.servlet.port>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>admin</cargo.remote.password>
<cargo.remote.manager.url>http://localhost/manager</cargo.remote.manager.url>
</properties>
</configuration>
</configuration>
</plugin>
注意:cargo.hostname是必须配置的,如果不配置默认是localhost!也就是说cargo.tomcat.manager.url里配置了什么都是不起作用的。端口也一样,要配置。
如果服务器上已运行了部署项目,必须mvn cargo:redeploy启动,用mvn cargo:deploy会报错Error writing request body to server
如果出现The username you provided is not allowed to use the text-based Tomcat Manager (error 403)错误,必须把tomcat7部署用户的权限定义为“manager-script”,才可以成功部署。
Encountered exception javax.management.RuntimeErrorException: Error invoking method check,缺少manager-jmx权限
manager-gui — Access to the HTML interface.
manager-status — Access to the "Server Status" page only.
manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
manager-jmx — Access to JMX proxy interface and to the "Server Status" page.
0 0
- cargo远程部署项目到tomcat
- Cargo: 部署应用到Tomcat
- cargo maven部署至远程tomcat
- Jenkins部署Web项目到远程tomcat
- Jenkins部署Web项目到远程tomcat
- idea部署项目到远程tomcat
- Intellij配置远程部署项目到Tomcat
- Jenkins部署Web项目到远程tomcat
- maven部署项目到远程tomcat
- idea部署项目到远程tomcat
- Tomcat远程部署web项目到服务器
- 使用cargo实现jenkins自动部署远程tomcat
- 利用Maven和Cargo远程部署war到Tomcat7
- Cargo Daemon远程启动、停止服务器、部署项目
- maven实现项目远程部署到tomcat(热部署)
- maven cargo tomcat7 远程部署
- mvn cargo 远程自动部署
- Cargo自动化部署至tomcat
- 句子逆序
- 保护模式下寻址(易懂)
- Graphviz样例之集群流程图
- ZooKeeper 会话超时
- myeclipse反编译
- cargo远程部署项目到tomcat
- 【java基础 3】树形结构数据呈现的递归算法实现
- React Native-组件的引用
- Linux线程常见属性小结
- 浅谈C中的malloc和free释放
- banner渐隐渐现
- HDU 1247 Hat’s Words
- 从头开始学SQL 入门(一)使用
- Java堆栈信息分析