Is it ok to take it from Glassfish project ( glassfish-persistence-api) or may be there is a Hibernate jar?
In general, i agree with above answers that recommend to add maven dependency, but i prefer following solution.
Add a dependency with API classes for full JavaEE profile:
7.0
5.1.3.Final
javax
javaee-api
${javaee-api.version}
provided
Also add dependency with particular JPA provider like antonycc suggested:
org.hibernate
hibernate-entitymanager
${hibernate-entitymanager.version}
Note
in API dependency section: this means that corresponding jar will not be exported into artifact's lib/
, but will be provided by application server. Make sure your application server implements specified version of JavaEE API.