I am trying to use jdbc Postgres to connect to a database in Java (IDE Eclipse framework Vaadin maven project build). In pom.xml, I manually insert the packing tag into the jar groupId, artifactId and Version
& lt; dependency & gt;
& lt; groupId & gt; org.postgresql & lt; / groupId & gt;
& lt; artifactId & gt; postgresql & lt; / artifactId & gt;
& lt; version & gt; 9.4.1208-jdbc42-atlassian-hosted & lt; / version & gt;
& lt; / dependency & gt; `
and I 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 correctly?
Previously wrote one article about error java.lang.ClassNotFoundException: org.postgresql.Driver
here is the actual link for the article
There I had a problem with the driver, at the moment while adding driver org.postgresql
Answer 1, authority 100%
Something is wrong with your version.
Maybe you mean this?
& lt;! - https://mvnrepository.com/artifact/org.postgresql/postgresql - & gt;
& lt; dependency & gt;
& lt; groupId & gt; org.postgresql & lt; / groupId & gt;
& lt; artifactId & gt; postgresql & lt; / artifactId & gt;
& lt; version & gt; 9.4.1208-atlassian-1 & lt; / version & gt;
& lt; / dependency & gt;
Look inside the repository which version you need.