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

김상혁·2021년 4월 4일
0

Error

목록 보기
6/8

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

Jenkins로 빌드할 때 web.xml을 찾지 못해 발생한다.

IDE 내에서는 Web-INF/web.xml 경로가 맞지만 프로젝트 폴더로 봤을 땐 위치가 다를 수 있다.


해결방법

pom.xml 에 web.xml 위치 명시해주기

    <properties>
	 ...
    </properties>
    
    <dependencies>
    	...
    </dependencies>
    
    <!-- dependencies 밑 <build>에 <plugin>으로 추가 (build 없으면 만들기) -->
        <build>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                <!-- 위치는 자신 폴더 찾아보고 넣기 -->
                    <webXml>web\WEB-INF\web.xml</webXml>
                </configuration>
            </plugin>
        </plugins>

    </build>

0개의 댓글