2 To Skip or not to skip: that is the question
7 In most use-cases, the hibernate4-maven-plugin is used to create a
8 test-database automatically. In this use-cases, it is very likely, that it
9 will result in mistakes/errors, if the goal is executed, when the tests
11 For example, one might manually overwrite the database-url with the url of
12 the production-database, in order to run other tests, like starting a
13 local webserver with the
14 {{{http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin}jetty-maven-plugin}}.
15 If the export-goal would be executed in such a scenario, it might erase the
16 hole production-database, which is not very desireable.
18 Because of this, the configuration-parameter <<<skip>>> defaults to the value
19 of the proptery <<<maven.test.skip>>>. This way, the execution of the
20 hibernate4-maven-plugin is skipped automatically, when the tests are
21 skipped. Think of it as a build-in security-belt.
23 If you do not like that, because you need the plugin to always execute the
24 export-goal, even if the tests are skipped you can configure that explicitly,
25 by setting the configuration-parameter <<<skip>>> to false:
29 <groupId>de.juplo</groupId>
30 <artifactId>hibernate4-maven-plugin</artifactId>
38 Or, if you want the export-goal to be executed by default and to be skipped
39 if you say so, you can bind the value of the configuration-parameter
40 <<<skip>>> to a custom property. For example:
44 <groupId>de.juplo</groupId>
45 <artifactId>hibernate4-maven-plugin</artifactId>
48 <skip>${foo.bar}</skip>
53 This way, the export-goal would be skipped, if you set the property
54 <<<foo.bar>>> to <<<true>>>. For example, if you specify <<<-Dfoo.bar=true>>>