-->
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: rookie - problem with xdoclet 2 - ant doesnt work!!
PostPosted: Mon Mar 12, 2007 9:02 pm 
Newbie

Joined: Mon Mar 12, 2007 8:47 pm
Posts: 5
Hello guys

i have a problem with xdoclet to create the hbm.xml files related with the composite keys

after see in google it seems that the solution is xdoclet2

well after read the information, like
http://www.hibernate.org/284.html, i try do use the example configuration
and well
i used to work only with ant, and i have the
xdoclet-plugins-1.0.3.tar.gz, the last version since 2005

here my build.xml

Code:
<project name="manoloTest" basedir="." default="hibernate" >
   <property name="xdoclet2.lib.dir" value="${basedir}/MyLib/xdoclet2/lib"/>
       <target name="xdoclet2">
           <mkdir dir="${basedir}/target/xdoclet2/persistence"/>
           <path id="xdoclet2.task.classpath">
              <!-- Add the xdoclet2 plugins jar here -->
               <pathelement location="${xdoclet2.lib.dir}/../plugins/xdoclet-plugin-hibernate-1.0.jar"/>
              <!--    <pathelement location="${xdoclet2.lib.dir}/"/>            -->
              <pathelement location="${xdoclet2.lib.dir}/xdoclet-2.0.4.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/generama-1.2.1.jar"/>              
              <pathelement location="${xdoclet2.lib.dir}/nanocontainer-ant-1.0-beta-3.jar"/>              
              <pathelement location="${xdoclet2.lib.dir}/nanocontainer-1.0-beta-3.jar"/>              
              <pathelement location="${xdoclet2.lib.dir}/picocontainer-1.0.jar"/>              
              <pathelement location="${xdoclet2.lib.dir}/qdox-20051211.114207.jar"/>              
              <pathelement location="${xdoclet2.lib.dir}/velocity-1.4.jar"/>              
              <pathelement location="${xdoclet2.lib.dir}/commons-jelly-20050813.225330.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/commons-jelly-tags-define-1.0.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/commons-jelly-tags-jsl-1.0.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/commons-jelly-tags-xml-20050823.222913.jar"/>
              
              <pathelement location="${xdoclet2.lib.dir}/commons-beanutils-1.7.0.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/commons-collections-3.1.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/commons-jexl-1.0.jar"/>
                <pathelement location="${xdoclet2.lib.dir}/commons-logging-1.0.4.jar"/>
              
            <pathelement location="${xdoclet2.lib.dir}/dom4j-1.6.jar"/>
            <pathelement location="${xdoclet2.lib.dir}/jaxen-1.1-beta-4.jar"/>
          <pathelement location="${xdoclet2.lib.dir}/saxpath-1.0-FCS.jar"/>
              <pathelement location="${xdoclet2.lib.dir}/xerces-2.4.0.jar"/>
              
           </path>

           <taskdef  name="xdoclet2"  classname="org.xdoclet.ant.XDocletTask"
                    classpathref="xdoclet2.task.classpath"  />
       </target>
       <target name="hibernate" depends="xdoclet2">
           <xdoclet2>
               <!-- defines the file handled by xdoclet2 -->
               <fileset dir="${basedir}/src">
                   <include name="**/*.java"/>
               </fileset>

               <!-- defines the processing of a plugin -->
               <component
                   classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
                   destdir="${basedir}/src"
                   version="3.0"
                   />
           </xdoclet2>
       </target>   
</project>


if i excute ant hibernate , i recieve this error

Code:
/WEB-INF/build.xml:37: Class Not Found: Classloader URLs (classpath):

well the line is <xdoclet2>

what is wrong?? , i have references to the all 19 jar files of the lib distribution and the plugin for hibernate

pls help, my boss have a gun and i need resolve this problem

thanks so much for advanced


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 2:20 pm 
Newbie

Joined: Tue Apr 01, 2008 12:30 pm
Posts: 12
I've been using XDoclet2 1.0.3 with the following Ant script under Eclipse. I'm having problems, but not with running XDoclet2.
Code:
<project name="xdoclet2.usage" default="all" basedir="F:/work/eclipse-3.1.2-workspace/com-msobkow-admobile-1-0-1" >
   <property name="xdoclet.plugin.install.dir"
      value="D:/win32app/eclipse-3.1.2/eclipse/plugins/xdoclet-plugins-1.0.3"/>
   <property name="hbm.dir"
      value="${basedir}/bin"/>
   <path id="xdoclet.task.classpath">
      <!-- xdoclet2 runtime dependencies -->
      <fileset dir="${xdoclet.plugin.install.dir}/lib">
         <include name="**/*.jar"/>
      </fileset>
      <fileset dir="${xdoclet.plugin.install.dir}/plugins">
         <include name="**/*.jar"/>
      </fileset>
   </path>

   <!-- Define xdoclet task -->
   <taskdef
      name="xdoclet" classname="org.xdoclet.ant.XDocletTask"
      classpathref="xdoclet.task.classpath"
      />

   <target name="all" depends="hibernatedoclet.bean,hibernatedoclet.pkey">
   </target>
      
   <target name="hibernatedoclet.pkey" description="Generate Persistence Classes">
      <xdoclet>       
         <fileset dir="${basedir}/src">
            <include name="com/msobkow/admobile/advdb/rec/*PKeyBean.java"/>
         </fileset>        
         <component
            classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
            version="3.0"
            destdir="${hbm.dir}" />
      </xdoclet>
   </target>

   <target name="hibernatedoclet.bean" description="Generate Persistence Classes">
      <xdoclet>       
         <fileset dir="${basedir}/src">
            <include name="com/msobkow/admobile/advdb/rec/*Bean.java"/>
            <exclude name="**/*DbIOBean.java" />
            <exclude name="**/*PKeyBean.java" />
         </fileset>        
         <component
            classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
            version="3.0"
            destdir="${hbm.dir}" />
      </xdoclet>
   </target>
</project>


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.