mardi 24 mars 2015

Eclipse Maven - Build Project with Multiple Module dont find JPA Annotations(@Id, @Table ecc)

In Eclipse, i've created a project with packaging POM that contains 3 Project (i'm creating a client-server application):


It is composed to 3 modules:



<modules>
<module>LANAlertClient</module>
<module>LANAlertServer</module>
<module>LANAlertService</module>
</modules>



  • LANAlertClient -> Will be my client

  • LANAlertServer -> Will me My Server

  • LanAlertservice -> Will contains all the shared classes (such as RMI Interfaces, Socket Object etc)


Now i have created the 3 project and all depends from LANAlert (that is the packaging POM).


Server have Services artifact and Client have Services Artifact:


Now, when i run mvn clean package on LANAlert (that is the container) it successfully compile LANServices and LANClient but fail with LANServer, that have JPA annotations, all errors are like this:



package javax.persistence does not exist
error: cannot find symbol
[ERROR] symbol: class Entity


Looking on the classes that have that annotations i have no errors, and all import are correct.


I've tried to include that dependecies on LANAlert(the container) pom.xml file and on LANServer pom.xml file, but the results is the same.


Could someone help me to resolve this?


Aucun commentaire:

Enregistrer un commentaire