I have very simple persistance.xml file:
The persistence.xml has a jar-file that you can use. From the Java EE 5 tutorial:
This unit manages orders and customers. It does not rely on any vendor-specific features and can therefore be deployed to any persistence provider. jdbc/MyOrderDB MyOrderApp.jar com.widgets.Order com.widgets.Customer
This file defines a persistence unit
named OrderManagement, which uses a
JTA-aware data source jdbc/MyOrderDB. The jar-file and class elements specify managed persistence classes: entity classes, embeddable classes, and mapped superclasses. The jar-file element specifies JAR files that are visible to the packaged persistence unit that contain managed persistence classes, while the class element explicitly names managed persistence classes.
In the case of Hibernate, have a look at the Chapter2. Setup and configuration too for more details.
EDIT: Actually, If you don't mind not being spec compliant, Hibernate supports auto-detection even in Java SE. To do so, add the hibernate.archive.autodetection property: