Maven – webxml属性が必要です
MavenはWebアプリケーションをパッケージ化し、次のエラーメッセージを表示します:
$ mvn package//...[ERROR]Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
(default-war) on project spring4-mvc-maven-ajax-example:
Error assembling WAR: webxml attribute is required
(or pre-existing WEB-INF/web.xml if executing in update mode) ->[Help 1]....
=== 解決策
{空} 1。サーブレットコンテナ<3の場合は、WEB-INF/web.xmlファイルが存在することを確認してください。
{空} 2。サーブレットコンテナ> = 3およびweb.xml` webアプリケーションがない場合、次の `maven-war-plugin`プラグインを宣言し、` failOnMissingWebXml`オプションをfalseに設定します。
pom.xml
<build> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins> </build>
=== 参考文献 . https://maven.apache.org/plugins/maven-war-plugin/index.html[Apache Maven WAR Plugin]。 http://tomcat.apache.org/whichversion.html[Apache Tomcat - これはどれですか バージョンは何ですか?] link://tag/maven/[maven]link://tag/war/[war]