Search This Blog

Wednesday, November 14, 2018

How to build .war without web.xml file using maven

You need to set maven-war-plugin attribute failOnMissingWebXml to false in pom.xml when building .war without web.xml file using maven:
 1 <plugins>
  2  ...
  3  <plugin>
  4    <groupId>org.apache.maven.plugins</groupId>
  5    <artifactId>maven-war-plugin</artifactId>
  6    <version>2.1.1</version>    
  7    <configuration>
  8        <failOnMissingWebXml>false</failOnMissingWebXml>        
  9    </configuration>
 10    </plugin>
 11  ...
 12  </plugins>