Can't find the "org.eclipse.persistence" Maven dependency
I installed Eclipse Helios with the m2eclipse maven plugin.
I want to create an application using JPA. So, what I do is: New > Maven Project then I select the maven default archetype.
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 usi开发者_运维百科ng?
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>
This is documented in the EclipseLink/Maven page.
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.
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
...
<repositories>
<repository>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
You can check below link. I found eclipse JARs on this link.
However, no idea about how to add it on Nexus.
http://dev.nightlabs.org/maven-repository/repo/
精彩评论