Hello,
I have been successful in getting this plugin to generate hbm files,
pojos and daos. I have NOT been successful in getting them customized
to my liking. I'm kind of confused in how to control the plugins
behavior. It seems that the only output I get is the default output,
regardless of what I put in my pom. To be more specific, inside the
freemarker file(hibernate-mapping.hbm.ftl) there is a line that reads:
<#if hmgs?exists && hmgs.hasNonDefaultSettings()>
How do I make sure hmgs exists and how do I set it's properties? I am
sure I am missing some fundamental concepts but wow, the documentation
on this project is scarce. I have been all over the hibernate reference
and have done my best to leverage the little documentation on the mojo
site regarding this plugin but I'm stuck. The hardest part is
understanding what gets set by defaultin the jdbconfiguration
implementation and what can be set from the pom and how that is done.
Here's my POM's plugin section:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2-SNAPSHOT</version>
<configuration>
<components>
<component>
<name>hbm2hbmxml</name>
<implementation>jdbcconfiguration</implementation>
<jdbcconfiguration />
</component>
</components>
<componentProperties>
<drop>true</drop>
<jdk5>true</jdk5>
<ejb3>false</ejb3>
<templateprefix>src/main/config/templates/</templateprefix>
<configurationfile>src/main/resources/hibernate.cfg.xml</configurationfile>
</componentProperties>
</configuration>
<executions>
<execution>
<id>HBMGen</id>
<phase>generate-resources</phase>
<goals>
<goal>hbm2hbmxml</goal>
</goals>
<configuration>
<componentProperties>
<outputDirectory>src/main/resources</outputDirectory>
<filepattern>src/main/resources/{class-name}.hbm.xml</filepattern>
<template>hbm/hibernate-mapping.hbm.ftl</template>
</componentProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Anyone out there that can shed some light?
Thanks!
Larry
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email