title: Create database from liquibase maven plugin
body: <p>I'm able to run liquibase fine against an existing database but I'm trying to also automate the creation of the database. </p>
  
  <p>I'm using the maven plugin with the config below:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.liquibase&lt;/groupId&gt;
              &lt;artifactId&gt;liquibase-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.5.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;propertyFile&gt;src/main/resources/liquibase.properties&lt;/propertyFile&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;update&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>And my liquibase.properties file has the following:</p>
  
  <pre><code>driver=org.postgresql.Driver
  url=jdbc:postgresql://localhost:5432/mydb?createDatabaseIfNotExist=true
  username=postgres
  password=mypass
  changeLogFile=db.changelog.xml
  referenceUsername=postgres
  referencePassword=${database.password}
  </code></pre>
  
  <p>According to another <a href="https://stackoverflow.com/questions/18322876/liquibase-refuses-to-create-a-database-that-doesnt-exist">question</a> on SO adding the URL parameter createDatabaseIfNotExist=true should create the db when the plugin update goal is run.  However, I get the following error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.0:update (default-cli) on project accommodation: Error setting up or running Liquibase: liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: FATAL: database "mydb" does not exist -&gt; [Help 1]
  </code></pre>