如何在我的 Maven 项目中包含 javax.servlet servlet-api 3.0.1?

How do I include javax.servlet servlet-api 3.0.1 in my Maven project?

我正在使用 Maven 3.3。我是否需要添加任何特殊存储库才能访问 servlet-api 3.0.1 jar?我已将其添加到我的 pom.xml 文件

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

但是当我尝试构建时出现此错误...

[ERROR] Failed to execute goal on project core: Could not resolve dependencies for project org.collegeboard.springboard:core:jar:99.0.0-SNAPSHOT: Could not find artifact javax.servlet:servlet-api:jar:3.0.1 in thirdparty (https://nexus.getmyco.com/nexus/content/repositories/thirdparty/) -> [Help 1]

我需要这个依赖项,因为有人告诉我另一个依赖项 (spring-test-4.0.6.RELEASE) 需要这个。

查看spring-test-4.0.6.RELEASE的pom:http://search.maven.org/#artifactdetails|org.springframework|spring-test|4.0.6.RELEASE|jar

实际上取决于以下几点:

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.0.1</version>
  <scope>compile</scope>
  <optional>true</optional>
</dependency>