Pac*_*ver 6 eclipse m2eclipse maven
<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>
Run Code Online (Sandbox Code Playgroud)
能够使用标准mvn命令从命令行成功清理,编译和安装此项目...
但是,在Eclipse Juno的"问题"窗格中,我有以下2个错误:
缺少工件org.kitchen-eel:json-schema-validator:jar:1.2.1 pom.xml /com.cloudst line 45 Maven依赖问题
ArtifactTransferException:无法传输org.kitchen-eel:json-schema-validator:jar:1.2.1
来自http://repo.maven.apache.org/maven2的缓存在本地存储库中,在中心的更新间隔过去或强制更新之前,不会重新尝试解析.原始错误:无法传输工件org.kitchen-eel:json-schema-validator:jar:1.2.1 from/to central(http://repo.maven.apache.org/maven2):
为什么它在命令行中工作但m2eclipse发布了问题?
感谢您抽时间阅读...
sri*_*_bb 20
这是解决Eclipse中Maven项目中可能出现的错误"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”.
Run Code Online (Sandbox Code Playgroud)
快乐的编码.
如果您对所有新工件都遇到这样的连接错误:m2eclipse 默认使用嵌入式 Maven 实例,而不是外部 Maven 安装。内部 Maven 实例可能不会使用与外部相同的 Maven 设置(例如 %USERPROFILE%/.m2/settings.xml),这可能会导致内部 Maven 实例无法通过您的代理进行连接。
您可以使用 Eclipse 首选项添加外部 Maven 安装,并使用它从 Eclipse 内部运行 Maven 命令。