The Postgresql driver was not found for maven's dependency

advertisements

I am running a spring project with maven and I am trying to use postgresql. I've added the dependency to pom.xml, but at tomcat startup, I get the following error:

java.lang.ClassNotFoundException: org.postgresql.Driver

pom.xml dependency:

<dependency>
  <groupId>org.postgresql</groupId>
  <artifactId>postgresql</artifactId>
  <version>9.3-1101-jdbc41</version>
</dependency>

It appears that Maven isn't downloading the jar so the Driver class is not found. Any ideas?


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.