Suppose you are working on a big project, which is run on some application server (let's say Tomcat, but it may be also Jboss, or Jetty, or something else). The project consists of a several wars, while each war contains a lot of jar. The whole thing is built using Maven and it takes a lot of time to build it all.
Now, suppose a developer makes a change in just one module that produces one small jar. To continue working and test the change, the developer needs to replace this jar in the relevant wars and restart server (sometimes it's sufficient to redeploy wars). It's much faster then rebuilding the whole application. I have seen a lot of developers (including myself) creating shell scripts for this task.
However, it could be much nicer, if it could be done automatically using maven. Let's say when running "mvn install" the plugin will also go to some predefined location (e.g. ${tomcat}/webapps) and search for all appearances of myjar.jar and replace them with a new version (We have multiple jars, remember?)
Does anyone know about such a plugin? Or may be about some other tool that can do the same task? Or some better idea how to do it?
Updated: Btw, If I don't find a solution, I'll probably implement it myself. So please let me know if you are interested. I'll need some beta testers :)
Updated: So I created the plugin myself. See http://code.google.com/p/replace-file-plugin/ Any feedback is appreciated.
Well, any features I asked for in this question, I have implemented myself. See http://code.google.com/p/replace-file-plugin/ I'll appreciate any feedback.