1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\r
2 <!-- Generated by Apache Maven Doxia at Jan 15, 2013 -->
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
\r
6 <title>Hibernate 4 Maven Plugin -
7 hibernate4:export</title>
\r
8 <style type="text/css" media="all">
\r
9 @import url("./css/maven-base.css");
\r
10 @import url("./css/maven-theme.css");
\r
11 @import url("./css/site.css");
\r
13 <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
\r
14 <meta name="Date-Revision-yyyymmdd" content="20130115" />
\r
15 <meta http-equiv="Content-Language" content="en" />
\r
17 <script type="text/javascript"><!--
19 var _gaq = _gaq || [];
20 _gaq.push(['_setAccount', 'UA-571104-3']);
21 _gaq.push(['_trackPageview']);
24 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
25 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
26 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
32 <body class="composite">
\r
34 <div id="bannerLeft">
\r
35 Hibernate 4 Maven Plugin
\r
41 <div id="breadcrumbs">
\r
45 <span id="publishDate">Last Published: 2013-01-15</span>
\r
46 | <span id="projectVersion">Version: 1.0.1</span>
\r
47 | <a href="http://juplo.de" class="externalLink" title="juplo">juplo</a>
\r
49 <div class="xright">
\r
56 <div id="leftColumn">
\r
57 <div id="navcolumn">
\r
63 <a href="index.html" title="Introduction">Introduction</a>
\r
66 <a href="configuration.html" title="Configuration Examples">Configuration Examples</a>
\r
69 <strong>Parameter Documentation</strong>
\r
72 <a href="debugging.html" title="Enable Debug-Output">Enable Debug-Output</a>
\r
75 <a href="force.html" title="Force Exceution">Force Exceution</a>
\r
78 <a href="pitfalls.html" title="Known Pitfalls">Known Pitfalls</a>
\r
81 <h5>Project Documentation</h5>
\r
83 <li class="collapsed">
\r
84 <a href="project-info.html" title="Project Information">Project Information</a>
\r
86 <li class="collapsed">
\r
87 <a href="project-reports.html" title="Project Reports">Project Reports</a>
\r
90 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
\r
91 <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
\r
97 <div id="bodyColumn">
\r
98 <div id="contentBox">
\r
101 <div class="section"><h2>hibernate4:export<a name="hibernate4:export"></a></h2>
102 <p><b>Full name</b>:</p>
103 <p>de.juplo:hibernate4-maven-plugin:1.0.1:export</p>
104 <p><b>Description</b>:</p>
105 <div>Goal which extracts the hibernate-mapping-configuration and exports
106 an according SQL-database-schema.</div>
107 <p><b>Attributes</b>:</p>
109 <li>Requires a Maven project to be executed.</li>
110 <li>Requires dependency resolution of artifacts in scope: <tt>runtime</tt>.</li>
111 <li>The goal is thread-safe and supports parallel builds.</li>
112 <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>
114 <div class="section"><h3>Optional Parameters<a name="Optional_Parameters"></a></h3>
115 <table align="center" class="bodyTable" border="0">
117 <th align="left">Name</th>
118 <th align="left">Type</th>
119 <th align="left">Since</th>
120 <th align="left">Description</th>
123 <td align="left"><b><a href="#delimiter">delimiter</a></b></td>
124 <td align="left"><tt>String</tt></td>
125 <td align="left"><tt>-</tt></td>
126 <td align="left">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>
129 <td align="left"><b><a href="#driverClassName">driverClassName</a></b></td>
130 <td align="left"><tt>String</tt></td>
131 <td align="left"><tt>-</tt></td>
132 <td align="left">SQL-Driver name.<br /><b>User property is</b>: <tt>hibernate.connection.driver_class</tt>.</td>
135 <td align="left"><b><a href="#force">force</a></b></td>
136 <td align="left"><tt>boolean</tt></td>
137 <td align="left"><tt>-</tt></td>
138 <td align="left">Force execution
139 <p>Force execution, even if no modified or newly added annotated
140 classes where found and the dialect was not changed.</p>
141 <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>
144 <td align="left"><b><a href="#format">format</a></b></td>
145 <td align="left"><tt>boolean</tt></td>
146 <td align="left"><tt>-</tt></td>
147 <td align="left">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>
150 <td align="left"><b><a href="#hibernateDialect">hibernateDialect</a></b></td>
151 <td align="left"><tt>String</tt></td>
152 <td align="left"><tt>-</tt></td>
153 <td align="left">Hibernate dialect.<br /><b>User property is</b>: <tt>hibernate.dialect</tt>.</td>
156 <td align="left"><b><a href="#hibernateProperties">hibernateProperties</a></b></td>
157 <td align="left"><tt>String</tt></td>
158 <td align="left"><tt>-</tt></td>
159 <td align="left">Path to Hibernate configuration file.<br /><b>Default value is</b>: <tt>${project.build.outputDirectory}/hibernate.properties</tt>.<br /></td>
162 <td align="left"><b><a href="#outputDirectory">outputDirectory</a></b></td>
163 <td align="left"><tt>String</tt></td>
164 <td align="left"><tt>-</tt></td>
165 <td align="left">Classes-Directory to scan.
166 <p>This parameter defaults to the maven build-output-directory for
167 classes. Additonally, all dependencies are scanned for annotated
168 classes.</p><br /><b>User property is</b>: <tt>project.build.outputDirectory</tt>.</td>
171 <td align="left"><b><a href="#outputFile">outputFile</a></b></td>
172 <td align="left"><tt>String</tt></td>
173 <td align="left"><tt>-</tt></td>
174 <td align="left">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>
177 <td align="left"><b><a href="#password">password</a></b></td>
178 <td align="left"><tt>String</tt></td>
179 <td align="left"><tt>-</tt></td>
180 <td align="left">Database password<br /><b>User property is</b>: <tt>hibernate.connection.password</tt>.</td>
183 <td align="left"><b><a href="#scanTestClasses">scanTestClasses</a></b></td>
184 <td align="left"><tt>boolean</tt></td>
185 <td align="left"><tt>-</tt></td>
186 <td align="left">Wether to scan test-classes too, or not.
187 <p>If this parameter is set to <tt>true</tt> the test-classes
188 of the artifact will be scanned for hibernate-annotated classes
189 additionally.</p><br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>hibernate.export.scann_testclasses</tt>.</td>
192 <td align="left"><b><a href="#skip">skip</a></b></td>
193 <td align="left"><tt>boolean</tt></td>
194 <td align="left"><tt>-</tt></td>
195 <td align="left">Skip execution
196 <p>If set to <tt>true</tt>, the execution is skipped.</p>
197 <p>A skipped excecution is signaled via the maven-property
198 <tt>${hibernate.export.skipped}</tt>.</p>
199 <p>The excecution is skipped automatically, if no modified or newly
200 added annotated classes are found and the dialect was not
201 changed.</p><br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>maven.test.skip</tt>.</td>
204 <td align="left"><b><a href="#target">target</a></b></td>
205 <td align="left"><tt>String</tt></td>
206 <td align="left"><tt>-</tt></td>
207 <td align="left">Target of execution:
209 <li><b>NONE</b> do nothing - just validate the
210 configuration (forces excecution, signals skip)</li>
211 <li><b>EXPORT</b> create database
212 (<b>DEFAULT!</b>. forces excecution, signals skip)</li>
213 <li><b>SCRIPT</b> export schema to SQL-script</li>
215 </ul><br /><b>Default value is</b>: <tt>EXPORT</tt>.<br /><b>User property is</b>: <tt>hibernate.export.target</tt>.</td>
218 <td align="left"><b><a href="#testOutputDirectory">testOutputDirectory</a></b></td>
219 <td align="left"><tt>String</tt></td>
220 <td align="left"><tt>-</tt></td>
221 <td align="left">Test-Classes-Directory to scan.
222 <p>This parameter defaults to the maven build-output-directory for
224 <p>This parameter is only used, when <tt>scanTestClasses</tt>
225 is set to <tt>true</tt>!</p><br /><b>User property is</b>: <tt>project.build.testOutputDirectory</tt>.</td>
228 <td align="left"><b><a href="#type">type</a></b></td>
229 <td align="left"><tt>String</tt></td>
230 <td align="left"><tt>-</tt></td>
231 <td align="left">Type of execution.
233 <li><b>NONE</b> do nothing - just validate the
235 <li><b>CREATE</b> create database-schema</li>
236 <li><b>DROP</b> drop database-schema</li>
237 <li><b>BOTH</b> (<b>DEFAULT!</b>)</li>
238 </ul><br /><b>Default value is</b>: <tt>BOTH</tt>.<br /><b>User property is</b>: <tt>hibernate.export.type</tt>.</td>
241 <td align="left"><b><a href="#url">url</a></b></td>
242 <td align="left"><tt>String</tt></td>
243 <td align="left"><tt>-</tt></td>
244 <td align="left">Database URL.<br /><b>User property is</b>: <tt>hibernate.connection.url</tt>.</td>
247 <td align="left"><b><a href="#username">username</a></b></td>
248 <td align="left"><tt>String</tt></td>
249 <td align="left"><tt>-</tt></td>
250 <td align="left">Database username<br /><b>User property is</b>: <tt>hibernate.connection.username</tt>.</td>
254 <div class="section"><h3>Parameter Details<a name="Parameter_Details"></a></h3>
255 <p><b><a name="delimiter">delimiter</a>:</b></p>
256 <div>Delimiter in output-file.</div>
258 <li><b>Type</b>: <tt>java.lang.String</tt></li>
259 <li><b>Required</b>: <tt>No</tt></li>
260 <li><b>User Property</b>: <tt>hibernate.export.schema.delimiter</tt></li>
261 <li><b>Default</b>: <tt>;</tt></li>
262 </ul><hr /><p><b><a name="driverClassName">driverClassName</a>:</b></p>
263 <div>SQL-Driver name.</div>
265 <li><b>Type</b>: <tt>java.lang.String</tt></li>
266 <li><b>Required</b>: <tt>No</tt></li>
267 <li><b>User Property</b>: <tt>hibernate.connection.driver_class</tt></li>
268 </ul><hr /><p><b><a name="force">force</a>:</b></p>
270 <p>Force execution, even if no modified or newly added annotated
271 classes where found and the dialect was not changed.</p>
272 <p><tt>skip</tt> takes precedence over <tt>force</tt>.</p></div>
274 <li><b>Type</b>: <tt>boolean</tt></li>
275 <li><b>Required</b>: <tt>No</tt></li>
276 <li><b>User Property</b>: <tt>hibernate.export.force</tt></li>
277 <li><b>Default</b>: <tt>false</tt></li>
278 </ul><hr /><p><b><a name="format">format</a>:</b></p>
279 <div>Format output-file.</div>
281 <li><b>Type</b>: <tt>boolean</tt></li>
282 <li><b>Required</b>: <tt>No</tt></li>
283 <li><b>User Property</b>: <tt>hibernate.export.schema.format</tt></li>
284 <li><b>Default</b>: <tt>true</tt></li>
285 </ul><hr /><p><b><a name="hibernateDialect">hibernateDialect</a>:</b></p>
286 <div>Hibernate dialect.</div>
288 <li><b>Type</b>: <tt>java.lang.String</tt></li>
289 <li><b>Required</b>: <tt>No</tt></li>
290 <li><b>User Property</b>: <tt>hibernate.dialect</tt></li>
291 </ul><hr /><p><b><a name="hibernateProperties">hibernateProperties</a>:</b></p>
292 <div>Path to Hibernate configuration file.</div>
294 <li><b>Type</b>: <tt>java.lang.String</tt></li>
295 <li><b>Required</b>: <tt>No</tt></li>
296 <li><b>Default</b>: <tt>${project.build.outputDirectory}/hibernate.properties</tt></li>
297 </ul><hr /><p><b><a name="outputDirectory">outputDirectory</a>:</b></p>
298 <div>Classes-Directory to scan.
299 <p>This parameter defaults to the maven build-output-directory for
300 classes. Additonally, all dependencies are scanned for annotated
303 <li><b>Type</b>: <tt>java.lang.String</tt></li>
304 <li><b>Required</b>: <tt>No</tt></li>
305 <li><b>User Property</b>: <tt>project.build.outputDirectory</tt></li>
306 </ul><hr /><p><b><a name="outputFile">outputFile</a>:</b></p>
307 <div>Output file.</div>
309 <li><b>Type</b>: <tt>java.lang.String</tt></li>
310 <li><b>Required</b>: <tt>No</tt></li>
311 <li><b>User Property</b>: <tt>hibernate.export.schema.filename</tt></li>
312 <li><b>Default</b>: <tt>${project.build.directory}/schema.sql</tt></li>
313 </ul><hr /><p><b><a name="password">password</a>:</b></p>
314 <div>Database password</div>
316 <li><b>Type</b>: <tt>java.lang.String</tt></li>
317 <li><b>Required</b>: <tt>No</tt></li>
318 <li><b>User Property</b>: <tt>hibernate.connection.password</tt></li>
319 </ul><hr /><p><b><a name="scanTestClasses">scanTestClasses</a>:</b></p>
320 <div>Wether to scan test-classes too, or not.
321 <p>If this parameter is set to <tt>true</tt> the test-classes
322 of the artifact will be scanned for hibernate-annotated classes
323 additionally.</p></div>
325 <li><b>Type</b>: <tt>boolean</tt></li>
326 <li><b>Required</b>: <tt>No</tt></li>
327 <li><b>User Property</b>: <tt>hibernate.export.scann_testclasses</tt></li>
328 <li><b>Default</b>: <tt>false</tt></li>
329 </ul><hr /><p><b><a name="skip">skip</a>:</b></p>
331 <p>If set to <tt>true</tt>, the execution is skipped.</p>
332 <p>A skipped excecution is signaled via the maven-property
333 <tt>${hibernate.export.skipped}</tt>.</p>
334 <p>The excecution is skipped automatically, if no modified or newly
335 added annotated classes are found and the dialect was not
338 <li><b>Type</b>: <tt>boolean</tt></li>
339 <li><b>Required</b>: <tt>No</tt></li>
340 <li><b>User Property</b>: <tt>maven.test.skip</tt></li>
341 <li><b>Default</b>: <tt>false</tt></li>
342 </ul><hr /><p><b><a name="target">target</a>:</b></p>
343 <div>Target of execution:
345 <li><b>NONE</b> do nothing - just validate the
346 configuration (forces excecution, signals skip)</li>
347 <li><b>EXPORT</b> create database
348 (<b>DEFAULT!</b>. forces excecution, signals skip)</li>
349 <li><b>SCRIPT</b> export schema to SQL-script</li>
353 <li><b>Type</b>: <tt>java.lang.String</tt></li>
354 <li><b>Required</b>: <tt>No</tt></li>
355 <li><b>User Property</b>: <tt>hibernate.export.target</tt></li>
356 <li><b>Default</b>: <tt>EXPORT</tt></li>
357 </ul><hr /><p><b><a name="testOutputDirectory">testOutputDirectory</a>:</b></p>
358 <div>Test-Classes-Directory to scan.
359 <p>This parameter defaults to the maven build-output-directory for
361 <p>This parameter is only used, when <tt>scanTestClasses</tt>
362 is set to <tt>true</tt>!</p></div>
364 <li><b>Type</b>: <tt>java.lang.String</tt></li>
365 <li><b>Required</b>: <tt>No</tt></li>
366 <li><b>User Property</b>: <tt>project.build.testOutputDirectory</tt></li>
367 </ul><hr /><p><b><a name="type">type</a>:</b></p>
368 <div>Type of execution.
370 <li><b>NONE</b> do nothing - just validate the
372 <li><b>CREATE</b> create database-schema</li>
373 <li><b>DROP</b> drop database-schema</li>
374 <li><b>BOTH</b> (<b>DEFAULT!</b>)</li>
377 <li><b>Type</b>: <tt>java.lang.String</tt></li>
378 <li><b>Required</b>: <tt>No</tt></li>
379 <li><b>User Property</b>: <tt>hibernate.export.type</tt></li>
380 <li><b>Default</b>: <tt>BOTH</tt></li>
381 </ul><hr /><p><b><a name="url">url</a>:</b></p>
382 <div>Database URL.</div>
384 <li><b>Type</b>: <tt>java.lang.String</tt></li>
385 <li><b>Required</b>: <tt>No</tt></li>
386 <li><b>User Property</b>: <tt>hibernate.connection.url</tt></li>
387 </ul><hr /><p><b><a name="username">username</a>:</b></p>
388 <div>Database username</div>
390 <li><b>Type</b>: <tt>java.lang.String</tt></li>
391 <li><b>Required</b>: <tt>No</tt></li>
392 <li><b>User Property</b>: <tt>hibernate.connection.username</tt></li>
400 <div class="clear">
\r
404 <div class="xright">Copyright © 2013.
\r
405 All Rights Reserved.
\r
408 <div class="clear">
\r