maven-tomcat-plugin试用[Java编程]
本文“maven-tomcat-plugin试用[Java编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
maven-tomcat-plugin可以便利的布置war利用到本地或远程的tomcat上,废话 少说,看代码,下面是带有maven-tomcat-plugin配置的pom.xml
<properties>
<!-- Cargo settings -->
<cargo.container.manager.url>http://192.168.1.107/manager</ca rgo.container.manager.url>
<cargo.container.username>admin</cargo.container.username>
<cargo.container.password>123456</cargo.container.password> ;
<cargo.wait>false</cargo.wait>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<path>/runes</path>
<url>${cargo.container.manager.url}</url>
<username>${cargo.container.username}</username>
<password>${cargo.container.password}</password>
<warDirectory>${basedir}/src/main/webapp</warDirectory>
</configuration>
<executions>
<execution>
<id>tomcat-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
<!--execution>
<id>undeploy</id>
<phase>deploy</phase>
<goals>
<goal>start</goal>
</goals>
</execution-->
</executions>
</plugin>
</plugins>
</build>
maven-tomcat-plugin通过tomcat的manager掌握台来deploy或undeploy利用, 所以要把你的tomcat的相关信息配置上,包含manager url,用户名及密码等!
以上是“maven-tomcat-plugin试用[Java编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |