]> juplo.de Git - website/blob
bfc7c714a6ca4b0f2ef5d2dad4059f0137fcde33
[website] /
1 ---
2 title: Goal — hibernate:update
3 weight: 22
4 url: /projects/hibernate-maven-plugin/2.1.2-SNAPSHOT/update-mojo.html
5 layout: article
6 params:
7   canonical: hibernate-maven-plugin/update-mojo.html
8 ---
9 <div id="sili-body">
10
11   
12     <section>
13 <h2><a name="hibernate:update"></a>hibernate:update</h2>
14       
15 <p><b>Full name</b>:</p>
16       
17 <p>de.juplo:hibernate-maven-plugin:2.1.2-SNAPSHOT:update</p>
18       
19 <p><b>Description</b>:</p>
20       
21 <div>Generate/Execute SQL to update the database-schema according to the
22 configured mappings.</div>
23       
24 <p><b>Attributes</b>:</p>
25       
26 <ul>
27         
28 <li>Requires a Maven project to be executed.</li>
29         
30 <li>Requires dependency resolution of artifacts in scope: <code>runtime</code>.</li>
31         
32 <li>The goal is thread-safe and supports parallel builds.</li>
33         
34 <li>Binds by default to the <a class="externalLink" href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">lifecycle phase</a>: <code>process-classes</code>.</li>
35       </ul>
36       <section>
37 <h3><a name="Optional_Parameters"></a>Optional Parameters</h3>
38         
39 <table class="bodyTable" border="0">
40           
41 <tr class="a">
42             
43 <th>Name</th>
44             
45 <th>Type</th>
46             
47 <th>Since</th>
48             
49 <th>Description</th>
50           </tr>
51           
52 <tr class="b">
53             
54 <td><b><a href="#createNamespaces">createNamespaces</a></b></td>
55             
56 <td><code>Boolean</code></td>
57             
58 <td><code>2.0</code></td>
59             
60 <td>Specifies whether to automatically create also the database
61 schema/catalog.<br /><b>Default value is</b>: <code>false</code>.<br /><b>User property is</b>: <code>hibernate.hbm2dll.create_namespaces</code>.</td>
62           </tr>
63           
64 <tr class="a">
65             
66 <td><b><a href="#delimiter">delimiter</a></b></td>
67             
68 <td><code>String</code></td>
69             
70 <td><code>1.0</code></td>
71             
72 <td>Delimiter in output-file. 
73
74 <p><b>Important:</b> This configuration value can only be
75 configured through the <code>pom.xml</code>, or by the definition
76 of a system-property, because it is not known by Hibernate nor JPA
77 and, hence, not picked up from their configuration!</p><br /><b>Default value is</b>: <code>;</code>.<br /><b>User property is</b>: <code>hibernate.hbm2ddl.delimiter</code>.</td>
78           </tr>
79           
80 <tr class="b">
81             
82 <td><b><a href="#dialect">dialect</a></b></td>
83             
84 <td><code>String</code></td>
85             
86 <td><code>1.0</code></td>
87             
88 <td>Hibernate dialect.<br /><b>User property is</b>: <code>hibernate.dialect</code>.</td>
89           </tr>
90           
91 <tr class="a">
92             
93 <td><b><a href="#driver">driver</a></b></td>
94             
95 <td><code>String</code></td>
96             
97 <td><code>1.0</code></td>
98             
99 <td>SQL-Driver name.<br /><b>User property is</b>: <code>hibernate.connection.driver_class</code>.</td>
100           </tr>
101           
102 <tr class="b">
103             
104 <td><b><a href="#execute">execute</a></b></td>
105             
106 <td><code>Boolean</code></td>
107             
108 <td><code>2.0</code></td>
109             
110 <td>Excecute the generated SQL. If set to <code>false</code>, only the
111 SQL-script is created and the database is not touched. 
112
113 <p><b>Important:</b> This configuration value can only be
114 configured through the <code>pom.xml</code>, or by the definition
115 of a system-property, because it is not known by Hibernate nor JPA
116 and, hence, not picked up from their configuration!</p><br /><b>Default value is</b>: <code>true</code>.<br /><b>User property is</b>: <code>hibernate.schema.execute</code>.</td>
117           </tr>
118           
119 <tr class="a">
120             
121 <td><b><a href="#force">force</a></b></td>
122             
123 <td><code>boolean</code></td>
124             
125 <td><code>1.0</code></td>
126             
127 <td>Force generation/execution 
128
129 <p>Force the generation and (if configured) the execution of the
130 SQL, even if no modified or newly added annotated classes where
131 found and the configuration was not changed.</p>
132
133 <p><code>skip</code> takes precedence over <code>force</code>.</p>
134
135 <p><b>Important:</b> This configuration value can only be
136 configured through the <code>pom.xml</code>, or by the definition
137 of a system-property, because it is not known by Hibernate nor JPA
138 and, hence, not picked up from their configuration!</p><br /><b>Default value is</b>: <code>false</code>.<br /><b>User property is</b>: <code>hibernate.schema.force</code>.</td>
139           </tr>
140           
141 <tr class="b">
142             
143 <td><b><a href="#format">format</a></b></td>
144             
145 <td><code>Boolean</code></td>
146             
147 <td><code>1.0</code></td>
148             
149 <td>Format output-file.<br /><b>User property is</b>: <code>hibernate.format_sql</code>.</td>
150           </tr>
151           
152 <tr class="a">
153             
154 <td><b><a href="#hibernateConfig">hibernateConfig</a></b></td>
155             
156 <td><code>String</code></td>
157             
158 <td><code>1.1.0</code></td>
159             
160 <td>Path to Hibernate configuration file (.cfg.xml). If this parameter
161 is specified, the plugin will try to load configuration values from
162 a file with the given path or a ressource on the classpath with the
163 given name. If both fails, the execution of the plugin will fail. 
164
165 <p>If this parameter is not set the plugin will load configuration
166 values from a ressource named <code>hibernate.cfg.xml</code> on the
167 classpath, if it is present, but will not fail if there is no such
168 ressource.</p>
169
170 <p>During ressource-lookup, the test-classpath takes
171 precedence.</p>
172
173 <p>Settings in this file will overwrite settings in the properties
174 file.</p><br /></td>
175           </tr>
176           
177 <tr class="b">
178             
179 <td><b><a href="#hibernateProperties">hibernateProperties</a></b></td>
180             
181 <td><code>String</code></td>
182             
183 <td><code>1.0</code></td>
184             
185 <td>Path to a file or name of a ressource with hibernate properties. If
186 this parameter is specified, the plugin will try to load
187 configuration values from a file with the given path or a ressource
188 on the classpath with the given name. If both fails, the execution
189 of the plugin will fail. 
190
191 <p>If this parameter is not set the plugin will load configuration
192 values from a ressource named <code>hibernate.properties</code> on
193 the classpath, if it is present, but will not fail if there is no
194 such ressource.</p>
195
196 <p>During ressource-lookup, the test-classpath takes
197 precedence.</p><br /></td>
198           </tr>
199           
200 <tr class="a">
201             
202 <td><b><a href="#implicitNamingStrategy">implicitNamingStrategy</a></b></td>
203             
204 <td><code>String</code></td>
205             
206 <td><code>2.0</code></td>
207             
208 <td>Implicit naming strategy<br /><b>User property is</b>: <code>hibernate.implicit_naming_strategy</code>.</td>
209           </tr>
210           
211 <tr class="b">
212             
213 <td><b><a href="#mappings">mappings</a></b></td>
214             
215 <td><code>String</code></td>
216             
217 <td><code>1.0.2</code></td>
218             
219 <td>List of Hibernate-Mapping-Files (XML). Multiple files can be
220 separated with white-spaces and/or commas.<br /><b>User property is</b>: <code>hibernate.mapping</code>.</td>
221           </tr>
222           
223 <tr class="a">
224             
225 <td><b><a href="#outputDirectory">outputDirectory</a></b></td>
226             
227 <td><code>String</code></td>
228             
229 <td><code>1.0</code></td>
230             
231 <td>Classes-Directory to scan. 
232
233 <p>This parameter defaults to the maven build-output-directory for
234 classes. Additionally, all dependencies are scanned for annotated
235 classes.</p>
236
237 <p><b>Important:</b> This configuration value can only be
238 configured through the <code>pom.xml</code>, or by the definition
239 of a system-property, because it is not known by Hibernate nor JPA
240 and, hence, not picked up from their configuration!</p><br /><b>User property is</b>: <code>project.build.outputDirectory</code>.</td>
241           </tr>
242           
243 <tr class="b">
244             
245 <td><b><a href="#outputFile">outputFile</a></b></td>
246             
247 <td><code>String</code></td>
248             
249 <td><code>1.0</code></td>
250             
251 <td>Output file. 
252
253 <p>If the specified filename is not absolut, the file will be
254 created relative to the project build directory
255 (<code>project.build.directory</code>).</p><br /><b>Default value is</b>: <code>update.sql</code>.<br /><b>User property is</b>: <code>hibernate.schema.update</code>.</td>
256           </tr>
257           
258 <tr class="a">
259             
260 <td><b><a href="#password">password</a></b></td>
261             
262 <td><code>String</code></td>
263             
264 <td><code>1.0</code></td>
265             
266 <td>Database password<br /><b>User property is</b>: <code>hibernate.connection.password</code>.</td>
267           </tr>
268           
269 <tr class="b">
270             
271 <td><b><a href="#persistenceUnit">persistenceUnit</a></b></td>
272             
273 <td><code>String</code></td>
274             
275 <td><code>1.1.0</code></td>
276             
277 <td>Name of the persistence-unit. If this parameter is specified, the
278 plugin will try to load configuration values from a
279 persistence-unit with the specified name. If no such
280 persistence-unit can be found, the plugin will throw an exception. 
281
282 <p>If this parameter is not set and there is only one
283 persistence-unit available, that unit will be used automatically.
284 But if this parameter is not set and there are multiple
285 persistence-units available on, the class-path, the execution of
286 the plugin will fail.</p>
287
288 <p>Settings in this file will overwrite settings in the properties
289 or the configuration file.</p><br /></td>
290           </tr>
291           
292 <tr class="a">
293             
294 <td><b><a href="#physicalNamingStrategy">physicalNamingStrategy</a></b></td>
295             
296 <td><code>String</code></td>
297             
298 <td><code>2.0</code></td>
299             
300 <td>Physical naming strategy<br /><b>User property is</b>: <code>hibernate.physical_naming_strategy</code>.</td>
301           </tr>
302           
303 <tr class="b">
304             
305 <td><b><a href="#scanClasses">scanClasses</a></b></td>
306             
307 <td><code>Boolean</code></td>
308             
309 <td><code>2.0</code></td>
310             
311 <td>Wether the project should be scanned for annotated-classes, or not 
312
313 <p>This parameter is intended to allow overwriting of the parameter
314 <code>exclude-unlisted-classes</code> of a
315 <code>persistence-unit</code>. If not specified, it defaults to
316 <code>true</code></p><br /><b>User property is</b>: <code>hibernate.schema.scan.classes</code>.</td>
317           </tr>
318           
319 <tr class="a">
320             
321 <td><b><a href="#scanDependencies">scanDependencies</a></b></td>
322             
323 <td><code>String</code></td>
324             
325 <td><code>1.0.3</code></td>
326             
327 <td>Dependency-Scopes, that should be scanned for annotated classes. 
328
329 <p>By default, only dependencies in the scope <code>compile</code>
330 are scanned for annotated classes. Multiple scopes can be seperated
331 by white space or commas.</p>
332
333 <p>If you do not want any dependencies to be scanned for annotated
334 classes, set this parameter to <code>none</code>.</p>
335
336 <p>The plugin does not scan for annotated classes in transitive
337 dependencies. If some of your annotated classes are hidden in a
338 transitive dependency, you can simply add that dependency
339 explicitly.</p><br /><b>Default value is</b>: <code>compile</code>.<br /><b>User property is</b>: <code>hibernate.schema.scan.dependencies</code>.</td>
340           </tr>
341           
342 <tr class="b">
343             
344 <td><b><a href="#scanTestClasses">scanTestClasses</a></b></td>
345             
346 <td><code>Boolean</code></td>
347             
348 <td><code>1.0.1</code></td>
349             
350 <td>Whether to scan the test-branch of the project for annotated
351 classes, or not. 
352
353 <p>If this parameter is set to <code>true</code> the test-classes
354 of the artifact will be scanned for hibernate-annotated classes
355 additionally.</p>
356
357 <p><b>Important:</b> This configuration value can only be
358 configured through the <code>pom.xml</code>, or by the definition
359 of a system-property, because it is not known by Hibernate nor JPA
360 and, hence, not picked up from their configuration!</p><br /><b>Default value is</b>: <code>false</code>.<br /><b>User property is</b>: <code>hibernate.schema.scan.test_classes</code>.</td>
361           </tr>
362           
363 <tr class="a">
364             
365 <td><b><a href="#show">show</a></b></td>
366             
367 <td><code>Boolean</code></td>
368             
369 <td><code>1.0</code></td>
370             
371 <td>Show the generated SQL in the command-line output.<br /><b>User property is</b>: <code>hibernate.show_sql</code>.</td>
372           </tr>
373           
374 <tr class="b">
375             
376 <td><b><a href="#skip">skip</a></b></td>
377             
378 <td><code>boolean</code></td>
379             
380 <td><code>1.0</code></td>
381             
382 <td>Skip execution 
383
384 <p>If set to <code>true</code>, the execution is skipped.</p>
385
386 <p>A skipped execution is signaled via the maven-property
387 <code>${hibernate.schema.skipped}</code>.</p>
388
389 <p>The execution is skipped automatically, if no modified or newly
390 added annotated classes are found and the dialect was not
391 changed.</p>
392
393 <p><b>Important:</b> This configuration value can only be
394 configured through the <code>pom.xml</code>, or by the definition
395 of a system-property, because it is not known by Hibernate nor JPA
396 and, hence, not picked up from their configuration!</p><br /><b>Default value is</b>: <code>${maven.test.skip}</code>.<br /><b>User property is</b>: <code>hibernate.schema.skip</code>.</td>
397           </tr>
398           
399 <tr class="a">
400             
401 <td><b><a href="#testOutputDirectory">testOutputDirectory</a></b></td>
402             
403 <td><code>String</code></td>
404             
405 <td><code>1.0.2</code></td>
406             
407 <td>Test-Classes-Directory to scan. 
408
409 <p>This parameter defaults to the maven build-output-directory for
410 test-classes.</p>
411
412 <p>This parameter is only used, when <code>scanTestClasses</code>
413 is set to <code>true</code>!</p>
414
415 <p><b>Important:</b> This configuration value can only be
416 configured through the <code>pom.xml</code>, or by the definition
417 of a system-property, because it is not known by Hibernate nor JPA
418 and, hence, not picked up from their configuration!</p><br /><b>User property is</b>: <code>project.build.testOutputDirectory</code>.</td>
419           </tr>
420           
421 <tr class="b">
422             
423 <td><b><a href="#url">url</a></b></td>
424             
425 <td><code>String</code></td>
426             
427 <td><code>1.0</code></td>
428             
429 <td>Database URL.<br /><b>User property is</b>: <code>hibernate.connection.url</code>.</td>
430           </tr>
431           
432 <tr class="a">
433             
434 <td><b><a href="#username">username</a></b></td>
435             
436 <td><code>String</code></td>
437             
438 <td><code>1.0</code></td>
439             
440 <td>Database username<br /><b>User property is</b>: <code>hibernate.connection.username</code>.</td>
441           </tr>
442         </table>
443       </section>
444       <section>
445 <h3><a name="Parameter_Details"></a>Parameter Details</h3>
446         
447 <p><b><a name="createNamespaces">createNamespaces</a>:</b></p>
448         
449 <div>Specifies whether to automatically create also the database
450 schema/catalog.</div>
451         
452 <ul>
453           
454 <li><b>Type</b>: <code>java.lang.Boolean</code></li>
455           
456 <li><b>Since</b>: <code>2.0</code></li>
457           
458 <li><b>Required</b>: <code>No</code></li>
459           
460 <li><b>User Property</b>: <code>hibernate.hbm2dll.create_namespaces</code></li>
461           
462 <li><b>Default</b>: <code>false</code></li>
463         </ul><hr />
464 <p><b><a name="delimiter">delimiter</a>:</b></p>
465         
466 <div>Delimiter in output-file. 
467
468 <p><b>Important:</b> This configuration value can only be
469 configured through the <code>pom.xml</code>, or by the definition
470 of a system-property, because it is not known by Hibernate nor JPA
471 and, hence, not picked up from their configuration!</p></div>
472         
473 <ul>
474           
475 <li><b>Type</b>: <code>java.lang.String</code></li>
476           
477 <li><b>Since</b>: <code>1.0</code></li>
478           
479 <li><b>Required</b>: <code>No</code></li>
480           
481 <li><b>User Property</b>: <code>hibernate.hbm2ddl.delimiter</code></li>
482           
483 <li><b>Default</b>: <code>;</code></li>
484         </ul><hr />
485 <p><b><a name="dialect">dialect</a>:</b></p>
486         
487 <div>Hibernate dialect.</div>
488         
489 <ul>
490           
491 <li><b>Type</b>: <code>java.lang.String</code></li>
492           
493 <li><b>Since</b>: <code>1.0</code></li>
494           
495 <li><b>Required</b>: <code>No</code></li>
496           
497 <li><b>User Property</b>: <code>hibernate.dialect</code></li>
498         </ul><hr />
499 <p><b><a name="driver">driver</a>:</b></p>
500         
501 <div>SQL-Driver name.</div>
502         
503 <ul>
504           
505 <li><b>Type</b>: <code>java.lang.String</code></li>
506           
507 <li><b>Since</b>: <code>1.0</code></li>
508           
509 <li><b>Required</b>: <code>No</code></li>
510           
511 <li><b>User Property</b>: <code>hibernate.connection.driver_class</code></li>
512         </ul><hr />
513 <p><b><a name="execute">execute</a>:</b></p>
514         
515 <div>Excecute the generated SQL. If set to <code>false</code>, only the
516 SQL-script is created and the database is not touched. 
517
518 <p><b>Important:</b> This configuration value can only be
519 configured through the <code>pom.xml</code>, or by the definition
520 of a system-property, because it is not known by Hibernate nor JPA
521 and, hence, not picked up from their configuration!</p></div>
522         
523 <ul>
524           
525 <li><b>Type</b>: <code>java.lang.Boolean</code></li>
526           
527 <li><b>Since</b>: <code>2.0</code></li>
528           
529 <li><b>Required</b>: <code>No</code></li>
530           
531 <li><b>User Property</b>: <code>hibernate.schema.execute</code></li>
532           
533 <li><b>Default</b>: <code>true</code></li>
534         </ul><hr />
535 <p><b><a name="force">force</a>:</b></p>
536         
537 <div>Force generation/execution 
538
539 <p>Force the generation and (if configured) the execution of the
540 SQL, even if no modified or newly added annotated classes where
541 found and the configuration was not changed.</p>
542
543 <p><code>skip</code> takes precedence over <code>force</code>.</p>
544
545 <p><b>Important:</b> This configuration value can only be
546 configured through the <code>pom.xml</code>, or by the definition
547 of a system-property, because it is not known by Hibernate nor JPA
548 and, hence, not picked up from their configuration!</p></div>
549         
550 <ul>
551           
552 <li><b>Type</b>: <code>boolean</code></li>
553           
554 <li><b>Since</b>: <code>1.0</code></li>
555           
556 <li><b>Required</b>: <code>No</code></li>
557           
558 <li><b>User Property</b>: <code>hibernate.schema.force</code></li>
559           
560 <li><b>Default</b>: <code>false</code></li>
561         </ul><hr />
562 <p><b><a name="format">format</a>:</b></p>
563         
564 <div>Format output-file.</div>
565         
566 <ul>
567           
568 <li><b>Type</b>: <code>java.lang.Boolean</code></li>
569           
570 <li><b>Since</b>: <code>1.0</code></li>
571           
572 <li><b>Required</b>: <code>No</code></li>
573           
574 <li><b>User Property</b>: <code>hibernate.format_sql</code></li>
575         </ul><hr />
576 <p><b><a name="hibernateConfig">hibernateConfig</a>:</b></p>
577         
578 <div>Path to Hibernate configuration file (.cfg.xml). If this parameter
579 is specified, the plugin will try to load configuration values from
580 a file with the given path or a ressource on the classpath with the
581 given name. If both fails, the execution of the plugin will fail. 
582
583 <p>If this parameter is not set the plugin will load configuration
584 values from a ressource named <code>hibernate.cfg.xml</code> on the
585 classpath, if it is present, but will not fail if there is no such
586 ressource.</p>
587
588 <p>During ressource-lookup, the test-classpath takes
589 precedence.</p>
590
591 <p>Settings in this file will overwrite settings in the properties
592 file.</p></div>
593         
594 <ul>
595           
596 <li><b>Type</b>: <code>java.lang.String</code></li>
597           
598 <li><b>Since</b>: <code>1.1.0</code></li>
599           
600 <li><b>Required</b>: <code>No</code></li>
601         </ul><hr />
602 <p><b><a name="hibernateProperties">hibernateProperties</a>:</b></p>
603         
604 <div>Path to a file or name of a ressource with hibernate properties. If
605 this parameter is specified, the plugin will try to load
606 configuration values from a file with the given path or a ressource
607 on the classpath with the given name. If both fails, the execution
608 of the plugin will fail. 
609
610 <p>If this parameter is not set the plugin will load configuration
611 values from a ressource named <code>hibernate.properties</code> on
612 the classpath, if it is present, but will not fail if there is no
613 such ressource.</p>
614
615 <p>During ressource-lookup, the test-classpath takes
616 precedence.</p></div>
617         
618 <ul>
619           
620 <li><b>Type</b>: <code>java.lang.String</code></li>
621           
622 <li><b>Since</b>: <code>1.0</code></li>
623           
624 <li><b>Required</b>: <code>No</code></li>
625         </ul><hr />
626 <p><b><a name="implicitNamingStrategy">implicitNamingStrategy</a>:</b></p>
627         
628 <div>Implicit naming strategy</div>
629         
630 <ul>
631           
632 <li><b>Type</b>: <code>java.lang.String</code></li>
633           
634 <li><b>Since</b>: <code>2.0</code></li>
635           
636 <li><b>Required</b>: <code>No</code></li>
637           
638 <li><b>User Property</b>: <code>hibernate.implicit_naming_strategy</code></li>
639         </ul><hr />
640 <p><b><a name="mappings">mappings</a>:</b></p>
641         
642 <div>List of Hibernate-Mapping-Files (XML). Multiple files can be
643 separated with white-spaces and/or commas.</div>
644         
645 <ul>
646           
647 <li><b>Type</b>: <code>java.lang.String</code></li>
648           
649 <li><b>Since</b>: <code>1.0.2</code></li>
650           
651 <li><b>Required</b>: <code>No</code></li>
652           
653 <li><b>User Property</b>: <code>hibernate.mapping</code></li>
654         </ul><hr />
655 <p><b><a name="outputDirectory">outputDirectory</a>:</b></p>
656         
657 <div>Classes-Directory to scan. 
658
659 <p>This parameter defaults to the maven build-output-directory for
660 classes. Additionally, all dependencies are scanned for annotated
661 classes.</p>
662
663 <p><b>Important:</b> This configuration value can only be
664 configured through the <code>pom.xml</code>, or by the definition
665 of a system-property, because it is not known by Hibernate nor JPA
666 and, hence, not picked up from their configuration!</p></div>
667         
668 <ul>
669           
670 <li><b>Type</b>: <code>java.lang.String</code></li>
671           
672 <li><b>Since</b>: <code>1.0</code></li>
673           
674 <li><b>Required</b>: <code>No</code></li>
675           
676 <li><b>User Property</b>: <code>project.build.outputDirectory</code></li>
677         </ul><hr />
678 <p><b><a name="outputFile">outputFile</a>:</b></p>
679         
680 <div>Output file. 
681
682 <p>If the specified filename is not absolut, the file will be
683 created relative to the project build directory
684 (<code>project.build.directory</code>).</p></div>
685         
686 <ul>
687           
688 <li><b>Type</b>: <code>java.lang.String</code></li>
689           
690 <li><b>Since</b>: <code>1.0</code></li>
691           
692 <li><b>Required</b>: <code>No</code></li>
693           
694 <li><b>User Property</b>: <code>hibernate.schema.update</code></li>
695           
696 <li><b>Default</b>: <code>update.sql</code></li>
697         </ul><hr />
698 <p><b><a name="password">password</a>:</b></p>
699         
700 <div>Database password</div>
701         
702 <ul>
703           
704 <li><b>Type</b>: <code>java.lang.String</code></li>
705           
706 <li><b>Since</b>: <code>1.0</code></li>
707           
708 <li><b>Required</b>: <code>No</code></li>
709           
710 <li><b>User Property</b>: <code>hibernate.connection.password</code></li>
711         </ul><hr />
712 <p><b><a name="persistenceUnit">persistenceUnit</a>:</b></p>
713         
714 <div>Name of the persistence-unit. If this parameter is specified, the
715 plugin will try to load configuration values from a
716 persistence-unit with the specified name. If no such
717 persistence-unit can be found, the plugin will throw an exception. 
718
719 <p>If this parameter is not set and there is only one
720 persistence-unit available, that unit will be used automatically.
721 But if this parameter is not set and there are multiple
722 persistence-units available on, the class-path, the execution of
723 the plugin will fail.</p>
724
725 <p>Settings in this file will overwrite settings in the properties
726 or the configuration file.</p></div>
727         
728 <ul>
729           
730 <li><b>Type</b>: <code>java.lang.String</code></li>
731           
732 <li><b>Since</b>: <code>1.1.0</code></li>
733           
734 <li><b>Required</b>: <code>No</code></li>
735         </ul><hr />
736 <p><b><a name="physicalNamingStrategy">physicalNamingStrategy</a>:</b></p>
737         
738 <div>Physical naming strategy</div>
739         
740 <ul>
741           
742 <li><b>Type</b>: <code>java.lang.String</code></li>
743           
744 <li><b>Since</b>: <code>2.0</code></li>
745           
746 <li><b>Required</b>: <code>No</code></li>
747           
748 <li><b>User Property</b>: <code>hibernate.physical_naming_strategy</code></li>
749         </ul><hr />
750 <p><b><a name="scanClasses">scanClasses</a>:</b></p>
751         
752 <div>Wether the project should be scanned for annotated-classes, or not 
753
754 <p>This parameter is intended to allow overwriting of the parameter
755 <code>exclude-unlisted-classes</code> of a
756 <code>persistence-unit</code>. If not specified, it defaults to
757 <code>true</code></p></div>
758         
759 <ul>
760           
761 <li><b>Type</b>: <code>java.lang.Boolean</code></li>
762           
763 <li><b>Since</b>: <code>2.0</code></li>
764           
765 <li><b>Required</b>: <code>No</code></li>
766           
767 <li><b>User Property</b>: <code>hibernate.schema.scan.classes</code></li>
768         </ul><hr />
769 <p><b><a name="scanDependencies">scanDependencies</a>:</b></p>
770         
771 <div>Dependency-Scopes, that should be scanned for annotated classes. 
772
773 <p>By default, only dependencies in the scope <code>compile</code>
774 are scanned for annotated classes. Multiple scopes can be seperated
775 by white space or commas.</p>
776
777 <p>If you do not want any dependencies to be scanned for annotated
778 classes, set this parameter to <code>none</code>.</p>
779
780 <p>The plugin does not scan for annotated classes in transitive
781 dependencies. If some of your annotated classes are hidden in a
782 transitive dependency, you can simply add that dependency
783 explicitly.</p></div>
784         
785 <ul>
786           
787 <li><b>Type</b>: <code>java.lang.String</code></li>
788           
789 <li><b>Since</b>: <code>1.0.3</code></li>
790           
791 <li><b>Required</b>: <code>No</code></li>
792           
793 <li><b>User Property</b>: <code>hibernate.schema.scan.dependencies</code></li>
794           
795 <li><b>Default</b>: <code>compile</code></li>
796         </ul><hr />
797 <p><b><a name="scanTestClasses">scanTestClasses</a>:</b></p>
798         
799 <div>Whether to scan the test-branch of the project for annotated
800 classes, or not. 
801
802 <p>If this parameter is set to <code>true</code> the test-classes
803 of the artifact will be scanned for hibernate-annotated classes
804 additionally.</p>
805
806 <p><b>Important:</b> This configuration value can only be
807 configured through the <code>pom.xml</code>, or by the definition
808 of a system-property, because it is not known by Hibernate nor JPA
809 and, hence, not picked up from their configuration!</p></div>
810         
811 <ul>
812           
813 <li><b>Type</b>: <code>java.lang.Boolean</code></li>
814           
815 <li><b>Since</b>: <code>1.0.1</code></li>
816           
817 <li><b>Required</b>: <code>No</code></li>
818           
819 <li><b>User Property</b>: <code>hibernate.schema.scan.test_classes</code></li>
820           
821 <li><b>Default</b>: <code>false</code></li>
822         </ul><hr />
823 <p><b><a name="show">show</a>:</b></p>
824         
825 <div>Show the generated SQL in the command-line output.</div>
826         
827 <ul>
828           
829 <li><b>Type</b>: <code>java.lang.Boolean</code></li>
830           
831 <li><b>Since</b>: <code>1.0</code></li>
832           
833 <li><b>Required</b>: <code>No</code></li>
834           
835 <li><b>User Property</b>: <code>hibernate.show_sql</code></li>
836         </ul><hr />
837 <p><b><a name="skip">skip</a>:</b></p>
838         
839 <div>Skip execution 
840
841 <p>If set to <code>true</code>, the execution is skipped.</p>
842
843 <p>A skipped execution is signaled via the maven-property
844 <code>${hibernate.schema.skipped}</code>.</p>
845
846 <p>The execution is skipped automatically, if no modified or newly
847 added annotated classes are found and the dialect was not
848 changed.</p>
849
850 <p><b>Important:</b> This configuration value can only be
851 configured through the <code>pom.xml</code>, or by the definition
852 of a system-property, because it is not known by Hibernate nor JPA
853 and, hence, not picked up from their configuration!</p></div>
854         
855 <ul>
856           
857 <li><b>Type</b>: <code>boolean</code></li>
858           
859 <li><b>Since</b>: <code>1.0</code></li>
860           
861 <li><b>Required</b>: <code>No</code></li>
862           
863 <li><b>User Property</b>: <code>hibernate.schema.skip</code></li>
864           
865 <li><b>Default</b>: <code>${maven.test.skip}</code></li>
866         </ul><hr />
867 <p><b><a name="testOutputDirectory">testOutputDirectory</a>:</b></p>
868         
869 <div>Test-Classes-Directory to scan. 
870
871 <p>This parameter defaults to the maven build-output-directory for
872 test-classes.</p>
873
874 <p>This parameter is only used, when <code>scanTestClasses</code>
875 is set to <code>true</code>!</p>
876
877 <p><b>Important:</b> This configuration value can only be
878 configured through the <code>pom.xml</code>, or by the definition
879 of a system-property, because it is not known by Hibernate nor JPA
880 and, hence, not picked up from their configuration!</p></div>
881         
882 <ul>
883           
884 <li><b>Type</b>: <code>java.lang.String</code></li>
885           
886 <li><b>Since</b>: <code>1.0.2</code></li>
887           
888 <li><b>Required</b>: <code>No</code></li>
889           
890 <li><b>User Property</b>: <code>project.build.testOutputDirectory</code></li>
891         </ul><hr />
892 <p><b><a name="url">url</a>:</b></p>
893         
894 <div>Database URL.</div>
895         
896 <ul>
897           
898 <li><b>Type</b>: <code>java.lang.String</code></li>
899           
900 <li><b>Since</b>: <code>1.0</code></li>
901           
902 <li><b>Required</b>: <code>No</code></li>
903           
904 <li><b>User Property</b>: <code>hibernate.connection.url</code></li>
905         </ul><hr />
906 <p><b><a name="username">username</a>:</b></p>
907         
908 <div>Database username</div>
909         
910 <ul>
911           
912 <li><b>Type</b>: <code>java.lang.String</code></li>
913           
914 <li><b>Since</b>: <code>1.0</code></li>
915           
916 <li><b>Required</b>: <code>No</code></li>
917           
918 <li><b>User Property</b>: <code>hibernate.connection.username</code></li>
919         </ul>
920       </section>
921     </section>
922   
923
924 </div>
925 <!-- PREPARING ROOT-ENTRY - name: Hibernate Maven Plugin ref: index.html -->
926 <!-- READING MENU - name: Project Documentation ref: reports -->
927 <!-- VISITING PAGE - href: /project-info.html / name: Project Information -->
928 <!-- VISITING PAGE - href: ci-management.html / name: CI Management -->
929 <!-- VISITING PAGE - href: dependencies.html / name: Dependencies -->
930 <!-- VISITING PAGE - href: dependency-info.html / name: Maven Coordinates -->
931 <!-- VISITING PAGE - href: distribution-management.html / name: Distribution Management -->
932 <!-- VISITING PAGE - href: index.html / name: About -->
933 <!-- RENAMING already seen PAGE: href=index.html, FROM name=Hibernate Maven Plugin TO name=About -->
934 <!-- VISITING PAGE - href: licenses.html / name: Licenses -->
935 <!-- VISITING PAGE - href: plugin-management.html / name: Plugin Management -->
936 <!-- VISITING PAGE - href: plugins.html / name: Plugins -->
937 <!-- VISITING PAGE - href: scm.html / name: Source Code Management -->
938 <!-- VISITING PAGE - href: summary.html / name: Summary -->
939 <!-- VISITING PAGE - href: team.html / name: Team -->
940 <!-- VISITING PAGE - href: /project-reports.html / name: Project Reports -->
941 <!-- VISITING PAGE - href: testapidocs/index.html / name: Test JavaDocs -->
942 <!-- VISITING PAGE - href: apidocs/index.html / name: JavaDocs -->
943 <!-- VISITING PAGE - href: xref/index.html / name: Source Xref -->
944 <!-- VISITING PAGE - href: xref-test/index.html / name: Test Source Xref -->
945 <!-- VISITING PAGE - href: cpd.html / name: CPD -->
946 <!-- VISITING PAGE - href: pmd.html / name: PMD -->
947 <!-- VISITING PAGE - href: plugin-info.html / name: Plugin Documentation -->
948 <!-- READING MENU - name: $menu.name ref: $menu.ref -->
949 <!-- VISITING PAGE - href: index.html / name: About -->
950 <!-- RENAMING already seen PAGE: href=index.html, FROM name=About TO name=About -->
951 <!-- VISITING PAGE - href: configuration.html / name: Configuration Examples -->
952 <!-- VISITING PAGE - href: create-mojo.html / name: Goal — hibernate:create -->
953 <!-- VISITING PAGE - href: update-mojo.html / name: Goal — hibernate:update -->
954 <!-- VISITING PAGE - href: drop-mojo.html / name: Goal — hibernate:drop -->
955 <!-- VISITING PAGE - href: help-mojo.html / name: Goal — hibernate:help -->
956 <!-- VISITING PAGE - href: debugging.html / name: Enable Debugging-Output -->
957 <!-- VISITING PAGE - href: skip.html / name: Skipping Execution -->
958 <!-- VISITING PAGE - href: force.html / name: Force Exceution -->
959 <!-- VISITING PAGE - href: pitfalls.html / name: Known Pitfalls (FAQ) -->
960 <!-- VISITING PAGE - href: project-info.html / name: Project Information -->
961 <!-- RENAMING already seen PAGE: href=project-info.html, FROM name=Project Information TO name=Project Information -->
962 <!-- VISITING PAGE - href: project-reports.html / name: Project Reports -->
963 <!-- RENAMING already seen PAGE: href=project-reports.html, FROM name=Project Reports TO name=Project Reports -->