JUnit testcase passes with eclipse but fails with maven build

后端 未结 2 620
甜味超标
甜味超标 2021-01-20 22:38

I wrote a JUnit test case for JPA using spring. The testcase passes in eclips. But if I execute the same testcase using maven (mvn test) it fails.

My test case is :

2条回答
  •  时光取名叫无心
    2021-01-20 22:53

    It looks like you run in a Problem with the Java EE API package that contains only empty interfaces.

    Replace

    
        javaee
        javaee-api
    
    

    by:

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

    More details can be found here.

提交回复
热议问题