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

Popular posts from this blog

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine

Android: where to run keytool command in android