One of the classes of my post-graduate was the Java Persistence API (JPA).
The teacher used the “normal” way to create the projects: Eclipse,
create libraries with jars that’s needed and create the
EntityManagerFactory instance by hand.
It works, but IMHO, should never be used in production. In my examples and work, I used a standard architecture that I built. It’s using Maven, JPA2, EclipseLink, and MySQL Google Guice.