2 <!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2014-04-29 -->
3 <!-- Current: export-mojo.html -->
4 <!-- Active: index.html -->
5 <!-- Path: [index.html, export-mojo.html] -->
6 <!-- Skiplist: [index.html, configuration.html, export-mojo.html, debugging.html, force.html, pitfalls.html] -->
9 <title>juplo - Hibernate 4 Maven Plugin - Parameter Documentation</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11 <link rel="canonical" href="http://juplo.de/hibernate4-maven-plugin/export-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 @import '/css/print.css' print;
18 <script src="/js/base.js"></script>
20 <link rel="stylesheet" type="text/css" href="/css/ie8.css" />
21 <script src="/js/ie8.js"></script>
24 <script src="/js/ie7.js"></script>
27 <script src="/js/ie6.js"></script>
29 <meta name="Date-Revision-yyyymmdd" content="20140429" />
30 <meta http-equiv="Content-Language" content="en" />
33 <body id="top" class="menu" onload="prettyPrint()">
34 <div id="page" class="cf">
36 <h1 id="logo"><a href="/" title="Home" class="l">juplo</a></h1>
37 <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span>
41 <strong class="b title">You are here:</strong>
43 <li class="b"><a class="b" href="/">Home</a></li>
44 <li class="b"><a class="b" href="/projects.html">Projects</a></li>
45 <li class="b"><a class="b" href="./index.html">Hibernate 4 Maven Plugin</a </li>
46 <li class="b"><strong class="b">Parameter Documentation</strong></li>
48 <a class="hide" href="#nav" title="Show navigation menu">Jump to navigation</a>
51 <main class="content cf">
52 <section id="content" class="main">
53 <h1>Hibernate 4 Maven Plugin - Parameter Documentation</h1>
57 <h2>hibernate4:export<a name="hibernate4:export"></a></h2>
59 <p><b>Full name</b>:</p>
61 <p>de.juplo:hibernate4-maven-plugin:1.0.2:export</p>
63 <p><b>Description</b>:</p>
65 <div>Goal which extracts the hibernate-mapping-configuration and exports
66 an according SQL-database-schema.</div>
68 <p><b>Attributes</b>:</p>
72 <li>Requires a Maven project to be executed.</li>
74 <li>Requires dependency resolution of artifacts in scope: <tt>runtime</tt>.</li>
76 <li>The goal is thread-safe and supports parallel builds.</li>
78 <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>
82 <h3>Optional Parameters<a name="Optional_Parameters"></a></h3>
84 <table class="bodyTable" border="0">
99 <td><b><a href="#delimiter">delimiter</a></b></td>
101 <td><tt>String</tt></td>
105 <td>Delimiter in output-file.<br /><b>Default value is</b>: <tt>;</tt>.<br /><b>User property is</b>: <tt>hibernate.export.schema.delimiter</tt>.</td>
110 <td><b><a href="#driverClassName">driverClassName</a></b></td>
112 <td><tt>String</tt></td>
116 <td>SQL-Driver name.<br /><b>User property is</b>: <tt>hibernate.connection.driver_class</tt>.</td>
121 <td><b><a href="#force">force</a></b></td>
123 <td><tt>boolean</tt></td>
129 <p>Force execution, even if no modified or newly added annotated
130 classes where found and the dialect was not changed.</p>
132 <p><tt>skip</tt> takes precedence over <tt>force</tt>.</p><br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>hibernate.export.force</tt>.</td>
137 <td><b><a href="#format">format</a></b></td>
139 <td><tt>boolean</tt></td>
143 <td>Format output-file.<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>User property is</b>: <tt>hibernate.export.schema.format</tt>.</td>
148 <td><b><a href="#hibernateDialect">hibernateDialect</a></b></td>
150 <td><tt>String</tt></td>
154 <td>Hibernate dialect.<br /><b>User property is</b>: <tt>hibernate.dialect</tt>.</td>
159 <td><b><a href="#hibernateMapping">hibernateMapping</a></b></td>
161 <td><tt>String</tt></td>
165 <td>List of Hibernate-Mapping-Files (XML). Multiple files can be
166 separated with white-spaces and/or commas.<br /><b>User property is</b>: <tt>hibernate.mapping</tt>.</td>
171 <td><b><a href="#hibernateNamingStrategy">hibernateNamingStrategy</a></b></td>
173 <td><tt>String</tt></td>
177 <td>Hibernate Naming Strategy<br /><b>User property is</b>: <tt>hibernate.ejb.naming_strategy</tt>.</td>
182 <td><b><a href="#hibernateProperties">hibernateProperties</a></b></td>
184 <td><tt>String</tt></td>
188 <td>Path to Hibernate configuration file.<br /><b>Default value is</b>: <tt>${project.build.outputDirectory}/hibernate.properties</tt>.<br /></td>
193 <td><b><a href="#outputDirectory">outputDirectory</a></b></td>
195 <td><tt>String</tt></td>
199 <td>Classes-Directory to scan.
201 <p>This parameter defaults to the maven build-output-directory for
202 classes. Additonally, all dependencies are scanned for annotated
203 classes.</p><br /><b>User property is</b>: <tt>project.build.outputDirectory</tt>.</td>
208 <td><b><a href="#outputFile">outputFile</a></b></td>
210 <td><tt>String</tt></td>
214 <td>Output file.<br /><b>Default value is</b>: <tt>${project.build.directory}/schema.sql</tt>.<br /><b>User property is</b>: <tt>hibernate.export.schema.filename</tt>.</td>
219 <td><b><a href="#password">password</a></b></td>
221 <td><tt>String</tt></td>
225 <td>Database password<br /><b>User property is</b>: <tt>hibernate.connection.password</tt>.</td>
230 <td><b><a href="#scanTestClasses">scanTestClasses</a></b></td>
232 <td><tt>boolean</tt></td>
236 <td>Wether to scan test-classes too, or not.
238 <p>If this parameter is set to <tt>true</tt> the test-classes
239 of the artifact will be scanned for hibernate-annotated classes
240 additionally.</p><br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>hibernate.export.scan_testclasses</tt>.</td>
245 <td><b><a href="#skip">skip</a></b></td>
247 <td><tt>boolean</tt></td>
253 <p>If set to <tt>true</tt>, the execution is skipped.</p>
255 <p>A skipped excecution is signaled via the maven-property
256 <tt>${hibernate.export.skipped}</tt>.</p>
258 <p>The excecution is skipped automatically, if no modified or newly
259 added annotated classes are found and the dialect was not
260 changed.</p><br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>maven.test.skip</tt>.</td>
265 <td><b><a href="#target">target</a></b></td>
267 <td><tt>String</tt></td>
271 <td>Target of execution:
275 <li><b>NONE</b> only export schema to SQL-script (forces
276 excecution, signals skip)</li>
278 <li><b>EXPORT</b> create database
279 (<b>DEFAULT!</b>). forces excecution, signals skip)</li>
281 <li><b>SCRIPT</b> export schema to SQL-script and print
286 A databaseconnection is only needed for EXPORT and BOTH, but a
287 Hibernate-Dialect must always be choosen.<br /><b>Default value is</b>: <tt>EXPORT</tt>.<br /><b>User property is</b>: <tt>hibernate.export.target</tt>.</td>
292 <td><b><a href="#testOutputDirectory">testOutputDirectory</a></b></td>
294 <td><tt>String</tt></td>
298 <td>Test-Classes-Directory to scan.
300 <p>This parameter defaults to the maven build-output-directory for
303 <p>This parameter is only used, when <tt>scanTestClasses</tt>
304 is set to <tt>true</tt>!</p><br /><b>User property is</b>: <tt>project.build.testOutputDirectory</tt>.</td>
309 <td><b><a href="#type">type</a></b></td>
311 <td><tt>String</tt></td>
315 <td>Type of execution.
319 <li><b>NONE</b> do nothing - just validate the
322 <li><b>CREATE</b> create database-schema</li>
324 <li><b>DROP</b> drop database-schema</li>
326 <li><b>BOTH</b> (<b>DEFAULT!</b>)</li>
328 If NONE is choosen, no databaseconnection is needed.<br /><b>Default value is</b>: <tt>BOTH</tt>.<br /><b>User property is</b>: <tt>hibernate.export.type</tt>.</td>
333 <td><b><a href="#url">url</a></b></td>
335 <td><tt>String</tt></td>
339 <td>Database URL.<br /><b>User property is</b>: <tt>hibernate.connection.url</tt>.</td>
344 <td><b><a href="#username">username</a></b></td>
346 <td><tt>String</tt></td>
350 <td>Database username<br /><b>User property is</b>: <tt>hibernate.connection.username</tt>.</td>
355 <div class="section">
356 <h3>Parameter Details<a name="Parameter_Details"></a></h3>
358 <p><b><a name="delimiter">delimiter</a>:</b></p>
360 <div>Delimiter in output-file.</div>
364 <li><b>Type</b>: <tt>java.lang.String</tt></li>
366 <li><b>Required</b>: <tt>No</tt></li>
368 <li><b>User Property</b>: <tt>hibernate.export.schema.delimiter</tt></li>
370 <li><b>Default</b>: <tt>;</tt></li>
372 <p><b><a name="driverClassName">driverClassName</a>:</b></p>
374 <div>SQL-Driver name.</div>
378 <li><b>Type</b>: <tt>java.lang.String</tt></li>
380 <li><b>Required</b>: <tt>No</tt></li>
382 <li><b>User Property</b>: <tt>hibernate.connection.driver_class</tt></li>
384 <p><b><a name="force">force</a>:</b></p>
388 <p>Force execution, even if no modified or newly added annotated
389 classes where found and the dialect was not changed.</p>
391 <p><tt>skip</tt> takes precedence over <tt>force</tt>.</p></div>
395 <li><b>Type</b>: <tt>boolean</tt></li>
397 <li><b>Required</b>: <tt>No</tt></li>
399 <li><b>User Property</b>: <tt>hibernate.export.force</tt></li>
401 <li><b>Default</b>: <tt>false</tt></li>
403 <p><b><a name="format">format</a>:</b></p>
405 <div>Format output-file.</div>
409 <li><b>Type</b>: <tt>boolean</tt></li>
411 <li><b>Required</b>: <tt>No</tt></li>
413 <li><b>User Property</b>: <tt>hibernate.export.schema.format</tt></li>
415 <li><b>Default</b>: <tt>true</tt></li>
417 <p><b><a name="hibernateDialect">hibernateDialect</a>:</b></p>
419 <div>Hibernate dialect.</div>
423 <li><b>Type</b>: <tt>java.lang.String</tt></li>
425 <li><b>Required</b>: <tt>No</tt></li>
427 <li><b>User Property</b>: <tt>hibernate.dialect</tt></li>
429 <p><b><a name="hibernateMapping">hibernateMapping</a>:</b></p>
431 <div>List of Hibernate-Mapping-Files (XML). Multiple files can be
432 separated with white-spaces and/or commas.</div>
436 <li><b>Type</b>: <tt>java.lang.String</tt></li>
438 <li><b>Required</b>: <tt>No</tt></li>
440 <li><b>User Property</b>: <tt>hibernate.mapping</tt></li>
442 <p><b><a name="hibernateNamingStrategy">hibernateNamingStrategy</a>:</b></p>
444 <div>Hibernate Naming Strategy</div>
448 <li><b>Type</b>: <tt>java.lang.String</tt></li>
450 <li><b>Required</b>: <tt>No</tt></li>
452 <li><b>User Property</b>: <tt>hibernate.ejb.naming_strategy</tt></li>
454 <p><b><a name="hibernateProperties">hibernateProperties</a>:</b></p>
456 <div>Path to Hibernate configuration file.</div>
460 <li><b>Type</b>: <tt>java.lang.String</tt></li>
462 <li><b>Required</b>: <tt>No</tt></li>
464 <li><b>Default</b>: <tt>${project.build.outputDirectory}/hibernate.properties</tt></li>
466 <p><b><a name="outputDirectory">outputDirectory</a>:</b></p>
468 <div>Classes-Directory to scan.
470 <p>This parameter defaults to the maven build-output-directory for
471 classes. Additonally, all dependencies are scanned for annotated
476 <li><b>Type</b>: <tt>java.lang.String</tt></li>
478 <li><b>Required</b>: <tt>No</tt></li>
480 <li><b>User Property</b>: <tt>project.build.outputDirectory</tt></li>
482 <p><b><a name="outputFile">outputFile</a>:</b></p>
484 <div>Output file.</div>
488 <li><b>Type</b>: <tt>java.lang.String</tt></li>
490 <li><b>Required</b>: <tt>No</tt></li>
492 <li><b>User Property</b>: <tt>hibernate.export.schema.filename</tt></li>
494 <li><b>Default</b>: <tt>${project.build.directory}/schema.sql</tt></li>
496 <p><b><a name="password">password</a>:</b></p>
498 <div>Database password</div>
502 <li><b>Type</b>: <tt>java.lang.String</tt></li>
504 <li><b>Required</b>: <tt>No</tt></li>
506 <li><b>User Property</b>: <tt>hibernate.connection.password</tt></li>
508 <p><b><a name="scanTestClasses">scanTestClasses</a>:</b></p>
510 <div>Wether to scan test-classes too, or not.
512 <p>If this parameter is set to <tt>true</tt> the test-classes
513 of the artifact will be scanned for hibernate-annotated classes
514 additionally.</p></div>
518 <li><b>Type</b>: <tt>boolean</tt></li>
520 <li><b>Required</b>: <tt>No</tt></li>
522 <li><b>User Property</b>: <tt>hibernate.export.scan_testclasses</tt></li>
524 <li><b>Default</b>: <tt>false</tt></li>
526 <p><b><a name="skip">skip</a>:</b></p>
530 <p>If set to <tt>true</tt>, the execution is skipped.</p>
532 <p>A skipped excecution is signaled via the maven-property
533 <tt>${hibernate.export.skipped}</tt>.</p>
535 <p>The excecution is skipped automatically, if no modified or newly
536 added annotated classes are found and the dialect was not
541 <li><b>Type</b>: <tt>boolean</tt></li>
543 <li><b>Required</b>: <tt>No</tt></li>
545 <li><b>User Property</b>: <tt>maven.test.skip</tt></li>
547 <li><b>Default</b>: <tt>false</tt></li>
549 <p><b><a name="target">target</a>:</b></p>
551 <div>Target of execution:
555 <li><b>NONE</b> only export schema to SQL-script (forces
556 excecution, signals skip)</li>
558 <li><b>EXPORT</b> create database
559 (<b>DEFAULT!</b>). forces excecution, signals skip)</li>
561 <li><b>SCRIPT</b> export schema to SQL-script and print
566 A databaseconnection is only needed for EXPORT and BOTH, but a
567 Hibernate-Dialect must always be choosen.</div>
571 <li><b>Type</b>: <tt>java.lang.String</tt></li>
573 <li><b>Required</b>: <tt>No</tt></li>
575 <li><b>User Property</b>: <tt>hibernate.export.target</tt></li>
577 <li><b>Default</b>: <tt>EXPORT</tt></li>
579 <p><b><a name="testOutputDirectory">testOutputDirectory</a>:</b></p>
581 <div>Test-Classes-Directory to scan.
583 <p>This parameter defaults to the maven build-output-directory for
586 <p>This parameter is only used, when <tt>scanTestClasses</tt>
587 is set to <tt>true</tt>!</p></div>
591 <li><b>Type</b>: <tt>java.lang.String</tt></li>
593 <li><b>Required</b>: <tt>No</tt></li>
595 <li><b>User Property</b>: <tt>project.build.testOutputDirectory</tt></li>
597 <p><b><a name="type">type</a>:</b></p>
599 <div>Type of execution.
603 <li><b>NONE</b> do nothing - just validate the
606 <li><b>CREATE</b> create database-schema</li>
608 <li><b>DROP</b> drop database-schema</li>
610 <li><b>BOTH</b> (<b>DEFAULT!</b>)</li>
612 If NONE is choosen, no databaseconnection is needed.</div>
616 <li><b>Type</b>: <tt>java.lang.String</tt></li>
618 <li><b>Required</b>: <tt>No</tt></li>
620 <li><b>User Property</b>: <tt>hibernate.export.type</tt></li>
622 <li><b>Default</b>: <tt>BOTH</tt></li>
624 <p><b><a name="url">url</a>:</b></p>
626 <div>Database URL.</div>
630 <li><b>Type</b>: <tt>java.lang.String</tt></li>
632 <li><b>Required</b>: <tt>No</tt></li>
634 <li><b>User Property</b>: <tt>hibernate.connection.url</tt></li>
636 <p><b><a name="username">username</a>:</b></p>
638 <div>Database username</div>
642 <li><b>Type</b>: <tt>java.lang.String</tt></li>
644 <li><b>Required</b>: <tt>No</tt></li>
646 <li><b>User Property</b>: <tt>hibernate.connection.username</tt></li>
653 <div class="marginal">
656 <a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a>
657 <h2 class="nav menu">Section-Menu</h2>
659 <li class="m blog"><a href="/blog/" class="m">Blog</a></li>
660 <li class="m projects"><a href="/projects.html" class="m selected">Projects</a></li>
662 <h2 class="nav submenu">
663 <span class="s">Submenu for section</span>
664 <a class="s selected" href="/projects.html">Projects</a>
666 <ul id="submenu" class="s">
668 <a class="s selected" href="./index.html">Hibernate 4 Maven Plugin</a>
669 <ul class="s active">
671 <a href="configuration.html" class="s" title="Configuration Examples">Configuration Examples</a>
674 <strong class="s">Parameter Documentation</strong>
677 <a href="debugging.html" class="s" title="Enable Debug-Output">Enable Debug-Output</a>
680 <a href="force.html" class="s" title="Force Exceution">Force Exceution</a>
683 <a href="pitfalls.html" class="s" title="Known Pitfalls (FAQ)">Known Pitfalls (FAQ)</a>
686 <a href="project-info.html" class="s" title="Project Information">Project Information</a>
689 <a href="project-reports.html" class="s" title="Project Reports">Project Reports</a>
697 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
698 <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
705 <ul id="footerlinks">
706 <li class="f" id="copyright">© <strong>mo</strong> 2013</li>
707 <li class="f"><a class="f" href="/impressum.html">Impressum</a></li>
708 <li class="f about"><a class="f" href="/about.html">About</a></li>
712 <script type="text/javascript"><!--//--><![CDATA[//><!--
713 var _gaq = _gaq || [];
714 _gaq.push(['_setAccount', 'UA-571104-3']);
715 _gaq.push(['_trackPageview']);
717 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
718 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
719 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);