Where can I find a JPA2 Maven dependency?

后端 未结 7 1801
情话喂你
情话喂你 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:17

    As of today, I think the most up to date one is:

                                              
        org.hibernate.javax.persistence
        hibernate-jpa-2.1-api    
        1.0.0.Final                    
    
    

    This is how you can use JPA in a maven:

    
        org.hibernate.javax.persistence
        hibernate-jpa-2.1-api
        1.0.0.Final
        compile
    
    
    
        javax.transaction
        javax.transaction-api
        1.2
        compile
    
    
    
        org.hibernate
        hibernate-entitymanager
        4.3.10.Final
        runtime
        
            
                org.hibernate.javax.persistence
                hibernate-jpa-2.1-api
            
            
                org.jboss.spec.javax.transaction
                jboss-transaction-api_1.2_spec
            
            
                xml-apis
                xml-apis
            
            
                org.jboss.logging
                jboss-logging
            
        
    
    

提交回复
热议问题