JPA 2.0 Maven Artifact

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

JPA 2.0 Maven Artifact

Aleksei Valikov
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
Reply | Threaded
Open this post in threaded view
|

Re: JPA 2.0 Maven Artifact

Petr Jiricka
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

Reply | Threaded
Open this post in threaded view
|

Re: JPA 2.0 Maven Artifact

Aleksei Valikov
Hi,

> 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.

I do not understand why JPA 2.0 API JAR should be vendor-dependent. It
contradicts the whole idea of having a standardized public API.

I only need a JAR which contains standard JPA things - those under
javax.persistence.* packages.

With JPA 1 I'm successfully writing vendor-independent JPA code (by
using standard annotations only). Are you telling me that this has
changed in JPA 2?

Bye.
/lexi
Reply | Threaded
Open this post in threaded view
|

Re: JPA 2.0 Maven Artifact

Mitesh Meswani-2
In reply to this post by Petr Jiricka
  Just wanted to clarify couple of points
1. EcliseLink maven repo location:
Refer to http://wiki.eclipse.org/EclipseLink/Maven for official location
of the repo. The location below points to one of the mirrors directly.

2. vendor-dependency:
Obviously all the interface definition will be identical between
javax.persitence.jar from various vendors. The difference may be in
extensions provided by verndors. For example EclipseLink's
javax.pesitence.jar is capable of functioning inside OSGI environment.

Thanks,
Mitesh

On 7/27/2010 4:48 AM, Petr Jiricka wrote:

> 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
>

Reply | Threaded
Open this post in threaded view
|

Re: JPA 2.0 Maven Artifact

Petr Jiricka
In reply to this post by Aleksei Valikov
Sorry about the confusion - as Mitesh clarifies, JPA 2.0 API is vendor-
independent. There are only several different repository locations you  
can use.

Petr

On Jul 27, 2010, at 2:02 PM, Aleksei Valikov wrote:

> Hi,
>
>> 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.
>
> I do not understand why JPA 2.0 API JAR should be vendor-dependent. It
> contradicts the whole idea of having a standardized public API.
>
> I only need a JAR which contains standard JPA things - those under
> javax.persistence.* packages.
>
> With JPA 1 I'm successfully writing vendor-independent JPA code (by
> using standard annotations only). Are you telling me that this has
> changed in JPA 2?
>
> Bye.
> /lexi

Reply | Threaded
Open this post in threaded view
|

Re: JPA 2.0 Maven Artifact

Aleksei Valikov-3
In reply to this post by Mitesh Meswani-2
Hi,

>  Just wanted to clarify couple of points
> 1. EcliseLink maven repo location:
> Refer to http://wiki.eclipse.org/EclipseLink/Maven for official location of
> the repo. The location below points to one of the mirrors directly.
>
> 2. vendor-dependency:
> Obviously all the interface definition will be identical between
> javax.persitence.jar from various vendors. The difference may be in
> extensions provided by verndors. For example EclipseLink's
> javax.pesitence.jar is capable of functioning inside OSGI environment.

Ok, glad I did not misunderstand this.

Anyway, somehow I'm surprized that there's no standard
vendor-independent artifact uploaded to the central repo. This is a
usual practice to have javax.* APIs uploaded to the central
repository. Why is JPA 2 handled differently? Or am I missing
something?

Bye.
/lexi
Reply | Threaded
Open this post in threaded view
|

Re: JPA 2.0 Maven Artifact

Farrukh Najmi
On 07/27/2010 02:28 PM, Aleksei Valikov wrote:
Hi,

  
 Just wanted to clarify couple of points
1. EcliseLink maven repo location:
Refer to http://wiki.eclipse.org/EclipseLink/Maven for official location of
the repo. The location below points to one of the mirrors directly.

2. vendor-dependency:
Obviously all the interface definition will be identical between
javax.persitence.jar from various vendors. The difference may be in
extensions provided by verndors. For example EclipseLink's
javax.pesitence.jar is capable of functioning inside OSGI environment.
    
Ok, glad I did not misunderstand this.

Anyway, somehow I'm surprized that there's no standard
vendor-independent artifact uploaded to the central repo. This is a
usual practice to have javax.* APIs uploaded to the central
repository. Why is JPA 2 handled differently? Or am I missing
something?

Bye.
/lexi

  

+1 on Lexi's suggestion for a vendor-independent maven artifact deployed to central repo.

-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com