Renaming resources in Maven

后端 未结 5 1501
谎友^
谎友^ 2020-12-02 19:43

I am trying to find a way to copy a resource file to a new name in the target directory in a Maven build. Pretty much everything I have found while searching suggests workar

5条回答
  •  旧巷少年郎
    2020-12-02 20:40

    Example usage of the assembly plugin to copy and/or rename a file:

    pom file:

    
      4.0.0
      test
      test
      0.0.1-SNAPSHOT
       
        
          
            maven-assembly-plugin
            2.2.1
            
              
                src/main/descriptors/example.xml
              
            
          
        
      
    
    

    Descriptor file:

    
    
           example
           
                  dir
           
           
                  
                         src/main/resources/something.properties
                         /
                         something.properties
                  
                  
                         src/main/resources/something.properties
                         /
                         something_en.properties
                  
           
    
    

提交回复
热议问题