1
I did a normal Javase project with JPA for the persistence part, and it worked, the project consists only of an entity that is persisted in the bank and nothing else. I 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 -postgresql-92-1002.jdbc4.jar JDBC driver
But when I tried to do the same Java project on Maven, it gave a zebra, I can’t put all dependencies!.
Here’s an excerpt from the dependencies I was able to 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_TESTE: Could not resolve dependencies for project example.jpa:JPA_TESTE:jar:1.0: Failure to find org.eclipse.persistence:eclipselink:jar:2.1 in http://repo.maven.apache.org/maven2 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 am using netbeans and trying to do a javaSE Maven project the full application is on github.
See if it helps you: http://stackoverflow.com/questions/3003421/how-to-setup-eclipselink-with-jpa
– adelmo00