For my projects Necessity i regroup all the persistence.xml entries in one core project which i bind as maven dependency wherever i need.
The problem is that the eclipse IDE is always complaining about
No persistence.xml file found in project
Is there away to keep eclipse quiet about this? Thanks
If you are using Eclipse:(1) Select: (Your Project) -> Properties -> JPA; (2) Look for "Persistent class management" and select the option "Discover annotated classes automatically"; (3) Press "Apply".
If you package the persistence unit as a set of classes in a WAR file, persistence. xml should be located in the WAR file's WEB-INF/classes/META-INF directory.
The persistence. xml configuration file is used to configure a given JPA Persistence Unit. The Persistence Unit defines all the metadata required to bootstrap an EntityManagerFactory , like entity mappings, data source, and transaction settings, as well as JPA provider configuration properties.
Thanks to sionnach733 who put me on the right way
Window->Preferences->Java Persistence-> JPA-> Errors/warnings-> Project
Then change it from error to whatever you like(warning/info/ignore). You could also choose configure project specific settings if you don't want it to affect other projects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With