Maven中的org.codehaus.mojo的tomcat配置

为什么80%的码农都做不了架构师?>>>   hot3.png

  • maven构建web项目的时候用tomcat做container的时候,我们可以在maven中配置

  • “老的”插件官网:http://mojo.codehaus.org/tomcat-maven-plugin/index.html,当然这个插件被apache搞过去了,新的:http://tomcat.apache.org/maven-plugin.html。稍微看了下apache的tomcat6/7配置方法,觉得还是老的适合,够用就行了,反正只是个小插件。

  •  

    
    		test-mvc
    		
    			
    				org.codehaus.mojo
    				tomcat-maven-plugin
    				
    				  
    				
    					http://www.mydomain.com
    					  
    					/mypath
    					80
    					utf-8
    					
                                              
                                              -Xms128m -Xmx512m
                                            
    				
    			
    		
    	

     

  • Since version 2.0-beta-1 tomcat mojos has been renamed to tomcat6 and tomcat7 with the same goals.

    You must configure your pom to use this new groupId:

    
    
            
              org.apache.tomcat.maven
              tomcat6-maven-plugin
              2.2 
              
                        http://websocket.demo.cc
                        80
                        /
                        utf-8
                        
                            
                            -Xms128m -Xmx512m
                        
                    
            
    
            
              org.apache.tomcat.maven
              tomcat7-maven-plugin
              2.2
              
                        http://websocket.demo.cc
                        80
                        /
                        utf-8
                        
                            
                            -Xms128m -Xmx512m
                        
                    
            
    
    

     

  • 
                
                    org.mortbay.jetty
                    maven-jetty-plugin
                    6.1.10
                    
                        /
                        
                        
                            
                                80
                            
                        
                        
                        
                        9966
                        stopKey
                    
                
  • 插件代码贴出来没什么好说的了,一看就懂了,方便查询。其他一些什么多个容器。。什么的goals自己去查阅两个官方的文档即可

  • 插件org.codehaus.mojo:                                            http://mojo.codehaus.org/tomcat-maven-plugin/index.html

  • 插件org.apache.tomcat.maven: http://tomcat.apache.org/maven-plugin.html

转载于:https://my.oschina.net/hebad/blog/311181

你可能感兴趣的:(Maven中的org.codehaus.mojo的tomcat配置)