In maven - how to rename the output .war file based on the name of the profile in use

前端 未结 3 1186
南方客
南方客 2020-12-13 09:48

I have three profiles in my pom.xml for our application...

  1. dev (for use on a developer\'s)
  2. qa (for use on our internal qa server)
  3. prod (produ
3条回答
  •  [愿得一人]
    2020-12-13 10:13

    The answer was simple...

    Define a property in each profile like this...

    
        qa
        
            ourapp-qa
        
    
    

    Then add this to your plugins...

    
        maven-war-plugin
        2.1.1
        
            WEB-INF/web.xml
            ${rp.build.warname}
        
    
    

提交回复
热议问题