找不到"org.eclipse.persistence" Maven依赖 [英] Can't find the "org.eclipse.persistence" Maven dependency
问题描述
我使用m2eclipse maven插件安装了Eclipse Helios.
I installed Eclipse Helios with the m2eclipse maven plugin.
我想使用JPA创建一个应用程序.因此,我要做的是:新建> Maven项目,然后选择Maven默认原型.
I want to create an application using JPA. So, what I do is: New > Maven Project then I select the maven default archetype.
问题是我想添加找不到的"org.eclipse.persistence"依赖项. 它在哪里?我们可以手动添加吗?我应该更新一种存储库"吗?
The problem is that I want to add the "org.eclipse.persistence" dependency that I can't find. Where is it? Can we add it manually? Should I update a sort of "repository"?
然后,这是我使用的正确原型吗?
Then, is it the right archetype that I'm using?
推荐答案
Eclipse Link在Maven中央存储库中不可用,您需要手动添加其存储库.例如,要使用EclipseLink 2.0的完整"版本(您没有提到要查找的工件):
EclipseLink is not available in Maven central repository, you need to add its repository manually. For example, to use the "full" version of EclipseLink 2.0 (you didn't mention the artifact you're looking for):
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
...
</dependency>
<dependencies>
...
<repositories>
<repository>
<id>EclipseLink Repo</id>
<url>http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo</url>
</repository>
...
</repositories>
这在 EclipseLink/Maven 页面中进行了记录.
This is documented in the EclipseLink/Maven page.
关于您使用的原型,没有更多关于您要创建的项目类型的详细信息就不可能回答.而且无论如何,您总是可以在事后修改POM.
Regarding the archetype you're using, it's impossible to answer without more details on the kind of project you want to create. And anyway, you can always modify the POM after the facts.
这篇关于找不到"org.eclipse.persistence" Maven依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!