Maven :: Include servlet-api only at local maven install not during building war

Include  servlet-api  only at local maven install not during building war
Add scope element with value as ‘Provided’. Now maven will not include this jar in lib whiling

building war file so that you can deploy it on tomcat.

 <dependency>
 <groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>

For all scopes in maven, please visit http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

Comments

Popular posts from this blog

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI