JPA 2.0 API maven artifact

Viewed 21181

I am using JPA 2.0 and my persistence provider is Hibernate; however, I'd like to just include a standard API from javax, but in central, there is no 2.0 artifact. I am currently using the Hibernate JPA 2.0 artifact, but I'd like to use something more standard.

Is this possible?

Thanks,

Walter

4 Answers

Currently (Q1 2020) the default artifact is

<dependency>
  <groupId>jakarta.persistence</groupId>
  <artifactId>jakarta.persistence-api</artifactId>
  <version>2.2.3</version>
</dependency>

An older artifact of javax.persistence-api is also available at maven central, but is superseded by the jakarta version.

<dependency>
  <groupId>javax.persistence</groupId>
  <artifactId>javax.persistence-api</artifactId>
  <version>2.2</version>
</dependency>

The code is maintained in this github repo.

Related