How to replace a value in web.xml with a Maven property?

前端 未结 6 461
滥情空心
滥情空心 2020-12-03 06:35

I have a Maven project that downloads some test files into its build directory ./target/files. These files should then be available to a servlet, which I can ea

6条回答
  •  有刺的猬
    2020-12-03 07:22

    Add to your pom section:

    
        org.apache.maven.plugins
        maven-war-plugin
        
            
                
                    true
                    src/main/webapp
                    
                        **/web.xml
                    
                
            
            src/main/webapp
            src/main/webapp/WEB-INF/web.xml
        
    
    

    See Maven: Customize web.xml of web-app project for more details

提交回复
热议问题