Adding JPA support to an existing Maven project in IntelliJ
<p>I've been working on a project in IntelliJ for a while now using Maven (My god, maven is cool!). For the persistence I wanted to use JPA.</p>

<p>The issue is that I'm not sure how I can enable JPA support for my existing project, following <a href="https://www.jetbrains.com/help/idea/2016.1/enabling-jpa-support.html" rel="nofollow noreferrer">this guide</a> didn't work since my code still can't use tags such as <code>@Entity</code>. </p>

<p>It looks like IntelliJ is adding a new package (?) for JPA that my existing code can't access. Here's my package structure:</p>

<p><a href="https://i.stack.imgur.com/ZaFze.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZaFze.png" alt="Package structure"></a></p>

<p>My existing code is in the src directory, while IntelliJ created the JPA directory for JPA. </p>

<p>Is there something I can do to add JPA to the existing code, or should I move my existing code to the JPA directory? I would like to keep using Maven.</p>

<p>Thanks!</p>