I made a normal JavaSE project with JPA for the persistence part, and it worked, the project consists of only one entity that is persisted in the database and nothing else. I have used the following libraries:
- EclipseLink (JPA 2.1) - eclipselink.jar
- EclipseLink (JPA 2.1) - javax.persistence_2.1.0v201304241213.jar
- EclipseLink (JPA 2.1) -org.eclipse.persistence.jpa.jpql_2.5.2v20140319-9ad6abd.jar
-
PostgresSQL JDBC driver -postgresql-92-1002.jdbc4.jar
But when I tried to do the same Java project in Maven, it gave a zebra, I can not put all the dependencies !. Here is a snippet of dependencies that I could find:
<dependencies> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>javax.persistence</artifactId> <version>2.1.0</version> <type>jar</type> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.2-1002-jdbc4</version> </dependency> </dependencies>
But the other two libraries are still missing. What should I do?
This error always appears when I try to run the project:
Failed to execute goal on project JPA_TEST: Could not resolve dependencies for project example.jpa: JPA_TEST: jar: 1.0: Failure to find org.eclipse.persistence: eclipselink: jar: 2.1 in link was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced - > [Help 1]
I'm using netbeans and trying to do a javaSE maven project the complete application is in the github .