maven中配置插件

maven中自定义插件。

1.maven pom.xml 中配置jetty插件


      
      final-app-name 
      
          
              
              org.mortbay.jetty
              maven-jetty-plugin
              6.1.7
              
                  
                  10
                  
                  /test
                  
                      
                          8080
                          60000
                      
                  
              
          
      


2.pom.xml 中配置maven-compiler-plugin插件

The Compiler Plugin is used to compile the sources of your project.
Default source and target jdk is 1.5, independently the jdk you run.
参考链接-Maven官网


    org.apache.maven.plugins
    maven-compiler-plugin
    3.1
    
        1.6 
        1.6 
        
    
        
        128m
        512m
        true  
        1.3        
    

The same effect with:



  [...]
  
    1.8
    1.8
  
  [...]

参考链接-Maven官网
http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html


3.pom.xml中配置maven-war-plugin插件,用来打war包。

 
        org.apache.maven.plugins
        maven-war-plugin
        3.0.0
        
            
                
                    
                    
                    src/main/resources
                    
                    WEB-INF
                
            
            
           
                
                /sample/servlet/container/deploy/directory
           
        
      

Note:
The default resource directory for all Maven projects is src/main/resources which will end up in target/classes and in WEB-INF/classes in the WAR.

参考链接-Maven官网

[未完。]

你可能感兴趣的:(maven中配置插件)