Make unpack not overwrite existing files if there are no changes
----------------------------------------------------------------
Key: MJBOSS-59
URL: http://jira.codehaus.org/browse/MJBOSS-59
Project: Maven 2.x JBoss Plugin
Issue Type: Improvement
Affects Versions: 1.5.0
Reporter: Leiv Hellebo
Attachments: patch
Currently the HardDeployMojo overwrites all destination files, even if there
are no new changes to those files.
It would be very nice if e.g. web.xml for web-apps was not overwritten unless a
newer version was available. This would allow resources like .xhtml-files and
.class-files to be redeployed without triggering a full redeploy of the
application when the web.xml file is unmodified.
The attached patch modifies unpack(zipFile,targetDir) to check file timestamps
and avoids overwriting existing targets unless newer sources are available.
Similar changes to copyFile(src,dst) would perhaps be interesting, but without,
say a
/**
* @parameter default-value="true"
*/
boolean overwrite
it will make "mvn jboss:hard-deploy" no longer trigger a redeploy of the
fileName(s).
(Indeed this patch will of course, if applied, also remove the
redeploy-side-effect doing a jboss:hard-deploy. But then that is the whole
point of this patch. The redeploy-side-effect should rather be had through
other means, say a new goal hard-redeploy.)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email