I have the following Java code which errors on when I run
mvn clean install
In my source code, I have the following imports
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
and in my pom.xml I had the following
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
and I was getting the following error
error: package javax.persistence does not exist
I thought that maybe there was an error with the entry in the pom, so I tried to change the pom to the following
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
and I still get the following error. I am not sure what's causing the issue and how to fix it.