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] -->
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;
17 <script src="/js/prettify.js"></script>
19 <script src="/js/html5shiv.js"></script>
22 <link rel="stylesheet" type="text/css" href="/css/ie8.css" />
26 <body class="menu" onload="prettyPrint()">
27 <div id="page" class="cf">
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>
34 <strong class="b title">You are here:</strong>
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>
41 <a class="hide" href="#navigation">Jump to navigation</a>
44 <main class="content cf">
45 <article id="content" class="main">
46 <header><h1>Goal: CREATE</h1></header>
50 <h2><a name="hibernate:create"></a>hibernate:create</h2>
52 <p><b>Full name</b>:</p>
54 <p>de.juplo:hibernate-maven-plugin:2.0.0:create</p>
56 <p><b>Description</b>:</p>
58 <div>Goal which extracts the hibernate-mapping-configuration and exports
59 an according SQL-database-schema.</div>
61 <p><b>Attributes</b>:</p>
65 <li>Requires a Maven project to be executed.</li>
67 <li>Requires dependency resolution of artifacts in scope: <tt>runtime</tt>.</li>
69 <li>The goal is thread-safe and supports parallel builds.</li>
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>
75 <h3><a name="Optional_Parameters"></a>Optional Parameters</h3>
77 <table class="bodyTable" border="0">
92 <td><b><a href="#createNamespaces">createNamespaces</a></b></td>
94 <td><tt>Boolean</tt></td>
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>
104 <td><b><a href="#delimiter">delimiter</a></b></td>
106 <td><tt>String</tt></td>
108 <td><tt>1.0</tt></td>
110 <td>Delimiter in output-file.
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>
120 <td><b><a href="#dialect">dialect</a></b></td>
122 <td><tt>String</tt></td>
124 <td><tt>1.0</tt></td>
126 <td>Hibernate dialect.<br /><b>User property is</b>: <tt>hibernate.dialect</tt>.</td>
131 <td><b><a href="#driver">driver</a></b></td>
133 <td><tt>String</tt></td>
135 <td><tt>1.0</tt></td>
137 <td>SQL-Driver name.<br /><b>User property is</b>: <tt>hibernate.connection.driver_class</tt>.</td>
142 <td><b><a href="#export">export</a></b></td>
144 <td><tt>Boolean</tt></td>
146 <td><tt>2.0</tt></td>
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
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>
160 <td><b><a href="#force">force</a></b></td>
162 <td><tt>boolean</tt></td>
164 <td><tt>1.0</tt></td>
168 <p>Force execution, even if no modified or newly added annotated
169 classes where found and the dialect was not changed.</p>
171 <p><tt>skip</tt> takes precedence over <tt>force</tt>.</p>
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>
181 <td><b><a href="#format">format</a></b></td>
183 <td><tt>Boolean</tt></td>
185 <td><tt>1.0</tt></td>
187 <td>Format output-file.<br /><b>User property is</b>: <tt>hibernate.format_sql</tt>.</td>
192 <td><b><a href="#hibernateConfig">hibernateConfig</a></b></td>
194 <td><tt>String</tt></td>
196 <td><tt>1.1.0</tt></td>
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.
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
208 <p>During ressource-lookup, the test-classpath takes
211 <p>Settings in this file will overwrite settings in the properties
217 <td><b><a href="#hibernateProperties">hibernateProperties</a></b></td>
219 <td><tt>String</tt></td>
221 <td><tt>1.0</tt></td>
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.
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
234 <p>During ressource-lookup, the test-classpath takes
235 precedence.</p><br /></td>
240 <td><b><a href="#implicitNamingStrategy">implicitNamingStrategy</a></b></td>
242 <td><tt>String</tt></td>
244 <td><tt>2.0</tt></td>
246 <td>Implicit naming strategy<br /><b>User property is</b>: <tt>hibernate.implicit_naming_strategy</tt>.</td>
251 <td><b><a href="#mappings">mappings</a></b></td>
253 <td><tt>String</tt></td>
255 <td><tt>1.0.2</tt></td>
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>
263 <td><b><a href="#outputDirectory">outputDirectory</a></b></td>
265 <td><tt>String</tt></td>
267 <td><tt>1.0</tt></td>
269 <td>Classes-Directory to scan.
271 <p>This parameter defaults to the maven build-output-directory for
272 classes. Additionally, all dependencies are scanned for annotated
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>
283 <td><b><a href="#outputFile">outputFile</a></b></td>
285 <td><tt>String</tt></td>
287 <td><tt>1.0</tt></td>
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>
298 <td><b><a href="#password">password</a></b></td>
300 <td><tt>String</tt></td>
302 <td><tt>1.0</tt></td>
304 <td>Database password<br /><b>User property is</b>: <tt>hibernate.connection.password</tt>.</td>
309 <td><b><a href="#persistenceUnit">persistenceUnit</a></b></td>
311 <td><tt>String</tt></td>
313 <td><tt>1.1.0</tt></td>
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.
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>
326 <p>Settings in this file will overwrite settings in the properties
327 or the configuration file.</p><br /></td>
332 <td><b><a href="#physicalNamingStrategy">physicalNamingStrategy</a></b></td>
334 <td><tt>String</tt></td>
336 <td><tt>2.0</tt></td>
338 <td>Physical naming strategy<br /><b>User property is</b>: <tt>hibernate.physical_naming_strategy</tt>.</td>
343 <td><b><a href="#scanClasses">scanClasses</a></b></td>
345 <td><tt>Boolean</tt></td>
347 <td><tt>2.0</tt></td>
349 <td>Wether the project should be scanned for annotated-classes, or not
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>
359 <td><b><a href="#scanDependencies">scanDependencies</a></b></td>
361 <td><tt>String</tt></td>
363 <td><tt>1.0.3</tt></td>
365 <td>Dependency-Scopes, that should be scanned for annotated classes.
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>
371 <p>If you do not want any dependencies to be scanned for annotated
372 classes, set this parameter to <tt>none</tt>.</p>
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>
382 <td><b><a href="#scanTestClasses">scanTestClasses</a></b></td>
384 <td><tt>Boolean</tt></td>
386 <td><tt>1.0.1</tt></td>
388 <td>Whether to scan the test-branch of the project for annotated
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
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>
403 <td><b><a href="#show">show</a></b></td>
405 <td><tt>Boolean</tt></td>
407 <td><tt>1.0</tt></td>
409 <td>Show the generated SQL in the command-line output.<br /><b>User property is</b>: <tt>hibernate.show_sql</tt>.</td>
414 <td><b><a href="#skip">skip</a></b></td>
416 <td><tt>boolean</tt></td>
418 <td><tt>1.0</tt></td>
422 <p>If set to <tt>true</tt>, the execution is skipped.</p>
424 <p>A skipped execution is signaled via the maven-property
425 <tt>${hibernate.schema.skipped}</tt>.</p>
427 <p>The execution is skipped automatically, if no modified or newly
428 added annotated classes are found and the dialect was not
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>
439 <td><b><a href="#testOutputDirectory">testOutputDirectory</a></b></td>
441 <td><tt>String</tt></td>
443 <td><tt>1.0.2</tt></td>
445 <td>Test-Classes-Directory to scan.
447 <p>This parameter defaults to the maven build-output-directory for
450 <p>This parameter is only used, when <tt>scanTestClasses</tt>
451 is set to <tt>true</tt>!</p>
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>
461 <td><b><a href="#url">url</a></b></td>
463 <td><tt>String</tt></td>
465 <td><tt>1.0</tt></td>
467 <td>Database URL.<br /><b>User property is</b>: <tt>hibernate.connection.url</tt>.</td>
472 <td><b><a href="#username">username</a></b></td>
474 <td><tt>String</tt></td>
476 <td><tt>1.0</tt></td>
478 <td>Database username<br /><b>User property is</b>: <tt>hibernate.connection.username</tt>.</td>
483 <div class="section">
484 <h3><a name="Parameter_Details"></a>Parameter Details</h3>
486 <p><b><a name="createNamespaces">createNamespaces</a>:</b></p>
488 <div>Specifies whether to automatically create also the database
489 schema/catalog.</div>
493 <li><b>Type</b>: <tt>java.lang.Boolean</tt></li>
495 <li><b>Since</b>: <tt>2.0</tt></li>
497 <li><b>Required</b>: <tt>No</tt></li>
499 <li><b>User Property</b>: <tt>hibernate.hbm2dll.create_namespaces</tt></li>
501 <li><b>Default</b>: <tt>false</tt></li>
503 <p><b><a name="delimiter">delimiter</a>:</b></p>
505 <div>Delimiter in output-file.
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>
514 <li><b>Type</b>: <tt>java.lang.String</tt></li>
516 <li><b>Since</b>: <tt>1.0</tt></li>
518 <li><b>Required</b>: <tt>No</tt></li>
520 <li><b>User Property</b>: <tt>hibernate.schema.delimiter</tt></li>
522 <li><b>Default</b>: <tt>;</tt></li>
524 <p><b><a name="dialect">dialect</a>:</b></p>
526 <div>Hibernate dialect.</div>
530 <li><b>Type</b>: <tt>java.lang.String</tt></li>
532 <li><b>Since</b>: <tt>1.0</tt></li>
534 <li><b>Required</b>: <tt>No</tt></li>
536 <li><b>User Property</b>: <tt>hibernate.dialect</tt></li>
538 <p><b><a name="driver">driver</a>:</b></p>
540 <div>SQL-Driver name.</div>
544 <li><b>Type</b>: <tt>java.lang.String</tt></li>
546 <li><b>Since</b>: <tt>1.0</tt></li>
548 <li><b>Required</b>: <tt>No</tt></li>
550 <li><b>User Property</b>: <tt>hibernate.connection.driver_class</tt></li>
552 <p><b><a name="export">export</a>:</b></p>
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
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>
565 <li><b>Type</b>: <tt>java.lang.Boolean</tt></li>
567 <li><b>Since</b>: <tt>2.0</tt></li>
569 <li><b>Required</b>: <tt>No</tt></li>
571 <li><b>User Property</b>: <tt>hibernate.schema.export</tt></li>
573 <li><b>Default</b>: <tt>true</tt></li>
575 <p><b><a name="force">force</a>:</b></p>
579 <p>Force execution, even if no modified or newly added annotated
580 classes where found and the dialect was not changed.</p>
582 <p><tt>skip</tt> takes precedence over <tt>force</tt>.</p>
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>
591 <li><b>Type</b>: <tt>boolean</tt></li>
593 <li><b>Since</b>: <tt>1.0</tt></li>
595 <li><b>Required</b>: <tt>No</tt></li>
597 <li><b>User Property</b>: <tt>hibernate.schema.force</tt></li>
599 <li><b>Default</b>: <tt>false</tt></li>
601 <p><b><a name="format">format</a>:</b></p>
603 <div>Format output-file.</div>
607 <li><b>Type</b>: <tt>java.lang.Boolean</tt></li>
609 <li><b>Since</b>: <tt>1.0</tt></li>
611 <li><b>Required</b>: <tt>No</tt></li>
613 <li><b>User Property</b>: <tt>hibernate.format_sql</tt></li>
615 <p><b><a name="hibernateConfig">hibernateConfig</a>:</b></p>
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.
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
627 <p>During ressource-lookup, the test-classpath takes
630 <p>Settings in this file will overwrite settings in the properties
635 <li><b>Type</b>: <tt>java.lang.String</tt></li>
637 <li><b>Since</b>: <tt>1.1.0</tt></li>
639 <li><b>Required</b>: <tt>No</tt></li>
641 <p><b><a name="hibernateProperties">hibernateProperties</a>:</b></p>
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.
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
654 <p>During ressource-lookup, the test-classpath takes
655 precedence.</p></div>
659 <li><b>Type</b>: <tt>java.lang.String</tt></li>
661 <li><b>Since</b>: <tt>1.0</tt></li>
663 <li><b>Required</b>: <tt>No</tt></li>
665 <p><b><a name="implicitNamingStrategy">implicitNamingStrategy</a>:</b></p>
667 <div>Implicit naming strategy</div>
671 <li><b>Type</b>: <tt>java.lang.String</tt></li>
673 <li><b>Since</b>: <tt>2.0</tt></li>
675 <li><b>Required</b>: <tt>No</tt></li>
677 <li><b>User Property</b>: <tt>hibernate.implicit_naming_strategy</tt></li>
679 <p><b><a name="mappings">mappings</a>:</b></p>
681 <div>List of Hibernate-Mapping-Files (XML). Multiple files can be
682 separated with white-spaces and/or commas.</div>
686 <li><b>Type</b>: <tt>java.lang.String</tt></li>
688 <li><b>Since</b>: <tt>1.0.2</tt></li>
690 <li><b>Required</b>: <tt>No</tt></li>
692 <li><b>User Property</b>: <tt>hibernate.mapping</tt></li>
694 <p><b><a name="outputDirectory">outputDirectory</a>:</b></p>
696 <div>Classes-Directory to scan.
698 <p>This parameter defaults to the maven build-output-directory for
699 classes. Additionally, all dependencies are scanned for annotated
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>
709 <li><b>Type</b>: <tt>java.lang.String</tt></li>
711 <li><b>Since</b>: <tt>1.0</tt></li>
713 <li><b>Required</b>: <tt>No</tt></li>
715 <li><b>User Property</b>: <tt>project.build.outputDirectory</tt></li>
717 <p><b><a name="outputFile">outputFile</a>:</b></p>
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>
727 <li><b>Type</b>: <tt>java.lang.String</tt></li>
729 <li><b>Since</b>: <tt>1.0</tt></li>
731 <li><b>Required</b>: <tt>No</tt></li>
733 <li><b>User Property</b>: <tt>hibernate.schema.export.create</tt></li>
735 <li><b>Default</b>: <tt>create.sql</tt></li>
737 <p><b><a name="password">password</a>:</b></p>
739 <div>Database password</div>
743 <li><b>Type</b>: <tt>java.lang.String</tt></li>
745 <li><b>Since</b>: <tt>1.0</tt></li>
747 <li><b>Required</b>: <tt>No</tt></li>
749 <li><b>User Property</b>: <tt>hibernate.connection.password</tt></li>
751 <p><b><a name="persistenceUnit">persistenceUnit</a>:</b></p>
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.
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>
764 <p>Settings in this file will overwrite settings in the properties
765 or the configuration file.</p></div>
769 <li><b>Type</b>: <tt>java.lang.String</tt></li>
771 <li><b>Since</b>: <tt>1.1.0</tt></li>
773 <li><b>Required</b>: <tt>No</tt></li>
775 <p><b><a name="physicalNamingStrategy">physicalNamingStrategy</a>:</b></p>
777 <div>Physical naming strategy</div>
781 <li><b>Type</b>: <tt>java.lang.String</tt></li>
783 <li><b>Since</b>: <tt>2.0</tt></li>
785 <li><b>Required</b>: <tt>No</tt></li>
787 <li><b>User Property</b>: <tt>hibernate.physical_naming_strategy</tt></li>
789 <p><b><a name="scanClasses">scanClasses</a>:</b></p>
791 <div>Wether the project should be scanned for annotated-classes, or not
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>
800 <li><b>Type</b>: <tt>java.lang.Boolean</tt></li>
802 <li><b>Since</b>: <tt>2.0</tt></li>
804 <li><b>Required</b>: <tt>No</tt></li>
806 <li><b>User Property</b>: <tt>hibernate.schema.scan.classes</tt></li>
808 <p><b><a name="scanDependencies">scanDependencies</a>:</b></p>
810 <div>Dependency-Scopes, that should be scanned for annotated classes.
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>
816 <p>If you do not want any dependencies to be scanned for annotated
817 classes, set this parameter to <tt>none</tt>.</p>
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>
826 <li><b>Type</b>: <tt>java.lang.String</tt></li>
828 <li><b>Since</b>: <tt>1.0.3</tt></li>
830 <li><b>Required</b>: <tt>No</tt></li>
832 <li><b>User Property</b>: <tt>hibernate.schema.scan.dependencies</tt></li>
834 <li><b>Default</b>: <tt>compile</tt></li>
836 <p><b><a name="scanTestClasses">scanTestClasses</a>:</b></p>
838 <div>Whether to scan the test-branch of the project for annotated
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
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>
852 <li><b>Type</b>: <tt>java.lang.Boolean</tt></li>
854 <li><b>Since</b>: <tt>1.0.1</tt></li>
856 <li><b>Required</b>: <tt>No</tt></li>
858 <li><b>User Property</b>: <tt>hibernate.schema.scan.test_classes</tt></li>
860 <li><b>Default</b>: <tt>false</tt></li>
862 <p><b><a name="show">show</a>:</b></p>
864 <div>Show the generated SQL in the command-line output.</div>
868 <li><b>Type</b>: <tt>java.lang.Boolean</tt></li>
870 <li><b>Since</b>: <tt>1.0</tt></li>
872 <li><b>Required</b>: <tt>No</tt></li>
874 <li><b>User Property</b>: <tt>hibernate.show_sql</tt></li>
876 <p><b><a name="skip">skip</a>:</b></p>
880 <p>If set to <tt>true</tt>, the execution is skipped.</p>
882 <p>A skipped execution is signaled via the maven-property
883 <tt>${hibernate.schema.skipped}</tt>.</p>
885 <p>The execution is skipped automatically, if no modified or newly
886 added annotated classes are found and the dialect was not
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>
896 <li><b>Type</b>: <tt>boolean</tt></li>
898 <li><b>Since</b>: <tt>1.0</tt></li>
900 <li><b>Required</b>: <tt>No</tt></li>
902 <li><b>User Property</b>: <tt>hibernate.schema.skip</tt></li>
904 <li><b>Default</b>: <tt>${maven.test.skip}</tt></li>
906 <p><b><a name="testOutputDirectory">testOutputDirectory</a>:</b></p>
908 <div>Test-Classes-Directory to scan.
910 <p>This parameter defaults to the maven build-output-directory for
913 <p>This parameter is only used, when <tt>scanTestClasses</tt>
914 is set to <tt>true</tt>!</p>
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>
923 <li><b>Type</b>: <tt>java.lang.String</tt></li>
925 <li><b>Since</b>: <tt>1.0.2</tt></li>
927 <li><b>Required</b>: <tt>No</tt></li>
929 <li><b>User Property</b>: <tt>project.build.testOutputDirectory</tt></li>
931 <p><b><a name="url">url</a>:</b></p>
933 <div>Database URL.</div>
937 <li><b>Type</b>: <tt>java.lang.String</tt></li>
939 <li><b>Since</b>: <tt>1.0</tt></li>
941 <li><b>Required</b>: <tt>No</tt></li>
943 <li><b>User Property</b>: <tt>hibernate.connection.url</tt></li>
945 <p><b><a name="username">username</a>:</b></p>
947 <div>Database username</div>
951 <li><b>Type</b>: <tt>java.lang.String</tt></li>
953 <li><b>Since</b>: <tt>1.0</tt></li>
955 <li><b>Required</b>: <tt>No</tt></li>
957 <li><b>User Property</b>: <tt>hibernate.connection.username</tt></li>
964 <div class="marginal">
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>
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>
975 <h2 class="nav submenu">
976 <span class="s">Submenu for section</span>
977 <a class="s selected" href="/projects.html">Projects</a>
979 <ul id="submenu" class="s">
981 <a class="s selected" href="./index.html">Hibernate Maven Plugin</a>
982 <ul class="s active">
984 <a href="configuration.html" class="s" title="Configuration Examples">Configuration Examples</a>
987 <strong class="s">Goal: CREATE</strong>
990 <a href="drop-mojo.html" class="s" title="Goal: DROP">Goal: DROP</a>
993 <a href="debugging.html" class="s" title="Enable Debug-Output">Enable Debug-Output</a>
996 <a href="skip.html" class="s" title="Skipping Execution">Skipping Execution</a>
999 <a href="force.html" class="s" title="Force Exceution">Force Exceution</a>
1002 <a href="pitfalls.html" class="s" title="Known Pitfalls (FAQ)">Known Pitfalls (FAQ)</a>
1005 <a href="project-info.html" class="s" title="Project Information">Project Information</a>
1008 <a href="project-reports.html" class="s" title="Project Reports">Project Reports</a>
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" />
1022 <footer id="footer">
1024 <ul id="footerlinks">
1025 <li class="f" id="copyright">© <strong>mo</strong> 2016
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>
1032 <script type="text/javascript"><!--//--><![CDATA[//><!--
1033 var _gaq = _gaq || [];
1034 _gaq.push(['_setAccount', 'UA-571104-3']);
1035 _gaq.push(['_trackPageview']);
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);