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

问题描述

我收到以下错误:

我在正确的位置找到了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中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 10:18