Is there a way to turn a normal Eclipse Project into a JPA Project?
I have a normal project with Entities in it and a Persistence.xml file, but it is not an eclipse recognized JPA project. What can I do?
Is there a way to turn a normal Eclipse Project into a JPA Project?
I have a normal project with Entities in it and a Persistence.xml file, but it is not an eclipse recognized JPA project. What can I do?
You could also Right Click the eclipse project and click on configure which allows you to convert to a JPA project.
Eclipse knows the project type via the .project file in the root of the project. Try creating a new JPA project and compare the .project files.
Edit: You may also need to compare the .classpath files.
project properties --> project facets. There you can click on the JPA check-box and you have an JPA project.
You'll want to modify:
As Chris Nava said, the best way to do that is to create an empty JPA project and compare it with yours.
I found it is sometimes necessary to delete your original project (do not "delete project content on disk" !) and reimport it to make Eclipse happy.
Modifying the .project file by hand is the best way to add different "natures" to an Eclipse project. Like ptyx said: compare your current .project file to that of a project where the nature is what you want and merge the differences.