From: Kai Moritz Date: Tue, 7 Feb 2017 13:10:31 +0000 (+0100) Subject: Added a FAQ-entry, that explains the configuration of two goals X-Git-Tag: hibernate-maven-plugin-2.1.0~3 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;ds=sidebyside;h=298c7a2b0c0552973ce018cb313de6bab60b2fc2;p=hibernate-maven-plugin Added a FAQ-entry, that explains the configuration of two goals --- 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>