X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fsite%2Fxhtml%2Fpitfalls.xhtml;h=07438808fabacb653e5a5d134640fc3349f494af;hp=a8eb5ab7c204aa82106b7d44ee5678fed57cf9ed;hb=298c7a2b0c0552973ce018cb313de6bab60b2fc2;hpb=7104f9bf07991ab3a83717d2e699db6686f8fcb0 diff --git a/src/site/xhtml/pitfalls.xhtml b/src/site/xhtml/pitfalls.xhtml index a8eb5ab7..07438808 100644 --- a/src/site/xhtml/pitfalls.xhtml +++ b/src/site/xhtml/pitfalls.xhtml @@ -210,5 +210,42 @@ mvn hibernate:create -Dhibernate.schema.force=true You should consider to upgrade to the latest version of the plugin.

+

If two goals are specified, the second one is always skipped

+

+ If you specify two goals, for example drop and + create, each goal has to be specified in its own + execution, so that you can specify two different + output-files for the two goals. + Otherwise, both goals will use the same output-file and the goal, that + is run second, will always skip, becaus it will find, that the output + file already exists and conclude, that its work was already done in a + prior run. +

+

+ Example configuration for two goals: +

+
+<executions>
+  <execution>
+    <id>Create Drop-Schema</id>
+    <phase>test-compile</phase>
+    <goals>
+      <goal>drop</goal>
+    </goals>
+    <configuration>
+      <outputFile>db-schema/drop-schema.ddl</outputFile>
+    </configuration>
+  </execution>
+  <execution>
+    <id>Create Create-Schema</id>
+    <phase>test-compile</phase>
+    <goals>
+      <goal>create</goal>
+    </goals>
+    <configuration>
+      <outputFile>db-schema/create-schema.ddl</outputFile>
+    </configuration>
+  </execution>
+</executions>