thrift's dependency scope on javax.servlet:servlet-api should be 'provided'
----------------------------------------------------------------------------
Key: THRIFT-1257
URL: https://issues.apache.org/jira/browse/THRIFT-1257
Project: Thrift
Issue Type: Dependency upgrade
Affects Versions: 0.6.1
Environment: Tomcat 7.x
Tested on Mac OS X 10.6.8
Reporter: Shashwat Agarwal
Priority: Minor
libthrift 0.6.1 pom (org.apache.thrift:libthrift-0.6.1) specifies
javax.servlet:servlet-api-2.5 as compulsory dependency. This causes the jar
depending on this libthrift to be skipped by Tomcat with the following error:
{noformat}
INFO:
validateJarFile(/usr/local/apache-tomcat-7.0.2/webapps/mywebapp/WEB-INF/lib/my-service-1.0.0.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
{noformat}
_Workaround_
While including libthrift-0.6.1 as dependency in maven pom, exclude
javax.servlet:servlet-api using exclusions as:
{noformat}
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.6.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira