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