Maven: Customize web.xml of web-app project

前端 未结 7 2050
梦如初夏
梦如初夏 2020-11-30 20:27

I have a web application Maven project, and I want to customize the web.xml file depending on the Profile that is running. I am using the Maven-War-plugin, which allows me

7条回答
  •  旧巷少年郎
    2020-11-30 21:27

    A new configuration was added to maven-war-plugin in version 2.1-alpha-2. Its name is filteringDeploymentDescriptors and it does exacly what you want.

    This works:

    
        org.apache.maven.plugins
        maven-war-plugin
        2.4
        
            true
        
    
    

    And this also works:

    
        true
    
    

    More information is available in the official documentation of filteringDeploymentDescriptors.

提交回复
热议问题