欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

maven tomcat eclipse

程序员文章站 2024-01-13 15:27:10
...
1、原理
http://mojo.codehaus.org/tomcat-maven-plugin/introduction.html
2、deploy a maven web application to Tomcat
http://www.avajava.com/tutorials/lessons/how-do-i-deploy-a-maven-web-application-to-tomcat.html
3、
http://www.avajava.com/tutorials/lessons/how-do-i-redeploy-a-maven-web-application-to-tomcat.html?page=2

1、tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<user username="test" password="test" roles="manager"/>
</tomcat-users>

2、settings.xml server entry

<server>
<id>mytomcat</id>
<username>test</username>
<password>test</password>
</server>

3、pom.xml

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://192.168.1.7:8080/manager</url>
<server>mytomcat</server>
<path>/mywebapp</path>
</configuration>
</plugin>

4、创建命令