<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cloudst</groupId>
<artifactId>cloudst</artifactId>
<version>0.1.2</version>
<packaging>jar</packaging>
<name>cloudst</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>com.springsource.repository.bundles.release</id>
<url>http://repository.springsource.com/maven/bundles/release/</url>
</repository>
<repository>
<id>EclipseLink</id>
<url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
</repository>
<repository>
<id>java.net2</id>
<name>Repository hosting the jee6 artifacts</name>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.kitchen-eel</groupId>
<artifactId>json-schema-validator</artifactId>
<version>${kitchen-eel.version}</version>
</dependency>
<build>
<finalName>cloudst</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</build>
</project>能够使用标准的mvn命令从命令行成功地清理、编译和安装此项目.
但是,在Eclipse的问题窗格中,我有以下两个错误:
在本地存储库中缓存http://repo.maven.apache.org/maven2时,在中央更新间隔过去或强制更新之前,不会重新尝试解析。原始错误:无法将工件org.kitchen-eel:json-schema-validator:jar:1.2.1从/转到中央(http://repo.maven.apache.org/maven2):
未能传输http://repo.maven.apache.org/maven2/org/kitchen-eel/json-schema-validator/1.2.1/json-schema-validator-1.2.1.jar。
为什么它在命令行中工作,但是m2eclipse发布了问题?
谢谢你抽出时间读这篇..。
发布于 2013-10-28 10:32:11
这是解决在Eclipse项目中可能发生的错误“ArtifactTransferException:未能传输工件”的一个很短的提示。
解决问题的步骤:
1. Open folder by running this text (without Quotes) in Search Explorer of Window “%USERPROFILE%\.m2″.
2. After running above command, “m2″ folder of maven will open. Now search for file (without Quotes) “*.lastUpdated”.
3. In this step, delete all the files found by running Step 2.
4. Now go to Eclipse project and select “Maven | Update Dependency” or “Maven | Update Project”.编码愉快。
发布于 2012-11-17 05:57:06
如果所有新工件都有这样的连接错误:默认情况下,m2eclipse使用嵌入式Maven实例,而不是外部Maven安装。内部Maven实例可能不会使用与外部设置相同的Maven设置(例如%USERPROFILE%/.m2/setings.xml),这可能导致内部Maven实例无法通过代理进行连接。
您可以使用Eclipse首选项来添加外部Maven安装,并将其用于从Eclipse内部运行Maven命令。
发布于 2013-07-04 10:27:54
这是我的解决方案。
查找发生错误的jar库,并从.m2回购中删除。然后使用m2eclipse更新项目。对我来说很管用。
https://stackoverflow.com/questions/13425941
复制相似问题