메이븐(MAVEN) [WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored
메이븐 빌드시 에러 발생
-문제
+[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
-원인
스택 오버플로우에서 검색해보니
I got rid of this warning in maven 3.0.1 with the following build configuration (i believe perhaps web.xml is added to the project by other means, and should't be packaged by default):
(아마도 web.xml이 다른 방법으로 프로젝트에 추가될 것이며 기본적으로 패키징되어서는 안 된다고 생각한다).
라고한다.
-해결방법
<configuration>
<packagingExcludes>WEB-INF/web.xml<packagingExcludes>
</configuration>
를 넣어줘서 WEB-INF를 제외시키거나
<configuration>
<webXml>WebContent/WEB-INF/web.xml</webXml> -->
</configuration>
web.xml의 디렉토리를 변경해줘도 된다.
(메이븐 프로젝트의 web.xml -> 이클립스 자바 웹 애플리케이션 디렉토리 구조의 web.xml)
-결과
패키징된 war파일을 확인해보니 저렇게 제외시켜줘도 정상적으로 web.xml이 포함되어 있었다.