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
All of the other answers to this question deal with the issue by fooling Eclipse into not complaining about the error.
The correct solution to the issue is to remove the JPA Facet from your project. You can do that by right-clicking the project in Project Explorer, select Properties from the menu. From there, go to "Project Facets", and ensure the JPA entry is unchecked. Click Apply, then OK. Go to the Project menu and select Clean. This will remove the spurious error.