- But be aware, that in this case the database-url, that is
- build in the application is the same that is used while testing, where
- the database is droped and recreated by the plugin.
+ This would create the configured database.
+ If you want it to be droped beforehand, you have to add the goal
+ <code>drop</code>:
+ </p>
+ <pre class="prettyprint linenums lang-html">
+<plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>drop</goal>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+</plugin></pre>
+ <p>
+ A correspondin goal for the command <code>update</code> is missing in this
+ version, but we are planning to implement it in near feature.
+ </p>
+ <p>
+ In order to let this configuration work, your configuration file must
+ contain a complete valid configuration for the database, that you want
+ to use.
+ A simple example <code>hibernate.properties</code>-file may look like this:
+ </p>
+ <pre class="prettyprint linenums lang-properties">
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.connection.url=jdbc:h2:file:./target/db
+hibernate.connection.driver_class=org.h2.Driver
+hibernate.connection.username=sa
+hibernate.connection.password=</pre>
+ <p>
+ But be aware, that using this configuration-approach the database-url,
+ that is build in the application is the same that is used while testing,
+ where the database is droped and recreated by the plugin.