Cannot find database driver: org.postgresql.Driver
Edit:
The problem was resolved by replacingdriver: org.postgresql.Driver
with driver=org.postgresql.Driver
in the liquibase.properties file.
Original Answer:
You have added the postgresql driver as a dependency of your webapp. But when maven plugins run, they have their own classpath, which is different to your webapp. So you need to include a dependency on the JDBC driver for the plugin itself (same applies to other plugins, e.g. jetty-maven-plugin):
<plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>2.0.5</version> <configuration> <propertyFileWillOverride>true</propertyFileWillOverride> <propertyFile>src/main/resources/liquibase.properties</propertyFile> <changeLogFile>src/main/resources/changelogs/changelog.xml</changeLogFile> </configuration> <executions> <execution> <!-- Another Error: plugin execution not covered by lifecycle configuration..--> <!-- <phase>process-resources</phase> <goals> <goal>update</goal> </goals> --> </execution> </executions> <dependencies> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.1-901-1.jdbc4</version> </dependency> </dependencies></plugin>
Following plugin configuration worked for me.
<plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>3.5.0</version> <configuration> <propertyFile>src/main/resources/liquibase.properties</propertyFile> </configuration> <executions> <execution> <goals> <goal>update</goal> </goals> </execution> </executions> </plugin>