Software Workshop

현상

Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

이런 에러가 발생했다면, 이것은 maven이 war로 패키징하다가 web.xml 파일이 정해진 위치에 없어서 못 찾았기 때문임

해결방법

web.xml 파일의 위치를 설정에 명시하는 방법

<plugin>            
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
    <webXml>src\\main\\webapp\\WEB-INF\\web.xml</webXml>        
  </configuration>
</plugin>

default path에 위치시키는 방법

src/main/webapp/WEB-INF/ 디렉토리에 web.xml을 생성해 줌