Suppose you are working on a large project that runs on some application server (say, Tomcat, but it could be Jboss or Jetty or something else). The project consists of several wars, while in each war there are many pitchers. All of this is built using Maven, and it takes a long time to create it.
Now suppose that a developer makes changes to only one module, which creates one small jar. To continue working and test the change, the developer needs to replace this bank in the corresponding wars and restart the server (sometimes this is enough to redeploy the wars). This is much faster than restoring the entire application. I have seen many developers (including myself) create shell scripts for this task.
However, it can be much better if it can be done automatically using maven. Say, when you run "mvn install", the plugin will also go to a specific predefined location (for example, $ {tomcat} / webapps) and will look for all myjar.jar visibility and replace it with a new version (we have several cans, remember?)
Does anyone know about such a plugin? Or maybe some other tool that can perform the same task? Or a little better how to do it?
Updated: Btw, If I do not find a solution, I will probably implement it myself. So please let me know if you are interested. I will need some beta testers :)
Updated: So, I created the plugin itself. See http://code.google.com/p/replace-file-plugin/ Any feedback is appreciated.
source share