Reworked project-documentation: moved to maven-thymeleaf-skin
[hibernate4-maven-plugin] / src / site / xhtml / skip.xhtml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3  <head>
4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5  </head>
6  <body>
7   <header><h1>Skipping Execution</h1></header>
8   <p>
9   In most use-cases, the hibernate-maven-plugin is used to create a
10   test-database automatically. In this use-cases, it is very likely, that it
11   will result in mistakes/errors, if the goal is executed, when the tests
12   are skipped.
13   For example, one might manually overwrite the database-url with the url of
14   the production-database, in order to run other tests, like starting a
15   local webserver with the
16   <a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin">jetty-maven-plugin</a>.
17   If the drop-goal would be executed in such a scenario, it might erase the
18   hole production-database, which is not very desireable.
19   </p>
20   <p>
21   Because of this, the configuration-parameter <code>skip</code> defaults to the value
22   of the proptery <code>maven.test.skip</code>. This way, the execution of the
23   hibernate-maven-plugin is skipped automatically, when the tests are
24   skipped. Think of it as a build-in security-belt.
25   </p>
26   <p>
27   If you do not like that, because you need the plugin to always,
28   even if the tests are skipped you can configure that explicitly,
29   by setting the configuration-parameter <code>skip</code> to false:
30   </p>
31   <pre class="prettyprint linenums lang-html">
32 &lt;plugin&gt;
33   &lt;groupId&gt;de.juplo&lt;/groupId&gt;
34   &lt;artifactId&gt;hibernate-maven-plugin&lt;/artifactId&gt;
35   ...
36   &lt;configuration&gt;
37     &lt;skip&gt;false&lt;/skip&gt;
38   &lt;/configuration&gt;
39 &lt;/plugin&gt;</pre>
40   <p>
41   Or, if you want the plugin to be executed by default and to be skipped
42   if you say so, you can bind the value of the configuration-parameter
43   <code>skip</code> to a custom property. For example:
44   </p>
45   <pre class="prettyprint linenums lang-html">
46 &lt;plugin&gt;
47   &lt;groupId&gt;de.juplo&lt;/groupId&gt;
48   &lt;artifactId&gt;hibernate-maven-plugin&lt;/artifactId&gt;
49   ...
50   &lt;configuration&gt;
51     &lt;skip&gt;${foo.bar}&lt;/skip&gt;
52   &lt;/configuration&gt;
53 &lt;/plugin&gt;</pre>
54   <p>
55   This way, the plugin would be skipped, if you set the property
56   <code>foo.bar</code> to <code>true</code>. For example, if you specify <code>-Dfoo.bar=true</code>
57   on the command-line.
58   </p>
59  </body>
60 </html>