maven-tomcat-plugin试用

maven-tomcat-plugin能够方便的部署war应用到本地或远程的tomcat上,废话少说,看代码,下面是带有maven-tomcat-plugin配置的pom.xml
<properties>
    
<!-- Cargo settings -->
    
<cargo.container.manager.url>http://192.168.1.107/manager</cargo.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,用户名及密码等!

posted on 2009-07-21 14:13 kuuyee 阅读(2226) 评论(0)  编辑  收藏 所属分类: Git/MavenJEE


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2009年7月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

统计

随笔分类(139)

Linux内核

搜索

积分与排名

最新评论

阅读排行榜