Pom.xml: 连接超时和模型版本缺失错误

Pom.xml: connect timedout and modelversion missing error

我在 pom.xml 文件的 eclipse 上收到以下错误。

Multiple annotations found at this line:
    - connect timed out
    - Failure to transfer org.jibx:jibx-maven-plugin:pom:1.2.4 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be 
     reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.jibx:jibx-maven-plugin:pom:1.2.4 from/to central 
     (http://repo.maven.apache.org/maven2): connect timed out
    - Project build error: 'modelVersion' is missing.

pom.xml如下:

<?xml version="1.0" encoding="UTF-8"?>
<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>org.koushik.javabrains</groupId>
      <artifactId>testagain</artifactId> 
      <version>1.0-SNAPSHOT</version>
      <packaging>jar</packaging>

      <name>JarName</name>
      <url>http://maven.apache.org</url>

      <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>

      <build>
        <plugins>
          <plugin>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-maven-plugin</artifactId>
            <version>1.2.4</version>
            <executions>
              <execution>
                <goals>
                  <goal>bind</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </project>

任何帮助都会很棒。 提前致谢。

jibx-maven-plugin 版本 1.2.4 似乎有问题。
它依赖于:

org.jibx.config:jibx-parent:pom:3-SNAPSHOT

在 Maven Central 中找不到。我用你的 pom.xml 创建了一个简单的项目,当我尝试从命令行用 maven 构建它时 - 我得到了这个:

[ERROR] Plugin org.jibx:jibx-maven-plugin:1.2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.jibx:jibx-maven-plugin:jar:1.2.4: Could not find artifact org.jibx.config:jibx-parent:pom:3-SNAPSHOT -> [Help 1]

然而,在将我的 pom.xml 升级为使用版本 1.2.6 之后,问题消失了,Eclipse 也不再抱怨*插件。

* 它仍然抱怨 插件执行未包含在生命周期配置中 ,但是 there are solutions to this as well.