How can I merge resource files in a Maven assembly?

前端 未结 5 989
闹比i
闹比i 2020-12-06 10:09

I\'m using Maven and its assembly plugin to build a distribution package of my project like this:

  • one project assembles a basic runtime (based on Felix), with
5条回答
  •  不知归路
    2020-12-06 11:08

    https://github.com/rob19780114/merge-maven-plugin (available on maven central) also seems to do the job. See below for an example configuration

     
        org.zcore.maven
        merge-maven-plugin
        0.0.3
        
            
                merge
                generate-resources
                
                    merge
                
                
                  
                    
                      ${build.outputDirectory}/output-file-1
                      
                        src/main/resources/file1
                        src/main/resources/file2
                      
                    
                    
                      ${build.outputDirectory}/output-file-2
                      
                        src/main/resources/file3
                        src/main/resources/file4
                      
                    
                  
                
            
        
    

提交回复
热议问题