Speed up maven war plugin

后端 未结 3 830
自闭症患者
自闭症患者 2021-02-08 07:47

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

3条回答
  •  粉色の甜心
    2021-02-08 08:29

    In the configuration section for the war plugin, use warSourceExcludes to exclude unneeded files and directories. In the example below, the directories components and node_modules will be excluded from the exploded war as well as from the final war. In my case this reduced the build time from 3 minutes to 14 seconds.

            
                  
                    components/**,
                    node_modules/**
                  
            
    

提交回复
热议问题