Giter Site home page Giter Site logo

copy-rename-maven-plugin's Introduction

copy-rename-maven-plugin

The copy-rename-maven-plugin helps in copying files or renaming files or directories during the Maven build lifecycle.

Build Status

How do I use it?

Head over to the Project Website for usage instructions

How can I help the project?

Thanks for asking...

  • If you use this plugin
    • Test this out. File an issue if it doesn't work for you. File an issue if you think it should do something more, or something different.
  • If you would like to contribute
    • Do let me know and you can always fork the project.

copy-rename-maven-plugin's People

Contributors

aneesh-joseph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

copy-rename-maven-plugin's Issues

Ignores maven variables

The plugin ignores maven variables such as ${parent.basedir}. If that is placed at the beginning of sourcePath it will assume the current directory and will place the path to the current directory in front of ${parent.basedir}. With the following configuration

${parent.basedir}/base-share-amp/src/main/resources/META-INF/share-config-custom.xml

the final sourceFile path ends up

/Users/cwhite/GitWorkingCopies/alfresco/share/brand-share/angularui-share-amp/${parent.basedir}/base-share-amp/src/main/resources/META-INF/share-config-custom.xml

and the file is not found. It should respect all maven variables.

Add support for wildcards

Would be an incredible feature to support something like this:

<configuration>
    <sourceFile>${project.build.outputDirectory}/*_abc.properties</sourceFile>
    <destinationFile>${project.build.outputDirectory}/*_xyz.properties</destinationFile>
</configuration>

This is especially helpful when you integrate dependencies and need to rename files from them because your file name pattern differs.

The feature could be restricted, e.g. to only support a single asterisk for starters. But that should help in most cases already.

Add support for skipping execution (parent POM)

I would like to use this plug-in in a parent POM. I have several plug-ins configured in the build-section and all are "disabled" when mvn installing the parent POM itself. All plug-ins support something like:

....
${disable_parent_functionality}
....
</configuration

Please add support for skipping execution.

Copy-rename is performing a move

I am trying out the plugin but the plugin is actually moving my file instead of copying it. I assumed it would leave my file and copy and rename it.

rename fails for directory with content

I tried to use the plugin to rename a directory that contains some other directories and files, but get the error

[ERROR] Failed to execute goal com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:rename (normalize-hyperv-structure) on project infra: could not rename D:\Stuff\git-ws\st33.net\target\output-le vel4 to D:\Stuff\git-ws\st33.net\target\hyper-v -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:rename (normalize-hyperv-structure) on project infra: could not rename D:\Stuff\git-ws\st33.net\target\output-level4 to D:\Stuff\git-ws\st33.net\target\hyper-v at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) .....

If I empty the directory the rename succeeds.

Would it be possible to implement support for moving of directories with content?

(As of now I must fall back to the Antrun plugin, but I would rather use this plugin as it is more "Mavenish")

Allow to delete the original file

Hello,

It would be nice if the plugin delete the old file when it has been renamed.
I have a lot of modules of maven generating a file with same name (legacy code...) and before the pack of jar i use the plugin to rename the file according to the module, but it keeps the old file. It could be nice if the pluging has an option to delete the old file.

Add suport for <overWriteIfNewer>

User Story:
As a plugin user I want to be able to configure a file copy to only happen when the source file is newer than the destination file in order to avoid undesired side effects.

In some cases, overwriting a file can generate undesired side effects, like restarting Tomcat or taking too much time due to file size and/or network speed.

I propose to use to maintain compatibility with maven-dependency-plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.