Renaming resources in Maven

后端 未结 5 1507
谎友^
谎友^ 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:26

    Using the antrun-maven-plugin makes it easy, but in case you are looking for a more mavenish way which is supported within eclipse m2e, then you can use the copy-rename-maven-plugin

      
        com.coderplus.maven.plugins
        copy-rename-maven-plugin
        1.0.1
        
          
            rename-file
            compile
            
              rename
            
            
              ${project.build.outputDirectory}/default.DS_Store
              ${project.build.outputDirectory}/.DS_Store
            
          
        
      
    

    And in case you have any feedback/issues with the plugin, you can reach out at https://github.com/coderplus/copy-rename-maven-plugin/

提交回复
热议问题