abhijitmhaske wrote:
Problem is solved I missed to check on
Reverse engineer from JDBC Connection on main tab without reveng.xml.
But when I provide reveng.xml ....no code or mapping are generated....
Can anyone tell me how to do this in the maven pom?
I'm trying to run hbm2doc from my pom and am getting an error. Error and pom snippet below:
Code:
2011-03-25 10:24:40,129:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/doc-style.css[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,129:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/doc-style.css[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate-tools-3
.2.0.ga.jar!/doc/doc-style.css
2011-03-25 10:24:40,254:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/index.html[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,254:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/index.html[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate-tools-3.2.
0.ga.jar!/doc/index.html
2011-03-25 10:24:40,270:INFO:main:org.hibernate.tool.hbm2x.DocExporter:Skipping entitygraph creation since dot.executable is empty or not-specified.
2011-03-25 10:24:40,270:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/tables/index.ftl[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,286:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/tables/index.ftl[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate-tool
s-3.2.0.ga.jar!/doc/tables/index.ftl
2011-03-25 10:24:40,301:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/tables/summary.ftl[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,301:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/tables/summary.ftl[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate-to
ols-3.2.0.ga.jar!/doc/tables/summary.ftl
2011-03-25 10:24:40,317:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/common.ftl[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,317:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/common.ftl[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate-tools-3.2.
0.ga.jar!/doc/common.ftl
2011-03-25 10:24:40,348:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/tables/schema-list.ftl[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,364:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/tables/schema-list.ftl[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernat
e-tools-3.2.0.ga.jar!/doc/tables/schema-list.ftl
2011-03-25 10:24:40,379:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/tables/table-list.ftl[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,379:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/tables/table-list.ftl[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate
-tools-3.2.0.ga.jar!/doc/tables/table-list.ftl
2011-03-25 10:24:40,395:DEBUG:main:freemarker.cache:Could not find template in cache, creating new one; id=[doc/entities/index.ftl[en_IE,Cp1252,parsed] ]
2011-03-25 10:24:40,395:DEBUG:main:freemarker.cache:Compiling FreeMarker template doc/entities/index.ftl[en_IE,Cp1252,parsed] from jar:file:/C:/.m2/org/hibernate/hibernate-tools/3.2.0.ga/hibernate-to
ols-3.2.0.ga.jar!/doc/entities/index.ftl
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.203s
[INFO] Finished at: Fri Mar 25 10:24:40 GMT 2011
[INFO] Final Memory: 9M/495M
2011-03-25 10:24:40,489:INFO:Finalizer:org.hibernate.connection.DriverManagerConnectionProvider:cleaning up connection pool: jdbc:mysql://localhost:3306/ads
[INFO] ------------------------------------------------------------------------
2011-03-25 10:24:40,489:INFO:Finalizer:org.hibernate.connection.DriverManagerConnectionProvider:cleaning up connection pool: jdbc:mysql://localhost:3306/ads
[ERROR] Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.1:hbm2doc (hbm2doc) on project application: Execution hbm2doc of goal org.codehaus.mojo:hibernate3-maven-plugin:2.1:hbm2doc f
ailed: Index: 0, Size: 0 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Quote:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>hbm2doc</id>
<phase>install</phase>
<goals>
<goal>hbm2doc</goal>
</goals>
</execution>
</executions>
<configuration>
<components>
<component>
<name>hbm2doc</name>
<implementation>annotationconfiguration</implementation>
<outputDirectory>target/htmlDocs/test</outputDirectory>
</component>
</components>
<componentProperties>
<configurationfile>src/main/resources/hibernate.cfg.xml</configurationfile>
<revengfile>src/main/resources/hibernate.reveng.xml</revengfile>
<jdk5>true</jdk5>
</componentProperties>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<type>jar</type>
<version>5.0.8</version>
</dependency>
</dependencies>
</plugin>