Where can I find a JPA2 Maven dependency?

后端 未结 7 1795
情话喂你
情话喂你 2020-12-09 01:50

I\'m trying to build an implementation agnostic maven module which relies on JPA2. Unfortunately, the only Maven JPA dependency is JPA1 based, and consequently, I cannot us

7条回答
  •  自闭症患者
    2020-12-09 02:23

    I know this is a quite old post, if you want to go agnostic from the implementation, then you should use the Java EE API dependency instead.

    Just add to your POM:

    
        javax
        javaee-api
        ${jee.version}
        provided
    
    

    Where the ${jee.version} is your desired Java EE version. I'm currently using 7.0. It has all EJB, JPA and JSF APIs dependencies.

提交回复
热议问题