« Return to Thread: JPA 2.0 Maven Artifact

Re: JPA 2.0 Maven Artifact

by Petr Jiricka :: Rate this Message:

| View in Thread

Hi Lexi,

the truth is that your persistence implementation will be vendor-
dependent (you have to make a choice between Hibernate, EclipseLink  
and Kodo), so you will end up with vendor-dependent code anyway. For  
example, when using EclipseLink, you would normally use:

ftp://ftp.ing.umu.se/mirror/eclipse/rt/eclipselink/maven.repo/org/eclipse/persistence/javax.persistence/2.0.1/
ftp://ftp.ing.umu.se/mirror/eclipse/rt/eclipselink/maven.repo/org/eclipse/persistence/eclipselink/2.1.0/

I.e. add repository:

         <repository>
             <url>http://ftp.ing.umu.se/mirror/eclipse/rt/eclipselink/maven.repo 
</url>
             <id>eclipselink</id>
             <layout>default</layout>
             <name>Repository for library Library[eclipselink]</name>
         </repository>

Then you can use javax.persistence as:

         <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <artifactId>javax.persistence</artifactId>
             <version>2.0.0</version>
         </dependency>

Petr

On Jul 27, 2010, at 8:14 AM, Aleksei Valikov wrote:

> Hi,
>
> I'm looking for the JPA 2.0 Maven artifact. Analogous to
> javax.persistence:persistence-api:1.0 here
>
> http://repo1.maven.org/maven2/javax/persistence/persistence-api/1.0/
>
> I was expecting something like javax.persistence:persistence-api:2.0,
> but there isn't any. Hibernate uses something like
> org.hibernate.javax.persistence:hibernate-jpa-2.0-api - a bit too
> vendor-specific for my taste.
>
> What would be the standard artifact to use?
>
> Bye.
> /lexi

 « Return to Thread: JPA 2.0 Maven Artifact