jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class

解决办法,在 javax.servlet-api 的依赖中加上 provided:

<dependency>
          <groupId>javax.servletgroupId>
          <artifactId>javax.servlet-apiartifactId>
          <version>3.1.0version>
          <scope>providedscope>
      dependency>

  附上有效连接:
http://stackoverflow.com/questions/28870030/validatejarfiled-path-jar-not-loaded-see-servlet-spec-3-0-section-10-7-2;
http://stackoverflow.com/questions/18738888/how-to-use-provided-scope-for-jar-file-in-gradle-build

你可能感兴趣的:(java,maven)