Hello:

When I try to call project-sql-classpath from my build file, I 
get this error:

BUILD FAILED
file:C:/JavaLibs/db-ojb-1.0.rc4/build-torque.xml:435:
C:\Dev\OjbJdoTest\lib not
found.

Does this mean I have to copy all of the db-ojb libs into a lib
directory
in my project?  I tried to over-ride the torque.classpath by calling
the build-torque.xml file using this call:

  <target name="makeDbSchema" depends="enhancePersistentClasses">
    <ant dir="." antfile="${build-torque}"
target="project-sql-classpath">
      <property name="torque.classpath" value="${build-classpath}"/>
      <property name="schemaDirectory" value="build"/>
      <property name="outputDirectory" value="build"/>
    </ant>
  </target>

In case you need it, here is my complete build.xml file:

<project name="OjbJdoTest" default="makeRepository"
basedir="c:/Dev/OjbJdoTest">

  <property file="properties/build.properties"/>
  <property file="properties/mysql.profile"/>

  <property name="javalibs" location="c:/JavaLibs" />
  <property name="ojbDir" location="${javalibs}/db-ojb-1.0.rc4" />
  <property name="build-torque" location="${ojbDir}/build-torque.xml" />
  <property name="xdocletDir" location="${javalibs}/xdoclet-1.2b3" />
  <property name="jdoriDir" location="${javalibs}/jdori-1_0" />

  <path id="build-classpath">
    <fileset dir="${ojbDir}/lib">
      <include name="*.jar"/>
     </fileset> 
    <fileset dir="${xdocletDir}/lib">
      <include name="*.jar"/>
     </fileset> 
    <fileset dir="${jdoriDir}/src">
      <include name="*.jar"/>
     </fileset> 
  </path> 

  <target name="clean">
    <delete dir="build"/>
  </target>

  <target name="processOjbDoclets" depends="clean">
    <taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"
classpathref="build-classpath"/>
    <ojbdoclet destdir="build">
      <fileset dir="src">
        <include name="persistent/*.java"/>
       </fileset> 
      <ojbrepository destinationFile="repository_user.xml"/>
      <torqueschema databaseName="ojbJdoTest"
destinationFile="project_schema.xml"/>
    </ojbdoclet>
  </target> 

  <target name="processJdoDoclets" depends="processOjbDoclets">
    <taskdef name="jdodoclet"
classname="xdoclet.modules.jdo.JdoDocletTask"
classpathref="build-classpath"/>
    <jdodoclet destdir="build">
      <fileset dir="src">
        <include name="persistent/*.java"/>
      </fileset> 
      <jdometadata jdospec="1.0" generation="class"/>
    </jdodoclet>
  </target> 

  <target name="enhancePersistentClasses" depends="processJdoDoclets">
    <java fork="yes" failonerror="yes"
      classname="com.sun.jdori.enhancer.Main"
classpathref="build-classpath">
      <arg line="-v -f -d build/classes build/persistent/Name.jdo
classes/persistent/Name.class"/>
    </java>
    <java fork="yes" failonerror="yes"
      classname="com.sun.jdori.enhancer.Main"
classpathref="build-classpath">
      <arg line="-v -f -d build/classes build/persistent/Person.jdo
classes/persistent/Person.class"/>
    </java>
  </target> 

  <target name="makeDbSchema" depends="enhancePersistentClasses">
    <ant dir="." antfile="${build-torque}"
target="project-sql-classpath">
      <property name="torque.classpath" value="${build-classpath}"/>
      <property name="schemaDirectory" value="build"/>
      <property name="outputDirectory" value="build"/>
    </ant>
  </target>

  <target name="makeRepository" depends="makeDbSchema">
    <ant dir="." antfile="${build-torque}"
target="project-ojb-repository-classpath">
      <property name="torque.classpath" value="${build-classpath}"/>
      <property name="schemaDirectory" value="build"/>
      <property name="outputDirectory" value="build"/>
    </ant>
  </target>
  
</project>

Thanks,
        Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by 
17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com


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

Reply via email to