Maven rename a file after everything else finishes

后端 未结 3 1166
花落未央
花落未央 2021-01-04 03:24

I have a project which I need to rename the final output file generated by the Maven Assembly Plugin after everything else finishes (in the compiling/building/a

3条回答
  •  我在风中等你
    2021-01-04 04:07

    This question is nearly an year old, but in case anyone else is facing similar issue, here is an alternate solution.

    If you are looking for a more mavenish way of doing it,you can use

     
        com.coderplus.maven.plugins
        copy-rename-maven-plugin
        1.0.1
        
          
            rename-file
            install
            
              rename
            
            
              ${project.build.outputDirectory}/libreofficeplugin-ooo.zip
              ${project.build.outputDirectory}/final-version.oxt
            
          
        
      
    

    and in case you want to copy instead of rename, use the copy goal instead of the rename goal.

提交回复
热议问题