On 04/06/2007, at 9:43 PM, Jeff Mutonho wrote:

On 6/4/07, Stephen Coy <[EMAIL PROTECTED]> wrote:
Jeff,


Are you really still using Hibernate 2.0?


100%.I've searched my repository and the only hibernate jar present is
hibernate-2.0.0.jar

Sorry, that was kind of a rhetorical question.

Anyway, I would not mind betting that your bean has been marked up with something like:

@hibernate.class
        lazy="true"

because that is the only way that this

>    <class
>        name="za.co.telkom.portal.Person"
>        lazy="true"
>    >

would have been generated. xdoclet 1.2.1 does not support this attribute.

Also xdoclet 1.2.1 always generates

>        dynamic-update="false"
>        dynamic-insert="false"

xdoclet 1.2.3 only generates this markup if the corresponding java class has been marked up as well. Note that "false" is the default value and the fact that these values are missing from your maven build has the same meaning as far as Hibernate is concerned.

Are you worried about the markup differences or something else?

I just happen to have the source code for both versions of xdoclet on hand, and I know more or less how it works. So it's not too hard for me to explain any differences that you're experiencing.

Steve Coy




Cheers,

Steve Coy


On 04/06/2007, at 8:18 PM, Jeff Mutonho wrote:

> 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]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--

"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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to