maven tomcat eclipse

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、创建命令


你可能感兴趣的:(java,eclipse,maven,tomcat,xml)