How to copy a resource or another in Maven depending on the target environment?

后端 未结 5 1204
有刺的猬
有刺的猬 2020-12-07 15:19

I have to create test war and production war, which will have a different log4j.properties file in the WEB-INF directory. I have these files

5条回答
  •  情书的邮戳
    2020-12-07 15:44

    Last response is working. But you need to give the version to make it work.

    
      maven-resources-plugin
      2.3
      
        
          copy-prod-resources
          process-resources
          
             copy-resources
          
          
            
            true
            
            ${basedir}/target/classes
            
              
                
                src/main/resources/prod
              
            
          
        
      
    
    

提交回复
热议问题