[
http://jira.codehaus.org/browse/MJBOSS-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257227#action_257227
]
Leiv Hellebo commented on MJBOSS-59:
------------------------------------
I see why you don't want all that duplication. I'll argue for it briefly here,
and if you want me to improve on the patch to HDM.java, just say so :)
I proposed a new Mojo, because I assume that since HDM.unpack defaults to
false, you have to let overwrite (or whatever the name should be) default to
true. This allows "mvn jboss:hard-deploy" to trigger a redeploy even if there
are no changes to the artifact(s) being deployed, and moreover it is
non-disruptive for existing users.
For users deploying folders, either with unpack=true or not, I assume that they
-- like me -- would want overwrite to default to false.
>From these observations I started see the two deployment styles (deploying
>folders or not) sufficiently different to split them apart. The logic of HDM
>could then be much simplified in a later release, by deprecating the support
>for HDM.unpack, and emit a warning that this field will be removed in a later
>release of the plugin. Perhaps.
It is your choice, of course.
The important part for me is to allow incremental deploy without triggering a
redeploy.
(And note that neither one of my two patches are entirely successful. The first
does not have the overwrite-flag, the second one I guess will not work for web
archives without a web.xml, as it does not update the timestamp of the folders.)
> 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, UnpackMojo.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