Maven: Customize web.xml of web-app project

前端 未结 7 2054
梦如初夏
梦如初夏 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:30

    Comment to Chris Clark answer. You can reverse - so in development you do not want to have any constraints (security or jndi, other)

    
    

    So in development you have commented out section. But in production it will be translated to (with maven profile):

    
    
        ...
    
    
    
    
    

    and commented section will be visible.

提交回复
热议问题