I'm using the xdoclet-maven-plugin to generate my hibernate mapping
files and I configured the plugin as follows :
<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="src" force="false"
excludedtags="@version,@author,@todo">
<fileset dir="src">
<include name="**/portal/**/*.java" />
<include name="**/reference/**/*.java" />
<include name="**/b2bassurance/**/*.java" />
</fileset>
<hibernate version="2.0"/>
</hibernatedoclet>
</tasks>
<generatedSourcesDirectory>target/classes</generatedSourcesDirectory>
</configuration>
<goals>
<goal>xdoclet</goal>
</goals>
</execution>
</executions>
</plugin>
However the generated hbm.xml are incorrect and they do not match what
I get when I used Ant to generate the same hbm.xml files.Eg for one of
my classes Person .java
Maven generate this :
===============
<hibernate-mapping
<class
name="za.co.telkom.portal.Person"
lazy="true"
>
and
Ant generates this :
<hibernate-mapping>
<class
name="za.co.telkom.portal.Person"
dynamic-update="false"
dynamic-insert="false"
>
The Ant one works at deployment time.The Ant task used is :
<target name="eportal-domain-xdoclet" >
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="portallib.classpath" />
</taskdef>
<hibernatedoclet verbose="false"
destdir="${ant.common.eportal.domain.dir}/src" force="false"
excludedtags="@version,@author,@todo">
<fileset dir="${ant.common.eportal.domain.dir}/src">
<include name="**/portal/**/*.java" />
<include name="**/reference/**/*.java" />
<include name="**/b2bassurance/**/*.java" />
</fileset>
<hibernate version="2.0" />
</hibernatedoclet>
<echo message="Regenerated Hibernate mapping files in
${basedir}\bin" level="info" />
</target>
I'm using the same xdoclet-1.2.1.jar
,xdoclet-hibernate-module-1.2.1.jar and
xdoclet-xdoclet-module-1.2.1.jar both in Ant and I've noticed that
Maven is using
xdoclet-hibernate-module-1.2.3.jar , which I suspect to be the src of
the inconsistency.How do I prevent Maven from using this
xdoclet-hibernate-module-1.2.3.jar?
Please help me , as I'm really stuck here.
--
"Don't take the name of root in vain."
Jeff Mutonho
Cape Town
South Africa
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]