Home > Blockchain >  Quarkus javax.persistence without ORM
Quarkus javax.persistence without ORM

Time:08-27

Is it possible to reference a library to get only javax.persistence without having to configure hibernate or other ORM?

I have a library that I want to contain my entities, which will be added to other projects as part of a Maven repository reference. The Data Access will actually only happen on the project using this as a dependency.

I don't want to have to configure hibernate or add a reference to it just to gain access to the JPA api.

Any ideas?

Thank you

CodePudding user response:

Maybe (in Maven):

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

CodePudding user response:

If you use a Java EE server :

<dependency>
    <groupId>jakarta.persistence</groupId>
    <artifactId>jakarta.persistence-api</artifactId>
    <scope>provided</scope>
</dependency>
  • Related