Maven 패키지 웹 항목 오류 발생Error assembling WAR: webxml attribute is required

1896 단어

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

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:09 min
[INFO] Finished at: 2017-11-06T16:01:05+08:00
[INFO] Final Memory: 28M/290M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war (default-war) on project stuOriginManager: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[JENKINS] Archiving /var/lib/jenkins/workspace/mysite/pom.xml to stuOriginManager/stuOriginManager/1.0-SNAPSHOT/stuOriginManager-1.0-SNAPSHOT.pom
channel stopped
Finished: FAILURE  

원인 분석:maven의 웹 프로젝트의 기본 웹 루트는 src\main\webapp입니다.이 디렉터리에서 웹을 찾을 수 없습니다.xml은 이상의 이상을 던집니다.
해결 방법:
  • 웹루트를 웹앱으로 수정합니다
  • xml에서 지정한 웹.xml, 아래와 같습니다

  •             
                    maven-war-plugin
                    2.6
                    
                        webRoot
               webRoot/WEB-INF/web.xml
                    
                

     
    다음으로 전송:https://www.cnblogs.com/sheng-247/p/7793808.html

    좋은 웹페이지 즐겨찾기