“需要webxml属性" Maven中的错误 [英] "webxml attribute is required" error in Maven

查看:85
本文介绍了“需要webxml属性" Maven中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误:

组装WAR时出错:需要webxml属性(如果在更新模式下执行,则必须是预先存在的WEB-INF/web.xml)

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

我在正确的位置找到了web.xml,即projectname\src\main\webapp\WEB-INF\web.xml

I have got web.xml in right place which is projectname\src\main\webapp\WEB-INF\web.xml

这可能是什么原因造成的?

What could be causing this?

推荐答案

如果您可以提供maven-war-plugin的代码段,将很有帮助. 看起来web.xml在正确的位置,您仍然可以尝试明确给出位置

It would be helpful if you can provide a code snippet of your maven-war-plugin. Looks like the web.xml is at right place, still you can try and give the location explicitly

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

这篇关于“需要webxml属性" Maven中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆