EN
Maven dependency not included in war - fix
3 points
In this short article we would like to show how to include external JAR library into WAR.
In order to do it we need to add maven-war-plugin to our pom.xml. If we have defined this plugin already in pom.xml then we need to check for webResources part of below xml plugin config.
xxxxxxxxxx
1
<plugin>
2
<artifactId>maven-war-plugin</artifactId>
3
<version>2.4</version>
4
<configuration>
5
<failOnMissingWebXml>false</failOnMissingWebXml>
6
<webResources>
7
<resource>
8
<directory>${project.basedir}/external_libs</directory>
9
<targetPath>WEB-INF/lib</targetPath>
10
<filtering>false</filtering>
11
<includes>
12
<include>**/*.jar</include>
13
</includes>
14
</resource>
15
</webResources>
16
</configuration>
17
</plugin>