Maven发布项目到Tomcat7中
来源:互联网 发布:无尽的传说2 mac 编辑:程序博客网 时间:2024/05/29 08:34
1.记得要在系统变量里添加tomcat的路劲,通常我们会用myeclipse直接启动tomcat,所以不要忽略了
2.添加tomcat的管理用户
TOMCAT_HOME/conf/tomcat-users.xmlfile
under thetomcat-users root element. This will
create a user with the name admin and the password password, having the
manager-gui and manager-script roles.
<role rolename="manager-gui"/><role rolename="manager-script"/><user username="admin" password="password" roles="managergui,manager-script"/>3.Maven配置远程tomcat
USER_HOME/.m2/settings.xml(或者..\apache-maven-3.0.4\conf\settings.xml)
Now, we need to configure Maven to talk to the remote Tomcat server.
Add the following configuration to USER_HOME/.m2/settings.xml under
the servers element, as follows:
Add the following configuration to USER_HOME/.m2/settings.xml under
the servers element, as follows:
<server><id>apache-tomcat</id><username>admin</username><password>password</password></server>4.pom.xml添加tomcat插件
<build><finalName>my-webapp</finalName><plugins><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><version>2.2</version><configuration><url>http://localhost:8080/manager/text</url><server>apache-tomcat</server><path>/my-webapp</path></configuration></plugin></plugins></build>5.
在项目下发布,重新发布,撤销发布
$ mvn clean install tomcat7:deploy
$ mvn clean install tomcat7:redeploy
$ mvn clean install tomcat7:undeploy
0 0
- Maven发布项目到Tomcat7中
- 发布Maven项目到Tomcat中
- 3.发布Maven项目到nexus中
- 发布Maven项目到nexus中
- 3.发布Maven项目到nexus中
- 【Maven】发布项目到Tomcat中
- maven web项目部署到tomcat7
- MAVEN项目部署到tomcat7问题
- Maven远程部署项目到Tomcat7
- Maven项目部署到Tomcat7服务器
- Maven部署Web项目到Tomcat7
- maven 发布项目到tomcat
- maven项目发布到nexus
- Maven将web项目发布到tomcat中
- 发布本地项目和源码到maven远程库中
- maven项目如何启动运行---发布到tomcat中
- Elipse中发布一个Maven项目到Tomcat
- maven项目如何启动运行---发布到tomcat中
- Linux内存管理
- String == 与equals 区别
- spring data jpa Specification的使用
- Java方法分派-重写与重载区别
- C语言 写函数实现把一个字符串倒序
- Maven发布项目到Tomcat7中
- Linux内存管理
- Mysql优化
- Hdoj 1251 统计难题 【Hash】
- AutoCAD2008对应的acad.rx文件
- postgres库-----查看sql执行时间
- 安卓下 按钮监听重复开启线程
- 序列化
- mongodb的安装和使用