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" />
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
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.
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.
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:
30 <pre class="prettyprint linenums lang-html">
32 <groupId>de.juplo</groupId>
33 <artifactId>hibernate4-maven-plugin</artifactId>
36 <skip>false</skip>
37 </configuration>
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:
44 <pre class="prettyprint linenums lang-html">
46 <groupId>de.juplo</groupId>
47 <artifactId>hibernate4-maven-plugin</artifactId>
50 <skip>${foo.bar}</skip>
51 </configuration>
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>