You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeff Mutonho <ej...@gmail.com> on 2006/07/06 15:51:42 UTC
Regenerate hibernate mapping files
I wish to regenerate hibernate(version 2.0) mapping files in my
project and currently am using Ant to do so.Can I achieve the same
with the hibernate3-maven-plugin ?
Here's the ant task :
<!-- regenerate the hibernate mapping files -->
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="portallib.classpath" />
</taskdef>
<hibernatedoclet destdir="${ant.common.eportal.services.dir}/src"
force="false" excludedtags="@version,@author,@todo">
<fileset dir="${ant.common.eportal.services.dir}/src">
<include name="**/portal/**/*.java" />
<include name="**/reference/**/*.java" />
</fileset>
<hibernate version="2.0" />
</hibernatedoclet>
<echo message="Regenerated Hibernate mapping files in
${basedir}\bin" level="info" />
--
Jeff Mutonho
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Regenerate hibernate mapping files
Posted by Jeff Mutonho <ej...@gmail.com>.
On 7/6/06, Johann Reyes <jr...@hiberforum.org> wrote:
> Hello Jeff
>
> Actually you are using Xdoclet to generate your hibernate mapping files. The
> hibernate3-maven-plugin is not based on Xdoclet; it's based on
> hibernate-tools which you can find more info here:
> http://tools.hibernate.org/
>
> Regards
>
> Johann Reyes
>
> -----Original Message-----
> From: Jeff Mutonho [mailto:ejbengine@gmail.com]
> Sent: Thursday, July 06, 2006 9:52 AM
> To: Maven Users List
> Subject: Regenerate hibernate mapping files
>
> I wish to regenerate hibernate(version 2.0) mapping files in my
> project and currently am using Ant to do so.Can I achieve the same
> with the hibernate3-maven-plugin ?
> Here's the ant task :
>
> <!-- regenerate the hibernate mapping files -->
> <taskdef name="hibernatedoclet"
> classname="xdoclet.modules.hibernate.HibernateDocletTask">
> <classpath refid="portallib.classpath" />
> </taskdef>
> <hibernatedoclet
> destdir="${ant.common.eportal.services.dir}/src"
> force="false" excludedtags="@version,@author,@todo">
> <fileset
> dir="${ant.common.eportal.services.dir}/src">
> <include name="**/portal/**/*.java" />
> <include name="**/reference/**/*.java" />
> </fileset>
> <hibernate version="2.0" />
> </hibernatedoclet>
> <echo message="Regenerated Hibernate mapping files in
> ${basedir}\bin" level="info" />
> --
>
>
Thanks.Worked out of the box :)
Jeff Mutonho
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Regenerate hibernate mapping files
Posted by ol...@smals-mvm.be.
I just do it with this configuration in my pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<id>hbm generation with xdoclet</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<hibernatedoclet destdir="target/classes">
<fileset dir="src/main/java" includes="**/*.java" />
<hibernate version="3.0" />
<hibernatecfg version="3.0" dialect=
"org.hibernate.dialect.MySQLDialect" driver="com.mysql.jdbc.Driver" jdbcurl
="jdbc:mysql://spirou.smals-mvm.be/spitools_prod" username="dummy" password
="dummy" showSql="true" />
</hibernatedoclet>
</tasks>
<generatedSourcesDirectory>target/classes</
generatedSourcesDirectory>
</configuration>
<goals>
<goal>xdoclet</goal>
</goals>
</execution>
</executions>
</plugin>
-------------------------------------
I wish to regenerate hibernate(version 2.0) mapping files in my
project and currently am using Ant to do so.Can I achieve the same
with the hibernate3-maven-plugin ?
Here's the ant task :
<!-- regenerate the hibernate mapping files -->
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="portallib.classpath"
/>
</taskdef>
<hibernatedoclet
destdir="${ant.common.eportal.services.dir}/src"
force="false" excludedtags="@version,@author,@todo">
<fileset
dir="${ant.common.eportal.services.dir}/src">
<include
name="**/portal/**/*.java" />
<include
name="**/reference/**/*.java" />
</fileset>
<hibernate version="2.0" />
</hibernatedoclet>
<echo message="Regenerated Hibernate mapping files
in
${basedir}\bin" level="info" />
--
Jeff Mutonho
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Regenerate hibernate mapping files
Posted by Johann Reyes <jr...@hiberforum.org>.
Hello Jeff
Actually you are using Xdoclet to generate your hibernate mapping files. The
hibernate3-maven-plugin is not based on Xdoclet; it's based on
hibernate-tools which you can find more info here:
http://tools.hibernate.org/
Regards
Johann Reyes
-----Original Message-----
From: Jeff Mutonho [mailto:ejbengine@gmail.com]
Sent: Thursday, July 06, 2006 9:52 AM
To: Maven Users List
Subject: Regenerate hibernate mapping files
I wish to regenerate hibernate(version 2.0) mapping files in my
project and currently am using Ant to do so.Can I achieve the same
with the hibernate3-maven-plugin ?
Here's the ant task :
<!-- regenerate the hibernate mapping files -->
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="portallib.classpath" />
</taskdef>
<hibernatedoclet
destdir="${ant.common.eportal.services.dir}/src"
force="false" excludedtags="@version,@author,@todo">
<fileset
dir="${ant.common.eportal.services.dir}/src">
<include name="**/portal/**/*.java" />
<include name="**/reference/**/*.java" />
</fileset>
<hibernate version="2.0" />
</hibernatedoclet>
<echo message="Regenerated Hibernate mapping files in
${basedir}\bin" level="info" />
--
Jeff Mutonho
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org