HTML-Vorlagen für Blog-Seiten und Formular-Beispiele
[website] / src / main / webapp / WEB-INF / views / blog / comments.html
1 <!DOCTYPE html>
2 <html lang="en-US">
3   <head>
4     <meta charset="UTF-8" />
5     <meta name="viewport" content="width=device-width" />
6     <title>hibernate4-maven-plugin | juplo</title>
7     <link rel="profile" href="http://gmpg.org/xfn/11" />
8     <link rel="pingback" href="http://juplo.de/xmlrpc.php" />
9
10     <link rel="alternate" type="application/rss+xml" title="juplo &raquo; Feed" href="http://juplo.de/feed/" />
11 <link rel="alternate" type="application/rss+xml" title="juplo &raquo; Comments Feed" href="http://juplo.de/comments/feed/" />
12
13             <script type="text/javascript">//<![CDATA[
14             // Google Analytics for WordPress by Yoast v4.3.3 | http://yoast.com/wordpress/google-analytics/
15             var _gaq = _gaq || [];
16             _gaq.push(['_setAccount', 'UA-571104-3']);
17                                             _gaq.push(['_trackPageview']);
18             (function () {
19                 var ga = document.createElement('script');
20                 ga.type = 'text/javascript';
21                 ga.async = true;
22                 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
23
24                 var s = document.getElementsByTagName('script')[0];
25                 s.parentNode.insertBefore(ga, s);
26             })();
27             //]]></script>
28                         <link rel="alternate" type="application/rss+xml" title="juplo &raquo; hibernate4-maven-plugin Comments Feed" href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/feed/" />
29 <link rel='stylesheet' id='admin-bar-css'  href='http://juplo.de/wp-includes/css/admin-bar.min.css?ver=3.6.1' type='text/css' media='all' />
30 <link rel='stylesheet' id='style-css'  href='http://juplo.de/wp-content/themes/juplo-theme/style.css?ver=3.6.1' type='text/css' media='all' />
31 <script type='text/javascript' src='http://juplo.de/wp-includes/js/comment-reply.min.js?ver=3.6.1'></script>
32 <script type='text/javascript' src='http://juplo.de/wp-includes/js/jquery/jquery.js?ver=1.10.2'></script>
33 <script type='text/javascript' src='http://juplo.de/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
34 <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://juplo.de/xmlrpc.php?rsd" />
35 <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://juplo.de/wp-includes/wlwmanifest.xml" /> 
36 <link rel='next' title='hibernate4-maven-plugin 1.0 released!' href='http://juplo.de/hibernate4-maven-plugin-1-0-released/' />
37 <meta name="generator" content="WordPress 3.6.1" />
38 <link rel='canonical' href='http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/' />
39 <link rel='shortlink' href='http://juplo.de/?p=34' />
40         <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
41 <style type="text/css" media="print">#wpadminbar { display:none; }</style>
42 <style type="text/css" media="screen">
43         html { margin-top: 28px !important; }
44         * html body { margin-top: 28px !important; }
45 </style>
46
47     <link rel="stylesheet" type="text/css" href="/css/base.css" />
48     <style type="text/css">
49       @import '/css/screen.css' screen and (min-width: 960px);
50       @import '/css/phone.css' screen and (max-width: 599px);
51       @import '/css/tiny.css' screen and (max-width: 399px);
52     </style>
53     <script src="/js/base.js"></script>
54     <!--[if IE 8]>
55       <script src="/js/ie8.js"></script>
56     <![endif]-->
57     <!--[if IE 7]>
58       <script src="/js/ie7.js"></script>
59     <![endif]-->
60     <!--[if lt IE 7]>
61       <script src="/js/ie6.js"></script>
62     <![endif]-->
63
64   </head>
65   <body class="single single-post postid-34 single-format-standard logged-in admin-bar no-customize-support" onload="prettyPrint()">
66     <div id="page">
67       <header id="header">
68         <a href="http://juplo.de/" title="juplo" rel="home" id="logo">juplo</a>
69         <span id="slogan">Java bits from nerds for nerds</span>
70         <hr class="h"/>
71       </header>
72     <div class="fc cols_2">
73       <div class="content cf">
74         <div id="content" class="main">
75            
76 <article id="post-34" class="post-34 post type-post status-publish format-standard hentry category-hibernate category-java category-maven">
77     <div class="entry-header">
78         <h1 class="entry-title">hibernate4-maven-plugin</h1>
79  
80         <div class="entry-meta">
81             Posted on <a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/" title="19:29" rel="bookmark"><time class="entry-date" datetime="2012-11-28T19:29:12+00:00" pubdate>November 28, 2012</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://juplo.de/author/kai/" title="View all posts by Kai Moritz" rel="author">Kai Moritz</a></span></span>        </div><!-- .entry-meta -->
82     </div><!-- .entry-header -->
83  
84     <div class="entry-content">
85         <h2>A simple Plugin for generating a Database-Schema from Hibernate 4 Mapping-Annotations</h2>
86 <p>
87 Hibernate comes with the buildin functionality, to automatically create or update the database schema. This functionality is configured in the session-configuraton via the parameter <code>hbm2ddl.auto</code> (see <a href="http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html_single/#configuration-optional" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://docs.jboss.org']);">Hibernate Reference Documentation &#8211; Chapter 3.4. Optional configuration properties</a>). But doing so <a href="http://stackoverflow.com/questions/221379/hibernate-hbm2ddl-auto-update-in-production" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://stackoverflow.com']);">is not very wise</a>, because you can easily corrupt or erase your production database, if this configuration parameter slips through to your production environment.
88 </p>
89 <p>
90 Alternatively, you can <a href="http://stackoverflow.com/questions/835961/how-to-creata-database-schema-using-hibernate" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://stackoverflow.com']);">run the tools <strong>SchemaExport</strong> or <strong>SchemaUpdate</strong> by hand</a>. But that is not very comfortable and being used to maven you will quickly long for a plugin, that does that job automatically for you, when you fire up your test cases.
91 </p>
92 <p>In the good old times, there was the <a href="http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://mojo.codehaus.org']);">Maven Hibernate3 Plugin</a>, that does this for you. But unfortunatly, this plugin is not compatible with Hibernate 4.x. Since there does not seem to be any successor for the Maven Hibernate3 Plugin and <a href="http://www.google.de/search?q=hibernate4+maven+plugin" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://www.google.de']);">googeling</a> does not help, I decided to write up this simple plugin (inspired by these two articles I found: <a href="http://www.tikalk.com/alm/blog/schema-export-hibernate-4-and-maven" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://www.tikalk.com']);">Schema Export with Hibernate 4 and Maven</a> and <a href="http://doingenterprise.blogspot.de/2012/05/schema-generation-with-hibernate-4-jpa.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://doingenterprise.blogspot.de']);">Schema generation with Hibernate 4, JPA and Maven</a>).
93 </p>
94 <p>
95 I hope, the resulting simple to use buletproof <a href="/hibernate4-maven-plugin/">hibernate4-maven-plugin</a> is usefull!
96 </p>
97 <p>
98 <strong><a href="/hibernate4-maven-plugin/">Try it out now!</a></strong></p>
99             </div><!-- .entry-content -->
100  
101     <footer class="entry-meta">
102         This entry was posted in <a href="http://juplo.de/category/hibernate/" title="View all posts in Hibernate" rel="category tag">Hibernate</a>, <a href="http://juplo.de/category/java/" title="View all posts in Java" rel="category tag">Java</a>, <a href="http://juplo.de/category/maven/" title="View all posts in Maven" rel="category tag">Maven</a>. Bookmark the <a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/" title="Permalink to hibernate4-maven-plugin" rel="bookmark">permalink</a>. 
103     </footer><!-- .entry-meta -->
104 </article><!-- #post-34 -->
105
106 <!-- You can start editing here. -->
107
108         <h3 id="comments">15 Responses to &#8220;hibernate4-maven-plugin&#8221;</h3>
109
110         <div class="navigation">
111                 <div class="alignleft"></div>
112                 <div class="alignright"></div>
113         </div>
114
115         <ol class="commentlist">
116                         <li class="comment even thread-even depth-1 parent" id="comment-556">
117                                 <div id="div-comment-556" class="comment-body">
118                                 <div class="comment-author vcard">
119                                                 <cite class="fn">Jukes</cite> <span class="says">says:</span>           </div>
120                 
121                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-556">
122                         November 7, 2013 at 23:18</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=556" title="Edit comment">(Edit)</a>          </div>
123
124                 <p>Hi thanks a lot for making this plugin available, great work!!<br />
125 I have a problem generating postgres schema. Looks like the plugin ignores the data type when adding default values and that yields a syntax error from Postgres. Or maybe I&#8217;m doing something wrong. I&#8217;m using version 1.0.3.</p>
126 <p>For example I have in java:</p>
127 <p>    @Column(name = &#8220;financialEnabled&#8221;, nullable = false, columnDefinition = &#8220;default TRUE&#8221;)<br />
128     private boolean financialEnabled;</p>
129 <p>Generated SQL is:<br />
130     financialEnabled default TRUE not null,</p>
131 <p>As you can see the data type boolean is not translated to the SQL script. Thanks a lot for your help.</p>
132
133                 <div class="reply">
134                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=556#respond' onclick='return addComment.moveForm("div-comment-556", "556", "respond", "34")'>Reply</a>           </div>
135                                 </div>
136                 <ul class="children">
137                 <li class="comment byuser comment-author-kai bypostauthor odd alt depth-2" id="comment-567">
138                                 <div id="div-comment-567" class="comment-body">
139                                 <div class="comment-author vcard">
140                                                 <cite class="fn"><a href="http://juplo.de"   rel='external nofollow' class='url'>Kai Moritz</a></cite> <span class="says">says:</span>          </div>
141                 
142                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-567">
143                         November 11, 2013 at 13:09</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=567" title="Edit comment">(Edit)</a>         </div>
144
145                 <p>This plugin is only a tool to automate the generation of the SQL in your development-environment.<br />
146 Questions on how to anotate your code correctly are better asked in a user-forum from hibernate or such.</p>
147 <p>Nevertheless, I think I can give you a usefull hint:<br />
148 You are overwriting the automatically generated column-definition with &#8220;default TRUE&#8221;.<br />
149 Try it with</p>
150 <p>@Column(name = “financialEnabled”, nullable = false)<br />
151 private boolean financialEnabled;</p>
152
153                 <div class="reply">
154                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=567#respond' onclick='return addComment.moveForm("div-comment-567", "567", "respond", "34")'>Reply</a>           </div>
155                                 </div>
156                 </li><!-- #comment-## -->
157 </ul><!-- .children -->
158 </li><!-- #comment-## -->
159                 <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-390">
160                                 <div id="div-comment-390" class="comment-body">
161                                 <div class="comment-author vcard">
162                                                 <cite class="fn">Milios</cite> <span class="says">says:</span>          </div>
163                 
164                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-390">
165                         October 10, 2013 at 15:02</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=390" title="Edit comment">(Edit)</a>          </div>
166
167                 <p>Hi,</p>
168 <p>looks like a very nice plugin. Unfortunately, part of our entities are in other modules/dependencies.<br />
169 Do you plan to add the possibility to scan also for dependencies of the project or at least of the plugin?</p>
170 <p>Also, when I only want to generate the SQL and use the following configuration, I got nothing.</p>
171 <p>Config:</p>
172 <p>                de.juplo<br />
173                 hibernate4-maven-plugin<br />
174                 1.0.2</p>
175 <p>                    true<br />
176                     SCRIPT<br />
177                     NONE<br />
178                     com.deutscheboerse.hibernate.PostgreSQLDialect<br />
179                     ${project.build.directory}/hibernate4/cmm-schema.sql</p>
180 <p>                        com.deutscheboerse.energy<br />
181                         energy-commons-hibernate<br />
182                         ${commons.hibernate.version}</p>
183 <p>                        org.springframework.security<br />
184                         spring-security-core<br />
185                         ${spring.security.version}</p>
186 <p>                        org.slf4j<br />
187                         slf4j-log4j12<br />
188                         ${slf4j.version}</p>
189 <p>Output:<br />
190 mvn hibernate4:export -e<br />
191 [INFO] Error stacktraces are turned on.<br />
192 [INFO] Scanning for projects&#8230;<br />
193 [INFO]<br />
194 [INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
195 [INFO] Building CMM WAR 1.0.0-RC5-SNAPSHOT<br />
196 [INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
197 [INFO]<br />
198 [INFO] &#8212; hibernate4-maven-plugin:1.0.2:export (default-cli) @ cmm-war &#8212;<br />
199 [INFO] Scanning directory D:\_dev\work\ii\src\cmm\trunk\cmm-war\target\classes f<br />
200 [INFO] No hibernate-properties-file found! (Checked path: D:\_dev\work\ii\src\cm<br />
201 [INFO] Gathered hibernate-configuration (turn on debugging for details):<br />
202 [INFO]   hibernate.dialect = com.deutscheboerse.hibernate.PostgreSQLDialect<br />
203 [INFO] HHH000400: Using dialect: com.deutscheboerse.hibernate.PostgreSQLDialect<br />
204 [INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
205 [INFO] BUILD SUCCESS<br />
206 [INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
207 [INFO] Total time: 10.932s<br />
208 [INFO] Finished at: Thu Oct 10 12:51:05 UTC 2013<br />
209 [INFO] Final Memory: 9M/23M<br />
210 [INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
211 <p>Thanks for any help,<br />
212 Milos.</p>
213
214                 <div class="reply">
215                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=390#respond' onclick='return addComment.moveForm("div-comment-390", "390", "respond", "34")'>Reply</a>           </div>
216                                 </div>
217                 <ul class="children">
218                 <li class="comment byuser comment-author-kai bypostauthor odd alt depth-2 parent" id="comment-391">
219                                 <div id="div-comment-391" class="comment-body">
220                                 <div class="comment-author vcard">
221                                                 <cite class="fn"><a href="http://juplo.de"   rel='external nofollow' class='url'>Kai Moritz</a></cite> <span class="says">says:</span>          </div>
222                 
223                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-391">
224                         October 10, 2013 at 22:19</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=391" title="Edit comment">(Edit)</a>          </div>
225
226                 <p>Yes, I am working on the possibility, to scan for annotations in dependencies.<br />
227 Unfortunatly, I have no example-project for this use-case by hand.<br />
228 It would help a lot, if you could provide a sample-project on github or such.</p>
229 <p>Greetings kai</p>
230
231                 <div class="reply">
232                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=391#respond' onclick='return addComment.moveForm("div-comment-391", "391", "respond", "34")'>Reply</a>           </div>
233                                 </div>
234                 <ul class="children">
235                 <li class="comment byuser comment-author-kai bypostauthor even depth-3" id="comment-568">
236                                 <div id="div-comment-568" class="comment-body">
237                                 <div class="comment-author vcard">
238                                                 <cite class="fn"><a href="http://juplo.de"   rel='external nofollow' class='url'>Kai Moritz</a></cite> <span class="says">says:</span>          </div>
239                 
240                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-568">
241                         November 11, 2013 at 13:11</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=568" title="Edit comment">(Edit)</a>         </div>
242
243                 <p>Version 1.0.3 of the plugin can now scan for annotations in the dependencies, too.</p>
244
245                 <div class="reply">
246                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=568#respond' onclick='return addComment.moveForm("div-comment-568", "568", "respond", "34")'>Reply</a>           </div>
247                                 </div>
248                 </li><!-- #comment-## -->
249 </ul><!-- .children -->
250 </li><!-- #comment-## -->
251 </ul><!-- .children -->
252 </li><!-- #comment-## -->
253                 <li class="comment odd alt thread-even depth-1" id="comment-286">
254                                 <div id="div-comment-286" class="comment-body">
255                                 <div class="comment-author vcard">
256                                                 <cite class="fn">Pedro</cite> <span class="says">says:</span>           </div>
257                 
258                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-286">
259                         August 7, 2013 at 18:54</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=286" title="Edit comment">(Edit)</a>            </div>
260
261                 <p>Following my previous question, here is the debug info</p>
262 <p>[DEBUG] Dependency: /Users/pmarques/.m2/repository/org/springframework/security/spring-security-acl/3.1.4.RELEASE/spring-security-acl-3.1.4.RELEASE.jar<br />
263 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/atomikos-util/3.6.5/atomikos-util-3.6.5.jar<br />
264 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-api/3.6.5/transactions-api-3.6.5.jar<br />
265 [DEBUG] Dependency: /Users/pmarques/.m2/repository/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar<br />
266 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-jdbc-deprecated/3.6.5/transactions-jdbc-deprecated-3.6.5.jar<br />
267 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-jdbc/3.6.5/transactions-jdbc-3.6.5.jar<br />
268 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-jta/3.6.5/transactions-jta-3.6.5.jar<br />
269 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions/3.6.5/transactions-3.6.5.jar<br />
270 [DEBUG] Dependency: /Users/pmarques/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.jar<br />
271 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-jms-deprecated/3.6.5/transactions-jms-deprecated-3.6.5.jar<br />
272 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-jms/3.6.5/transactions-jms-3.6.5.jar<br />
273 [DEBUG] Dependency: /Users/pmarques/.m2/repository/com/atomikos/transactions-hibernate3/3.6.5/transactions-hibernate3-3.6.5.jar<br />
274 [INFO] Scanning directory /target/classes for annotated classes&#8230;</p>
275
276                 <div class="reply">
277                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=286#respond' onclick='return addComment.moveForm("div-comment-286", "286", "respond", "34")'>Reply</a>           </div>
278                                 </div>
279                 </li><!-- #comment-## -->
280                 <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-285">
281                                 <div id="div-comment-285" class="comment-body">
282                                 <div class="comment-author vcard">
283                                                 <cite class="fn">Pedro</cite> <span class="says">says:</span>           </div>
284                 
285                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-285">
286                         August 7, 2013 at 18:49</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=285" title="Edit comment">(Edit)</a>            </div>
287
288                 <p>Hi,</p>
289 <p>I have the following problem.<br />
290 The project that I use to test (and use the plugin) has the annotated classes as a dependency.<br />
291 I am getting the error:<br />
292 No annotated classes found in directory /target/classes</p>
293 <p>Shouldn&#8217;t the plugin scan all the dependencies also?</p>
294 <p>Thanks,<br />
295 Pedro.</p>
296
297                 <div class="reply">
298                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=285#respond' onclick='return addComment.moveForm("div-comment-285", "285", "respond", "34")'>Reply</a>           </div>
299                                 </div>
300                 <ul class="children">
301                 <li class="comment byuser comment-author-kai bypostauthor odd alt depth-2 parent" id="comment-287">
302                                 <div id="div-comment-287" class="comment-body">
303                                 <div class="comment-author vcard">
304                                                 <cite class="fn"><a href="http://juplo.de"   rel='external nofollow' class='url'>Kai Moritz</a></cite> <span class="says">says:</span>          </div>
305                 
306                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-287">
307                         August 7, 2013 at 19:12</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=287" title="Edit comment">(Edit)</a>            </div>
308
309                 <p>Hi Pedro,</p>
310 <p>I think, that your observation is right.<br />
311 But otherwise, dependencies should only be scanned if requested, because automatic scanning of the dependencies might lead to errors in other situations.</p>
312 <p>If you can make your project available to me (for example via github, or simply by mailing zipped version), I would add a configuration-parameter to enable/disable dependency-scanning and upload the refined plugin to central.</p>
313 <p>Regards,</p>
314 <p>Kai Moritz</p>
315
316                 <div class="reply">
317                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=287#respond' onclick='return addComment.moveForm("div-comment-287", "287", "respond", "34")'>Reply</a>           </div>
318                                 </div>
319                 <ul class="children">
320                 <li class="comment byuser comment-author-kai bypostauthor even depth-3" id="comment-426">
321                                 <div id="div-comment-426" class="comment-body">
322                                 <div class="comment-author vcard">
323                                                 <cite class="fn"><a href="http://juplo.de"   rel='external nofollow' class='url'>Kai Moritz</a></cite> <span class="says">says:</span>          </div>
324                 
325                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-426">
326                         October 18, 2013 at 02:52</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=426" title="Edit comment">(Edit)</a>          </div>
327
328                 <p>The <a href="/hibernate4-maven-plugin-1-0-3-released/" title="Open the release-notes" rel="nofollow">new version 1.0.3</a> of the plugin adds support for annotated classes in dependencies!</p>
329
330                 <div class="reply">
331                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=426#respond' onclick='return addComment.moveForm("div-comment-426", "426", "respond", "34")'>Reply</a>           </div>
332                                 </div>
333                 </li><!-- #comment-## -->
334 </ul><!-- .children -->
335 </li><!-- #comment-## -->
336 </ul><!-- .children -->
337 </li><!-- #comment-## -->
338                 <li class="comment odd alt thread-even depth-1 parent" id="comment-276">
339                                 <div id="div-comment-276" class="comment-body">
340                                 <div class="comment-author vcard">
341                                                 <cite class="fn"><a href="http://bidlogix.com" onclick="javascript:_gaq.push(['_trackEvent','outbound-commentauthor','http://bidlogix.com']);"  rel='external nofollow' class='url'>mike</a></cite> <span class="says">says:</span>             </div>
342                 
343                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-276">
344                         July 30, 2013 at 12:57</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=276" title="Edit comment">(Edit)</a>             </div>
345
346                 <p>Hello,</p>
347 <p>I&#8217;m upgrading from hibernate3 to to hibernate4 and have moved from the hibernate3-maven-plugin to this version. I haven&#8217;t undertaken (and don&#8217;t want to just yet) the big job of changing my hbm mapping files to annotations.</p>
348 <p>As far as I can see this is a show stopper for using your nice plugin. Can you please confirm if this is the case and whether you are planning to add support for scanning for hbm files?</p>
349 <p>Many thanks,</p>
350 <p>Mike Cohen.</p>
351
352                 <div class="reply">
353                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=276#respond' onclick='return addComment.moveForm("div-comment-276", "276", "respond", "34")'>Reply</a>           </div>
354                                 </div>
355                 <ul class="children">
356                 <li class="comment byuser comment-author-tortenheber even depth-2" id="comment-277">
357                                 <div id="div-comment-277" class="comment-body">
358                                 <div class="comment-author vcard">
359                                                 <cite class="fn">tortenheber</cite> <span class="says">says:</span>             </div>
360                 
361                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-277">
362                         July 31, 2013 at 23:18</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=277" title="Edit comment">(Edit)</a>             </div>
363
364                 <p>Hello Mike,</p>
365 <p>I added the requested feature in the SNAPSHOT-version.<br />
366 It would be nice, if you could test, if the new feature works, because I have no example project by hand, that still uses hibernate-mapping via XML.</p>
367 <p>You can download an actual build here:</p>
368 <p><a href="https://oss.sonatype.org/content/repositories/snapshots//de/juplo/hibernate4-maven-plugin/1.0.2-SNAPSHOT/" onclick="javascript:_gaq.push(['_trackEvent','outbound-comment','http://oss.sonatype.org']);" rel="nofollow">https://oss.sonatype.org/content/repositories/snapshots//de/juplo/hibernate4-maven-plugin/1.0.2-SNAPSHOT/</a></p>
369 <p>or build it by yourself from the sources.<br />
370 The feature is documented here:</p>
371 <p><a href="http://juplo.de/hibernate4-maven-plugin-1.0.2-SNAPSHOT/export-mojo.html"  rel="nofollow">http://juplo.de/hibernate4-maven-plugin-1.0.2-SNAPSHOT/export-mojo.html</a></p>
372 <p>Best regards</p>
373 <p>kai</p>
374
375                 <div class="reply">
376                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=277#respond' onclick='return addComment.moveForm("div-comment-277", "277", "respond", "34")'>Reply</a>           </div>
377                                 </div>
378                 </li><!-- #comment-## -->
379 </ul><!-- .children -->
380 </li><!-- #comment-## -->
381                 <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-50">
382                                 <div id="div-comment-50" class="comment-body">
383                                 <div class="comment-author vcard">
384                                                 <cite class="fn">Victor</cite> <span class="says">says:</span>          </div>
385                 
386                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-50">
387                         February 22, 2013 at 15:28</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=50" title="Edit comment">(Edit)</a>          </div>
388
389                 <p>Hey I have modified your code to support envers and generate auditing tables, if you want I can send you a patch. Thanks!</p>
390
391                 <div class="reply">
392                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=50#respond' onclick='return addComment.moveForm("div-comment-50", "50", "respond", "34")'>Reply</a>              </div>
393                                 </div>
394                 <ul class="children">
395                 <li class="comment even depth-2 parent" id="comment-51">
396                                 <div id="div-comment-51" class="comment-body">
397                                 <div class="comment-author vcard">
398                                                 <cite class="fn">admin</cite> <span class="says">says:</span>           </div>
399                 
400                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-51">
401                         February 22, 2013 at 19:54</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=51" title="Edit comment">(Edit)</a>          </div>
402
403                 <p>Your welcom.<br />
404 Send it!</p>
405
406                 <div class="reply">
407                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=51#respond' onclick='return addComment.moveForm("div-comment-51", "51", "respond", "34")'>Reply</a>              </div>
408                                 </div>
409                 <ul class="children">
410                 <li class="comment odd alt depth-3 parent" id="comment-54">
411                                 <div id="div-comment-54" class="comment-body">
412                                 <div class="comment-author vcard">
413                                                 <cite class="fn">Victor</cite> <span class="says">says:</span>          </div>
414                 
415                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-54">
416                         February 25, 2013 at 15:28</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=54" title="Edit comment">(Edit)</a>          </div>
417
418                 <p>Where to? Is there a github repo?</p>
419
420                 <div class="reply">
421                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=54#respond' onclick='return addComment.moveForm("div-comment-54", "54", "respond", "34")'>Reply</a>              </div>
422                                 </div>
423                 <ul class="children">
424                 <li class="comment even depth-4" id="comment-55">
425                                 <div id="div-comment-55" class="comment-body">
426                                 <div class="comment-author vcard">
427                                                 <cite class="fn">admin</cite> <span class="says">says:</span>           </div>
428                 
429                 <div class="comment-meta commentmetadata"><a href="http://juplo.de/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#comment-55">
430                         February 25, 2013 at 20:05</a>&nbsp;&nbsp;<a class="comment-edit-link" href="http://juplo.de/wp-admin/comment.php?action=editcomment&amp;c=55" title="Edit comment">(Edit)</a>          </div>
431
432                 <p>There is a private git-Repository.<br />
433 <a href="http://juplo.de/hibernate4-maven-plugin/source-repository.html"  rel="nofollow">Check the project-documentation!</a></p>
434 <p>You can <a href="http://juplo.de/hibernate4-maven-plugin/team-list.html"  rel="nofollow">send me</a> a patch or a pull-request to <a href="mailto:kai@juplo.de">kai@juplo.de</a></p>
435
436                 <div class="reply">
437                         <a class='comment-reply-link' href='/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/?replytocom=55#respond' onclick='return addComment.moveForm("div-comment-55", "55", "respond", "34")'>Reply</a>              </div>
438                                 </div>
439                 </li><!-- #comment-## -->
440 </ul><!-- .children -->
441 </li><!-- #comment-## -->
442 </ul><!-- .children -->
443 </li><!-- #comment-## -->
444 </ul><!-- .children -->
445 </li><!-- #comment-## -->
446         </ol>
447
448         <div class="navigation">
449                 <div class="alignleft"></div>
450                 <div class="alignright"></div>
451         </div>
452  
453
454 <div id="respond">
455
456 <h3>Leave a Reply</h3>
457
458 <div id="cancel-comment-reply">
459         <small><a rel="nofollow" id="cancel-comment-reply-link" href="/hibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations/#respond" style="display:none;">Click here to cancel reply.</a></small>
460 </div>
461
462
463 <form action="http://juplo.de/wp-comments-post.php" method="post" id="commentform">
464
465
466 <p>Logged in as <a href="http://juplo.de/wp-admin/profile.php">Kai Moritz</a>. <a href="http://juplo.de/wp-login.php?action=logout&amp;redirect_to=http%3A%2F%2Fjuplo.de%2Fhibernate4-maven-plugin-a-simple-plugin-for-generating-a-database-schema-from-hibernate-4-mapping-annotations%2F&amp;_wpnonce=09e5cb501d" title="Log out of this account">Log out &raquo;</a></p>
467
468
469 <!--<p><small><strong>XHTML:</strong> You can use these tags: <code>&lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; </code></small></p>-->
470
471 <p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>
472
473 <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
474 <input type='hidden' name='comment_post_ID' value='34' id='comment_post_ID' />
475 <input type='hidden' name='comment_parent' id='comment_parent' value='0' />
476 </p>
477 <input type="hidden" id="_wp_unfiltered_html_comment_disabled" name="_wp_unfiltered_html_comment_disabled" value="2cfe5768bb" /><script>(function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();</script>
478 <p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="18eb674233" /></p>
479 </form>
480
481 </div>
482
483         </div>
484               <div class="marginal">
485         <nav id="nav">
486           <hr />
487           <a id="navigation"></a>
488         </nav>
489         <div id="secondary" class="widget-area" role="complementary">
490                                 <aside id="archives" class="widget">
491               <h1 class="widget-title">Archives</h1>
492               <ul>
493                         <li><a href='http://juplo.de/2013/12/' title='December 2013'>December 2013</a></li>
494         <li><a href='http://juplo.de/2013/10/' title='October 2013'>October 2013</a></li>
495         <li><a href='http://juplo.de/2013/08/' title='August 2013'>August 2013</a></li>
496         <li><a href='http://juplo.de/2013/01/' title='January 2013'>January 2013</a></li>
497         <li><a href='http://juplo.de/2012/11/' title='November 2012'>November 2012</a></li>
498               </ul>
499             </aside>
500             <aside id="categories" class="widget">
501               <h1 class="widget-title">Most Used Categories</h1>
502               <ul>
503                         <li class="cat-item cat-item-4"><a href="http://juplo.de/category/java/" title="View all posts filed under Java">Java</a> (7)
504 </li>
505         <li class="cat-item cat-item-8"><a href="http://juplo.de/category/maven/" title="View all posts filed under Maven">Maven</a> (7)
506 </li>
507         <li class="cat-item cat-item-6"><a href="http://juplo.de/category/hibernate/" title="View all posts filed under Hibernate">Hibernate</a> (6)
508 </li>
509         <li class="cat-item cat-item-9"><a href="http://juplo.de/category/jpa/" title="View all posts filed under JPA">JPA</a> (1)
510 </li>
511         <li class="cat-item cat-item-10"><a href="http://juplo.de/category/appengine/" title="View all posts filed under appengine">appengine</a> (1)
512 </li>
513         <li class="cat-item cat-item-11"><a href="http://juplo.de/category/oauth2/" title="View all posts filed under oauth2">oauth2</a> (1)
514 </li>
515         <li class="cat-item cat-item-12"><a href="http://juplo.de/category/jetty/" title="View all posts filed under Jetty">Jetty</a> (1)
516 </li>
517         <li class="cat-item cat-item-13"><a href="http://juplo.de/category/wro4j/" title="View all posts filed under wro4j">wro4j</a> (1)
518 </li>
519         <li class="cat-item cat-item-14"><a href="http://juplo.de/category/less/" title="View all posts filed under less">less</a> (1)
520 </li>
521               </ul>
522             </aside>
523             <aside id="search" class="widget widget_search">
524               <h1 class="widget-title">Search</h1>
525               <form role="search" method="get" id="searchform" class="searchform" action="http://juplo.de/">
526                                 <div>
527                                         <label class="screen-reader-text" for="s">Search for:</label>
528                                         <input type="text" value="" name="s" id="s" />
529                                         <input type="submit" id="searchsubmit" value="Search" />
530                                 </div>
531                         </form>            </aside>
532                   </div><!-- #secondary .widget-area -->
533         <div id="tertiary" class="widget-area" role="supplementary">
534                   </div><!-- #tertiary .widget-area -->
535
536       </div>
537  
538       </div>
539     </div>
540           <footer id="footer">
541         <hr />
542         <ul id="footerlinks">
543           <li class="f" id="copyright">© <strong>mo</strong> 2013</li>
544         </ul>
545       </footer>
546     </div>
547   </body>
548 </html>
549