我在 eclipse 上的 pom.xml 文件中收到以下错误。
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 .
关于java - Pom.xml:连接超时和模型版本丢失错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29971823/