tomcat7使用Maven自动部署

<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>tomcat-maven-plugin</artifactId>
				<configuration>
					<url>http://localhost:8080/manager/text</url>
					<username>tomcat</username>
					<password>admin</password>
					<path>/</path>
				</configuration>
			</plugin>
		</plugins>
</build>

 以上内容插入到pom.xml project的节点之中

 

tomcat7 %tomcat_home%\conf\tomcat-users.xml配置

 

 

<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="tomcat" password="admin" roles="manager-gui,manager-script"/>

 

如果是tomcat6 pom.xml中的那个tomcat url改为http://localhost:8080/manager

你可能感兴趣的:(tomcat7)