Filtering Maven files into WEB-INF

后端 未结 4 1362
抹茶落季
抹茶落季 2021-01-31 02:18

I am trying to add some filtering to the application context file, which resides in the WEB-INF directory.

I have the file which is to be filtered (xmlgateway-context.

4条回答
  •  逝去的感伤
    2021-01-31 03:08

    
        
            org.apache.maven.plugins
            maven-war-plugin
            2.0.2
            
                
                    
                        ${basedir}/src/main/webapp/WEB-INF
                        true
                        WEB-INF
                        
                            **/xmlgateway-context.xml
                         
                    
                
            
        
    
    

    Add the above to your pom.xml. EDIT: Just to explain what the above conf is doing. With this added, mvn is going to filter files under src/main/webapp/WEB-INF and in particular filter the included files xmlgateway-context.xml and after filtering it is going to push the files in WEB-INF folder (thats what the target tag is saying).

    Update if something is not clear.

提交回复
热议问题