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">
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <header><h1>Skipping Execution</h1></header>
9 In most use-cases, the hibernate4-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
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 export-goal would be executed in such a scenario, it might erase the
18 hole production-database, which is not very desireable.
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 hibernate4-maven-plugin is skipped automatically, when the tests are
24 skipped. Think of it as a build-in security-belt.
27 If you do not like that, because you need the plugin to always execute the
28 export-goal, even if the tests are skipped you can configure that explicitly,
29 by setting the configuration-parameter <code>skip</code> to false:
31 <pre class="prettyprint linenums lang-html">
33 <groupId>de.juplo</groupId>
34 <artifactId>hibernate4-maven-plugin</artifactId>
37 <skip>false</skip>
38 </configuration>
41 Or, if you want the export-goal 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:
45 <pre class="prettyprint linenums lang-html">
47 <groupId>de.juplo</groupId>
48 <artifactId>hibernate4-maven-plugin</artifactId>
51 <skip>${foo.bar}</skip>
52 </configuration>
55 This way, the export-goal 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>