difference between keeping a plugin inside a proje

2019-03-02 00:31发布

Can anyone please explain the functionality for below?

A) Actually below code is working for me, BUT I didnt understood why we need to use below for maven-war-plugin

<warSourceDirectory>src/main/webapp</warSourceDirectory>
                    <webXml>src/main/webapp/WEB-INF/web.xml</webXml>

B) whats the difference between keeping a plugin inside a project and inside a profile? ( say maven-surefire-plugin ) which way is better (assume I MUST use <profile> tag in my pom.xml)

1条回答
男人必须洒脱
2楼-- · 2019-03-02 01:04

Part A

warSourceDirectory is directory for static web files, jsp, images, WEB-INF etc. The default value is good, so you dont need to change this parameter.

webXml - is location of web.xml file, deployment description. With spring boot you dont need web.xml at all. Set parameter failOnMissingWebXml to false.

Part B

Plugin defined inside a project are used by this project always. Plugin defined in profile are used only when you enable profile - so this plugin is not default.

查看更多
登录 后发表回答