I'm trying to use Postgres jdbc to connect to a Java database (IDE Eclipse framework Vaadin build project maven). In pom.xml, I manually insert the packaging tag in the jar groupId, artifactId and Version

<dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.4.1208-jdbc42-atlassian-hosted</version> </dependency>` 

and get errors:

Failed to execute goal on project OR: Could not resolve dependencies for project rts.appUI:OR:war:1.0-SNAPSHOT: Failure to find org.postgresql:postgresql:jar:9.4.1208-jdbc42-atlassian-hosted in

Tell me how to add a driver?

Earlier I wrote one article about the java.lang.ClassNotFoundException error: org.postgresql.Driver here is the actual link for the article. There I had a problem with the driver, at the moment when adding the driver org.postgresql

    1 answer 1

    You have something wrong with the version. Maybe this means?

     <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.4.1208-atlassian-1</version> </dependency> 

    Look in the repository itself which version you need.