Postgresql driver not found for maven dependency

What also worked for me if you are on intellj: right klick pom.xml->Maven->Reimport Don't know why it doesn't download the artifact on copy paste.


When I put this in my pom, the artifact gets downloaded. Maybe you should clean your maven repository cache or delete the folders manually and retry.


If you came here for "missing artifact" error, This worked for me:

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.4.1212</version>
    </dependency>

For PostgreSQL 10 I use this:

       <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.1.4</version>
        </dependency>