zoukankan      html  css  js  c++  java
  • web.xml is missing and <failOnMissingWebXml> is se

    摘要
    maven模块化

    在学习maven模块化构建项目的时候遇到了如下报错信息:

    web.xml is missing and <failOnMissingWebXml> is set to true

    。这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!

    当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml。具体配置如下:

     1 <build>
     2 
     3   <plugins>
     4 
     5    <plugin>
     6 
     7     <groupId>org.apache.maven.plugins</groupId>
     8 
     9     <artifactId>maven-war-plugin</artifactId>
    10 
    11     <version>2.6</version>
    12 
    13     <configuration>
    14 
    15      <failOnMissingWebXml>false</failOnMissingWebXml>
    16 
    17     </configuration>
    18 
    19    </plugin>
    20 
    21   </plugins>
    22 
    23  </build>
  • 相关阅读:
    String方法
    多态
    观察者模式
    ArrayList和LinkList
    唐岛湾
    AForge.Net C#的操作视频,照片读写功能
    JqGrid填坑
    日常点滴
    日常点滴
    EF Core 填坑记录
  • 原文地址:https://www.cnblogs.com/yangyi9343/p/5659664.html
Copyright © 2011-2022 走看看