We all know maven plays very important role in building an application .Build configuration is very important setting in maven,using this settings we can include or exclude certain libraries in final war/jar file.This can be done through maven war plugin, below maven settings is used to include only certain libs in final output.
There are two ways to achieve this either we can include or exclude. Above method is include one if we wanted to go for exclude one settings as below.
That's All !!
<build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <warSourceDirectory>src/main/webapp</warSourceDirectory> <packagingIncludes>WEB-INF/lib/logback-classic-1.2.3.jar,WEB-INF/lib/logback-core-1.2.3.jar,WEB-INF/lib/slf4j-api-1.6.4.jar</packagingIncludes> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> <plugins> </build>
There are two ways to achieve this either we can include or exclude. Above method is include one if we wanted to go for exclude one settings as below.
<build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <warSourceDirectory>src/main/webapp</warSourceDirectory> <packagingExcludes>WEB-INF/lib/logback-classic-1.2.3.jar,WEB-INF/lib/logback-core-1.2.3.jar,WEB-INF/lib/slf4j-api-1.6.4.jar</packagingExcludes> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> <plugins> </build>
That's All !!
0 Comments
Post a Comment