How to make a maven sub-dependency “provided” in 3rd party dependency?
问题 I am getting this error, when I run mvn tomcat:run in my web modulo. SEVERE: Servlet /web threw load() exception java.lang.ClassCastException: org.springframework.web.servlet.DispatcherServlet cannot be cast to javax.servlet.Servlet The problem happens when I add a dependency to one other modulo I have, specifically because that other modulo contains com.google.gdata:core dependency. I ran mvn dependency:tree I saw that this google dependency has servlet-api down its dependency tree, and so I