Changing packaging based on active profile in pom

前端 未结 3 661
北荒
北荒 2020-12-01 13:39

I have a project which I compile with maven. I have different profiles declared in pom.xml. For some of these profiles, I prefer building a war, and for other profiles I pre

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 14:09

    If you want to use profile you can use something like:

    
    
        4.0.0
        ..
        ${packaging.type}
    
        
            
                webapp
                
                    true
                
                
                    war
                
            
            
                batch
                
                    jar
                
                    
              
    
    

提交回复
热议问题