difference between keeping a plugin inside a project and inside a profile

女生的网名这么多〃 提交于 2019-12-20 05:24:29

问题


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:


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.



来源:https://stackoverflow.com/questions/21037291/difference-between-keeping-a-plugin-inside-a-project-and-inside-a-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!