I'm got a pretty simple question... I have a Maven 3 project set up like so:
Root POM project - EAR project: depends on the WAR project - WAR project
I'd like 开发者_JS百科to use the assembly plug-in to make a ZIP file containing the exploded EAR (which contains the WAR). Any suggestions on how I should do this? Should I put the assembly configuration details in the root .pom or EAR .pom?
Thanks! -Jon
You could have a third project, say earzip, with a dependency
on the ear
project. This project can have the necessary configuration (assembly descriptor
and other plugin
definitions as required) to explode the ear and zip it up again as suitable. This will keep your parent pom clean, as well as not put multiple things in your ear pom.
When I was looking for the way to run batch script from ant (~1 year ago) I found only the following solution:
- In the pom that builds your parent project add runant plugin
- In the ant script (1) add target that runs a batch script (if on Windows)
- In the batch script (2) add archiving task.
No point to add zipping task to the pom that builds an EAR (IMHO). It should be parent pom task.
I hope that these threee would do the magic.
Good luck!
精彩评论