The maven plugin works very slow for me. In my project the webapp folder has nearly 15000 small files (images, jsp, css, etc). When I assemble it with the maven, it first copies all files to the target/myProject-1.0.0 directory, then builds myProject-1.0.0.war file from it. The copy process takes 10 minutes, building the .war takes 2 minutes.
As I see the build could be much faster if the .war file will be assembled straight from the webapp folder. Is it possible to do?
I suggest that you use the use the
war:inplacegoal ofmaven-war-plugintogether with a custommaven-antrun-plugintask.The
war:inplacewill generate the webapp in the WAR source directory. It will create all necessary extra folders underwebapp.The
antrun:runcan be customized to create the war according to your special requirements.This will potentially improve the performance since most of those resource files you have will still be in the
webappfolder and not being copied.