【问题标题】:maven pom.xml file wont recognize jersey frameworkmaven pom.xml 文件不会识别球衣框架
【发布时间】:2015-07-11 19:34:47
【问题描述】:

我正在尝试使用 maven Central 导入球衣,但是 intellij 不会读取我对球衣的 pom.xml 依赖项。版本 # 显示为红色并出现以下错误:

这里是 pom.xml 的文本:

     <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.emanuel</groupId>
  <artifactId>jerseyexample</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>jerseyexample Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>2.19</version>
    </dependency>

  </dependencies>
<build>
    <finalName>jerseyexample</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <server>TomcatServer</server>
          <path>/newjersey</path>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

我直接从here复制了依赖项

【问题讨论】:

    标签: java xml maven intellij-idea


    【解决方案1】:

    问题在于 maven 用于构建项目的 settings.xml 文件。我在那里定义了一个使用代理的镜像,它阻止了下载。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-04
      • 1970-01-01
      • 2011-05-27
      • 1970-01-01
      • 2014-07-18
      相关资源
      最近更新 更多