-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: XDoclet 2 with Hibernate 3 - no file generated
PostPosted: Thu Apr 17, 2008 3:53 pm 
Newbie

Joined: Thu Apr 17, 2008 3:46 pm
Posts: 5
Hi I'm using xDoclet 2 with HIbernate 3.

I'm trying to get a simple file generated based on http://www.hibernate.org/338.html.


Here is my class:

Code:
package com.abc.def.domain;

import java.io.Serializable;


/*
* @hibernate.class table = "country"
*/
public class Country implements Serializable {
static final long serialVersionUID = 5895819393L;

   private Integer id;
   private String name;

   /**
    * @return Returns the id.
    * @hibernate.id column="id" generator-class="identity"
    */
   public Integer getId() {
      return id;
   }
   /**
    * @param id The id to set.
    */
   public void setId(Integer id) {
      this.id = id;
   }
   /**
    * @return Returns the name.
    * @hibernate.property
    */
   public String getName() {
      return name;
   }
   /**
    * @param name The name to set.
    */
   public void setName(String name) {
      this.name = name;
   }
}


Here is my build.xml

Code:
<project name="hibernateXdoc" default="hibernatedoclet" basedir=".">

<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/bin"/>
<property name="hbm.dir" value="${basedir}/src/com/abc/def/domain"/>


   <target name="hibernatedoclet"
           description="Generate Persistence and form classes">
              
           <taskdef name="xdoclet"
                   classname="org.xdoclet.ant.XDocletTask">
                   <classpath>
                       <fileset dir="${basedir}">
                           <include name="*.jar"/>
                       </fileset>
                   </classpath>
               </taskdef>

           <xdoclet>
               <!-- defines the file handled by xdoclet2 -->
               <fileset dir="${src.dir}">
                   <include name="**/com/abc/def/domain/*.java"/>
               </fileset>
               <!-- defines the processing of a plugin -->
               <component
                   classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
                   destdir="${src.dir}"
                   version="3.0"
                   />
           </xdoclet>
       </target>

</project>


and here's my output when i run it:

Code:
Buildfile: C:\xxx\xxx\hibernateXdoc\build.xml
hibernatedoclet:
  [xdoclet] Running org.xdoclet.plugin.hibernate.HibernateMappingPlugin
BUILD SUCCESSFUL
Total time: 1 second


As you can see... there is no file generated. Am I missing something?

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 17, 2008 5:12 pm 
Newbie

Joined: Thu Apr 17, 2008 3:46 pm
Posts: 5
Ridiculous mistake:

Code:
/*
* @hibernate.class table = "country"
*/


to
Code:
/**
* @hibernate.class table = "country"
*/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.