[
http://jira.codehaus.org/browse/MOJO-466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216853#action_216853
]
Julien D commented on MOJO-466:
-------------------------------
According to the file hibernate-cfg.xdt inside
xdoclet-hibernate-module-1.2.3.jar, it looks that this field is indeed ignored.
A workaround is to use the "otherProperty" tag, which can generate any wanted
properties :
<hibernatedoclet destdir="src/main/resources">
<fileset includes="*/.java" dir="src/main/java"></fileset>
<hibernate version="3.0"></hibernate>
<hibernatecfg password="" showSql="true"
dialect="org.hibernate.dialect.HSQLDialect" jdbcurl="jdbc:hsql:." username="sa"
hbm2ddl="create-drop" driver="org.hsqldb.jdbcDriver"
version="3.0"></hibernatecfg>
<otherProperty name="hbm2ddl" value="create-drop"/>
</hibernatecfg>
</hibernatedoclet>
> hbm2ddl field ignored in xdoclet-maven-plugin ->hibernatedoclet> plugin
> -----------------------------------------------------------------------
>
> Key: MOJO-466
> URL: http://jira.codehaus.org/browse/MOJO-466
> Project: Mojo
> Issue Type: Bug
> Components: xdoclet
> Environment: mvn 2.0.4
> Win2K
> Jdk1.5
> org.codehaus.mojo:xdoclet-maven-plugin:1.0-alpha-2:xdoclet
> xdoclet:xdoclet-hibernate-module:jar:1.2.3
> Reporter: Thierry Barnier
>
> I configured the hibernate plugin as follow:
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>xdoclet-maven-plugin</artifactId>
> <executions>
> <execution>
> <id>hbm generation with xdoclet</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>xdoclet</goal>
> </goals>
> <configuration>
> <tasks>
> <hibernatedoclet destdir="src/main/resources">
> <fileset includes="**/*.java" dir="src/main/java"></fileset>
> <hibernate version="3.0"></hibernate>
> <hibernatecfg password="" showSql="true"
> dialect="org.hibernate.dialect.HSQLDialect" jdbcurl="jdbc:hsql:."
> username="sa" hbm2ddl="create-drop" driver="org.hsqldb.jdbcDriver"
> version="3.0"></hibernatecfg>
> </hibernatedoclet>
> </tasks>
>
> <generatedSourcesDirectory>src/main/resources</generatedSourcesDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
> please note the line
> <hibernatecfg ......hbm2ddl="create-drop" ......></hibernatecfg>
> The resulting hibernate.cfg.xml is missing a line
>
> <property name="hbm2ddl.auto">create-drop</property>
> like if the value is ignored...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email