WIP:bulma:neu:Projekte-entfernt
[website] / dist / hibernate4-maven-plugin-1.0.1 / pitfalls.html
diff --git a/dist/hibernate4-maven-plugin-1.0.1/pitfalls.html b/dist/hibernate4-maven-plugin-1.0.1/pitfalls.html
deleted file mode 100644 (file)
index af860a6..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<!-- Generated by Apache Maven Doxia at Jan 15, 2013 -->\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
-  <head>\r
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-    <title>Hibernate 4 Maven Plugin - </title>\r
-    <style type="text/css" media="all">\r
-      @import url("./css/maven-base.css");\r
-      @import url("./css/maven-theme.css");\r
-      @import url("./css/site.css");\r
-    </style>\r
-    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />\r
-    <meta name="Date-Revision-yyyymmdd" content="20130115" />\r
-    <meta http-equiv="Content-Language" content="en" />\r
-                                                    
-<script type="text/javascript"><!--
-
-        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);
-        })();
-
-      //--></script>\r
-                      \r
-  </head>\r
-  <body class="composite">\r
-    <div id="banner">\r
-                    <div id="bannerLeft">\r
-                Hibernate 4 Maven Plugin\r
-                </div>\r
-                    <div class="clear">\r
-        <hr/>\r
-      </div>\r
-    </div>\r
-    <div id="breadcrumbs">\r
-            \r
-        \r
-                <div class="xleft">\r
-        <span id="publishDate">Last Published: 2013-01-15</span>\r
-                  &nbsp;| <span id="projectVersion">Version: 1.0.1</span>\r
-                          |                           <a href="http://juplo.de" class="externalLink" title="juplo">juplo</a>\r
-                          </div>\r
-            <div class="xright">        \r
-        \r
-      </div>\r
-      <div class="clear">\r
-        <hr/>\r
-      </div>\r
-    </div>\r
-    <div id="leftColumn">\r
-      <div id="navcolumn">\r
-             \r
-        \r
-                                <h5>Overview</h5>\r
-                  <ul>\r
-                  <li class="none">\r
-                          <a href="index.html" title="Introduction">Introduction</a>\r
-            </li>\r
-                  <li class="none">\r
-                          <a href="configuration.html" title="Configuration Examples">Configuration Examples</a>\r
-            </li>\r
-                  <li class="none">\r
-                          <a href="export-mojo.html" title="Parameter Documentation">Parameter Documentation</a>\r
-            </li>\r
-                  <li class="none">\r
-                          <a href="debugging.html" title="Enable Debug-Output">Enable Debug-Output</a>\r
-            </li>\r
-                  <li class="none">\r
-                          <a href="force.html" title="Force Exceution">Force Exceution</a>\r
-            </li>\r
-                  <li class="none">\r
-            <strong>Known Pitfalls</strong>\r
-          </li>\r
-          </ul>\r
-                       <h5>Project Documentation</h5>\r
-                  <ul>\r
-                                                                                                                                                                                                                                                        <li class="collapsed">\r
-                          <a href="project-info.html" title="Project Information">Project Information</a>\r
-                  </li>\r
-                                                                                                                                            <li class="collapsed">\r
-                          <a href="project-reports.html" title="Project Reports">Project Reports</a>\r
-                  </li>\r
-          </ul>\r
-                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">\r
-        <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />\r
-      </a>\r
-                   \r
-        \r
-            </div>\r
-    </div>\r
-    <div id="bodyColumn">\r
-      <div id="contentBox">\r
-        <div class="section"><h2>Known Pitfalls<a name="Known_Pitfalls"></a></h2><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;1.0.1&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>\r
-      </div>\r
-    </div>\r
-    <div class="clear">\r
-      <hr/>\r
-    </div>\r
-    <div id="footer">\r
-      <div class="xright">Copyright &#169;                   2013.\r
-          All Rights Reserved.      \r
-        \r
-      </div>\r
-      <div class="clear">\r
-        <hr/>\r
-      </div>\r
-    </div>\r
-  </body>\r
-</html>\r