I have recently need to use a zip file in one of my builds. Once I have place 开发者_如何学编程the proper *.zip file in the package, I need to unpackage it in the assembly, before the entire package is zipped.
The reason it need to be zipped is for management purposes. I know that could simply check out the expanded directory as well.
Please and thank you
I know from personal experience, this cannot be done with the Maven assembly plugin. I think the only option available right now is using the Maven antrun plugin and executing the ant unzip task. I think the reason that unzipping, untaring, etc. are not available in the assembly plugin is the fact that it could lead to some bad uses like it has in many ant scripts.
You could perform your unzipping with the antrun plugin in the phase right before you need the unzipped contents. For instance, if your assembly is running the in the package phase, you can set the antrun script to run in the prepare-package phase.
The Maven development community has been playing with overlays with the war plugin with great success. Maybe that same functionality could be applied to the maven assembly plugin. Might be a good enhancement request.
精彩评论