I am trying to create a .war file using the maven plugin:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
My project structure is as follows:
/main/webapp/WEB-INF/
/main/webapp/WEB-INF/spring/...
/main/webapp/WEB-INF/web.xml
/main/webapp/public/...
/main/webapp/resources/...
/main/webapp/views/...
After assembly, my war file contains only WEB-INF and META-INF. Missing all other webapp directory content (public, resources, and views). In addition, the WEB-INF directory in the .war file consists only of the / classes and / lib directories (/ WEB-INF / spring and WEB-INF / web.xml are missig).
How to tell maven to pack the contents of webapp and WEB-INF into a war file?
source
share