0
votes

I am using Maven 3.3.9 and created a Maven Web Project in Spring tool suite and using Eclipse.

Recently I went through a Tutorial for configuring JPA with maven project.

Tutorial showing JPA configuration

I successfully configured Database connection using EclipseLink2.5

META-INF created under src\main\java

PROBLEM I AM FACING IS After I click ok followed by configuring JPA 2.1 using project Facet properties. Persistence.xml is created automatically under META-INF of src/main/java instead of src/main/resource location.

Is this correct ??

I had already researched a lot on this, in every blog it is mentioned that META-INF should be placed under src/main/java and not under src/main/resource.

Then why is it every time I create a Maven project and configure JPA from Project Facet, Its ends up automatically creation under src/main/java.

please refer my screenshot.

So should I remove this folder META-INF/Persistence.xml from src/main/java and paste it manually under src/main/resource.

1
those are the same folder, just move META-INF to java/main/resourcesRafik BELDI

1 Answers

2
votes

I always move META-INF to src/main/resources. Everything is going to be happier with things configured that way.

Where do I put META-INF in Eclipse?.