Added a FAQ-entry, that explains the configuration of two goals
authorKai Moritz <kai@juplo.de>
Tue, 7 Feb 2017 13:10:31 +0000 (14:10 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 7 Feb 2017 13:14:33 +0000 (14:14 +0100)
src/site/xhtml/pitfalls.xhtml

index a8eb5ab..0743880 100644 (file)
@@ -210,5 +210,42 @@ mvn hibernate:create -Dhibernate.schema.force=true</pre>
       You should consider to upgrade to the latest version of the plugin.
     </strong>
   </p>
+  <h2>If two goals are specified, the second one is always skipped</h2>
+  <p>
+    If you specify two goals, for example <code>drop</code> and
+    <code>create</code>, each goal has to be specified in its own
+    <code>execution</code>, 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.
+  </p>
+  <p>
+    Example configuration for two goals:
+  </p>
+  <pre class="prettyprint linenums lang-html">
+&lt;executions&gt;
+  &lt;execution&gt;
+    &lt;id&gt;Create Drop-Schema&lt;/id&gt;
+    &lt;phase&gt;test-compile&lt;/phase&gt;
+    &lt;goals&gt;
+      &lt;goal&gt;drop&lt;/goal&gt;
+    &lt;/goals&gt;
+    &lt;configuration&gt;
+      &lt;outputFile&gt;db-schema/drop-schema.ddl&lt;/outputFile&gt;
+    &lt;/configuration&gt;
+  &lt;/execution&gt;
+  &lt;execution&gt;
+    &lt;id&gt;Create Create-Schema&lt;/id&gt;
+    &lt;phase&gt;test-compile&lt;/phase&gt;
+    &lt;goals&gt;
+      &lt;goal&gt;create&lt;/goal&gt;
+    &lt;/goals&gt;
+    &lt;configuration&gt;
+      &lt;outputFile&gt;db-schema/create-schema.ddl&lt;/outputFile&gt;
+    &lt;/configuration&gt;
+  &lt;/execution&gt;
+&lt;/executions&gt;</pre>
  </body>
 </html>