Added FAQ-entry for problem with whitespaces in the path under Windows
[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   <p>
8   In most use-cases, the hibernate4-maven-plugin is used to create a
9   test-database automatically. In this use-cases, it is very likely, that it
10   will result in mistakes/errors, if the goal is executed, when the tests
11   are skipped.
12   For example, one might manually overwrite the database-url with the url of
13   the production-database, in order to run other tests, like starting a
14   local webserver with the
15   <a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin">jetty-maven-plugin</a>.
16   If the export-goal would be executed in such a scenario, it might erase the
17   hole production-database, which is not very desireable.
18   </p>
19   <p>
20   Because of this, the configuration-parameter <code>skip</code> defaults to the value
21   of the proptery <code>maven.test.skip</code>. This way, the execution of the
22   hibernate4-maven-plugin is skipped automatically, when the tests are
23   skipped. Think of it as a build-in security-belt.
24   </p>
25   <p>
26   If you do not like that, because you need the plugin to always execute the
27   export-goal, even if the tests are skipped you can configure that explicitly,
28   by setting the configuration-parameter <code>skip</code> to false:
29   </p>
30   <pre class="prettyprint linenums lang-html">
31 &lt;plugin&gt;
32   &lt;groupId&gt;de.juplo&lt;/groupId&gt;
33   &lt;artifactId&gt;hibernate4-maven-plugin&lt;/artifactId&gt;
34   ...
35   &lt;configuration&gt;
36     &lt;skip&gt;false&lt;/skip&gt;
37   &lt;/configuration&gt;
38 &lt;/plugin&gt;</pre>
39   <p>
40   Or, if you want the export-goal to be executed by default and to be skipped
41   if you say so, you can bind the value of the configuration-parameter
42   <code>skip</code> to a custom property. For example:
43   </p>
44   <pre class="prettyprint linenums lang-html">
45 &lt;plugin&gt;
46   &lt;groupId&gt;de.juplo&lt;/groupId&gt;
47   &lt;artifactId&gt;hibernate4-maven-plugin&lt;/artifactId&gt;
48   ...
49   &lt;configuration&gt;
50     &lt;skip&gt;${foo.bar}&lt;/skip&gt;
51   &lt;/configuration&gt;
52 &lt;/plugin&gt;</pre>
53   <p>
54   This way, the export-goal would be skipped, if you set the property
55   <code>foo.bar</code> to <code>true</code>. For example, if you specify <code>-Dfoo.bar=true</code>
56   on the command-line.
57   </p>
58  </body>
59 </html>