Maven: how to place resource file together with jar?

前端 未结 3 520
醉酒成梦
醉酒成梦 2020-12-07 15:44

I have \\src\\main\\resources\\logback.xml file. When I run mvn package it is placed into the jar by default. How do I make Maven place it next to jar, not insi

3条回答
  •  温柔的废话
    2020-12-07 16:38

    No plugin definitions needed, just edit the build resources:

    
        
            
            
                src/main/resources
                
                    logback.xml
                
            
            
            
                src/main/resources
                
                    logback.xml
                
                
                ..
            
        
    
    

    Reference:

    • process-resources (Maven Book)
    • (POM Reference)

提交回复
热议问题