WIP:bulma:neu:Projekte-entfernt
[website] / dist / hibernate4-maven-plugin-1.0.2 / pitfalls.html
diff --git a/dist/hibernate4-maven-plugin-1.0.2/pitfalls.html b/dist/hibernate4-maven-plugin-1.0.2/pitfalls.html
deleted file mode 100644 (file)
index 0f23586..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-<!DOCTYPE html>
-<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2014-04-29 -->
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <!-- Current: pitfalls.html -->
-<!-- Active: index.html -->
-<!-- Path: [index.html, pitfalls.html] -->
-<!-- Skiplist: [index.html, configuration.html, export-mojo.html, debugging.html, force.html, pitfalls.html] -->
-<html>
-  <head>
-    <title>juplo - Hibernate 4 Maven Plugin - Known Pitfalls (FAQ)</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-    <link rel="canonical" href="http://juplo.de/hibernate4-maven-plugin/pitfalls.html"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <link rel="stylesheet" type="text/css" href="/css/base.css" />
-    <style type="text/css">
-      @import '/css/screen.css' screen;
-      @import '/css/print.css' print;
-    </style>
-    <script src="/js/base.js"></script>
-    <!--[if IE 8]>
-      <link rel="stylesheet" type="text/css" href="/css/ie8.css" />
-      <script src="/js/ie8.js"></script>
-    <![endif]-->
-    <!--[if IE 7]>
-      <script src="/js/ie7.js"></script>
-    <![endif]-->
-    <!--[if lt IE 7]>
-      <script src="/js/ie6.js"></script>
-    <![endif]-->
-    <meta name="Date-Revision-yyyymmdd" content="20140429" />
-    <meta http-equiv="Content-Language" content="en" />
-        
-  </head>
-  <body id="top" class="menu" onload="prettyPrint()">
-    <div id="page" class="cf">
-      <header id="header">
-        <h1 id="logo"><a href="/" title="Home" class="l">juplo</a></h1>
-        <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span>
-        <hr class="h" />
-      </header>
-      <div id="breadcrumb">
-        <strong class="b title">You are here:</strong>
-        <ol class="b">
-          <li class="b"><a class="b" href="/">Home</a></li>
-          <li class="b"><a class="b" href="/projects.html">Projects</a></li>
-                      <li class="b"><a class="b" href="./index.html">Hibernate 4 Maven Plugin</a </li>
-                        <li class="b"><strong class="b">Known Pitfalls (FAQ)</strong></li>
-                  </ol>
-        <a class="hide" href="#nav" title="Show navigation menu">Jump to navigation</a>
-        <hr class="b" />
-      </div>
-      <main class="content cf">
-        <section id="content" class="main">
-          <h1>Hibernate 4 Maven Plugin - Known Pitfalls (FAQ)</h1>
-          <div class="section">
-<h2>Known Pitfalls<a name="Known_Pitfalls"></a></h2>
-<div class="section">
-<h3>hibernate4-maven-plugin always needs a database-connection<a name="hibernate4-maven-plugin_always_needs_a_database-connection"></a></h3>
-<p>The default-configuration uses the EXPORT-target of the SchemaExport-Tool. If you do not need to create a database with the evaluated schema, you can use the NONE- or the SCRIPT-target. This can be achieved with the commandline-parameter <tt>-Dhibernate.export.target=SCRIPT</tt> or with the following configuration:</p>
-<div>
-<pre>&lt;configuration&gt;
-  &lt;target&gt;SCRIPT&lt;/target&gt;
-&lt;/configuration&gt;</pre></div>
-<p>But even when no database is to be created, hibernate always needs to know the dialect. Hence, the plugin will fail if this parameter is missing!</p></div>
-<div class="section">
-<h3>Dependency for driver-class XYZ is missing<a name="Dependency_for_driver-class_XYZ_is_missing"></a></h3>
-<p>One regular problem is the scope of the jdbc-driver-dependency. It is very unlikely, that this dependency is needed at compile-time. So a tidy maven-developer would usually scope it for <tt>runtime</tt>.</p>
-<p>But this will break the execution of the <tt>hibernate4-maven-plugin</tt>. Since it will not be able to see the needed dependency, it will fail with an error-message like:</p>
-<div>
-<pre>[INFO] Gathered hibernate-configuration (turn on debugging for details):
-[INFO]   hibernate.connection.username = sa
-[INFO]   hibernate.connection.password = 
-[INFO]   hibernate.dialect = org.hibernate.dialect.HSQLDialect
-[INFO]   hibernate.connection.url = jdbc:hsqldb:/home/kai/mmf/target/mmf;shutdown=true
-[INFO]   hibernate.connection.driver_class = org.hsqldb.jdbcDriver
-[ERROR] Dependency for driver-class org.hsqldb.jdbcDriver is missing!
-[INFO] ------------------------------------------------------------------------
-[ERROR] BUILD ERROR
-[INFO] ------------------------------------------------------------------------
-[INFO] org.hsqldb.jdbcDriver
-[INFO] ------------------------------------------------------------------------
-[INFO] For more information, run Maven with the -e switch
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 2 seconds
-[INFO] Finished at: Thu Nov 29 11:31:14 CET 2012
-[INFO] Final Memory: 32M/342M
-[INFO] ------------------------------------------------------------------------</pre></div>
-<p>A quick workaround for this error would be, to delete the runtime-constraint for the jdbc-driver-dependency.</p>
-<p>A much cleaner way is, to (additionally) ad the dependency, to the plugin-definition:</p>
-<div>
-<pre>&lt;plugin&gt;
-  &lt;groupId&gt;de.juplo&lt;/groupId&gt;
-  &lt;artifactId&gt;hibernate4-maven-plugin&lt;/artifactId&gt;
-  &lt;version&gt;${project.version}&lt;/version&gt;
-  &lt;executions&gt;
-    &lt;execution&gt;
-      &lt;goals&gt;
-        &lt;goal&gt;export&lt;/goal&gt;
-      &lt;/goals&gt;
-    &lt;/execution&gt;
-  &lt;/executions&gt;
-  &lt;dependencies&gt;
-  &lt;dependency&gt;
-    &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
-    &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
-    &lt;version&gt;2.2.8&lt;/version&gt;
-  &lt;/dependency&gt;
-  &lt;/dependencies&gt;
-&lt;/plugin&gt;</pre></div>
-<p>This is also the best way, if you use a different jdbc-driver for testing, than in production. Because otherwise, this dependency will unnecessarily bloat the runtime-dependencies of your project.</p></div>
-<div class="section">
-<h3>DBUnit <a name="fails">fails</a> after execution of hibernate4 was skipped because nothing has changed<a name="DBUnit_fails_after_execution_of_hibernate4_was_skipped_because_nothing_has_changed"></a></h3>
-<p>If hibernate4-maven-plugin skips its excecution, this may lead to errors in other plugins. For example, when importing sample-data in the automatically created database with the help of the <a class="externalLink" href="http://mojo.codehaus.org/dbunit-maven-plugin/">dbunit-plugin</a>, the <tt>CLEAN_INSERT</tt>-operation may fail because of foreign-key-constraints, if the database was not recreated, because the hibernate4-maven-plugin has skipped its excecution.</p>
-<p>A quick fix to this problem is, to <a href="./force.html">force</a> hibernate4-maven-plugin to export the schema every time it is running. But to recreate the database on every testrun may noticeable slow down your development cycle, if you have to wait for slow IO.</p>
-<p>To circumvent this problem, hibernate4-maven-plugin signals a skipped excecution by setting the maven property <tt>$<a name="hibernate.export.skipped">hibernate.export.skipped</a></tt> to <tt>true</tt>. You can configure other plugins to react on this signal. For example, the dbunit-plugin can be configured to skip its excecution, if hibernate4-maven-plugin was skipped like this:</p>
-<div>
-<pre>&lt;plugin&gt;
-  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-  &lt;artifactId&gt;dbunit-maven-plugin&lt;/artifactId&gt;
-  &lt;configuration&gt;
-    &lt;skip&gt;${hibernate.export.skipped}&lt;/skip&gt;
-  &lt;/configuration&gt;
-&lt;/plugin&gt;</pre></div></div>
-<div class="section">
-<h3>The database will not be recreated after a manual drop/clean<a name="The_database_will_not_be_recreated_after_a_manual_dropclean"></a></h3>
-<p>If one manually drops the database or removes the hsqldb-files, it will not be recreated by the hibernate4-maven-plugin, because it cannot detect, that the database needs to be recreated. This happens, because the plugin will not recreate the database if neither the configuration nor the annotated classes have changed, because an unnecessary drop-create-cycle might take a long time. The plugin will report that like this: ------------- [INFO] No modified annotated classes found and dialect unchanged. [INFO] Skipping schema generation! [------------</p>
-<p>If one always uses <tt>mvn clen</tt> for cleanup, this will not happen. Otherwise the recreation must be <a href="./force.html">forced</a>:</p>
-<div>
-<pre>mvn hibernate4:export -Dhibernate.export.force=true</pre></div></div></div>
-        </section>
-        <div class="marginal">
-          <nav id="nav">
-            <hr class="n" />
-            <a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a>
-            <h2 class="nav menu">Section-Menu</h2>
-            <ul id="menu">
-              <li class="m blog"><a href="/blog/" class="m">Blog</a></li>
-              <li class="m projects"><a href="/projects.html" class="m selected">Projects</a></li>
-            </ul>
-            <h2 class="nav submenu">
-              <span class="s">Submenu for section</span>
-              <a class="s selected" href="/projects.html">Projects</a>
-            </h2>
-            <ul id="submenu" class="s">
-                                                              <li class="s sub">
-                                          <a class="s selected" href="./index.html">Hibernate 4 Maven Plugin</a>
-                                        <ul class="s active">
-                                                                                                                                                                                                                                                          <li class="s">
-                    <a href="configuration.html" class="s" title="Configuration Examples">Configuration Examples</a>
-                </li>
-                                                                                                                  <li class="s">
-                    <a href="export-mojo.html" class="s" title="Parameter Documentation">Parameter Documentation</a>
-                </li>
-                                                                                                                  <li class="s">
-                    <a href="debugging.html" class="s" title="Enable Debug-Output">Enable Debug-Output</a>
-                </li>
-                                                                                                                  <li class="s">
-                    <a href="force.html" class="s" title="Force Exceution">Force Exceution</a>
-                </li>
-                                                                                                                        <li class="s">
-              <strong class="s">Known Pitfalls (FAQ)</strong>
-                </li>
-                                                                                                                                                                                                                                                                                                                                        <li class="s sub">
-                    <a href="project-info.html" class="s" title="Project Information">Project Information</a>
-                </li>
-                                                                                                                                                                                        <li class="s sub">
-                    <a href="project-reports.html" class="s" title="Project Reports">Project Reports</a>
-                </li>
-                                                                                              </ul>
-                  </li>
-                                          </ul>
-            <hr class="n" />
-          </nav>
-          <p>
-            <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
-              <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
-            </a>
-          </p>
-        </div>
-      </main>
-      <footer id="footer">
-        <hr class="f" />
-        <ul id="footerlinks">
-          <li class="f" id="copyright">© <strong>mo</strong> 2013</li>
-          <li class="f"><a class="f" href="/impressum.html">Impressum</a></li>
-          <li class="f about"><a class="f" href="/about.html">About</a></li>
-        </ul>
-      </footer>
-    </div>
-        <script type="text/javascript"><!--//--><![CDATA[//><!--
-      var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', 'UA-571104-3']);
-      _gaq.push(['_trackPageview']);
-      (function() {
-        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-      })();
-    //--><!]]>
-      </body>
-</html>