Hello:
When I try to generate the MySQL schema for a simple test app,
I get this error in the Velocity log:
2003-09-19 15:45:34,174 - Method load threw exception for reference
$properties in template sql/base/Control.vm at [2,19]
Here is the target I am using to do it:
<target name="makeDbSchema" depends="enhancePersistentClasses">
<ant dir="." antfile="${build-torque}"
target="project-sql-classpath">
<property name="schemaDirectory" value="build"/>
<property name="outputDirectory" value="build"/>
</ant>
</target>
Here is my complete buildfile:
<project name="OjbJdoTest" default="removeExtraneous"
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" />
<property name="build-torque" location="${ojbDir}/build-torque.xml" />
<property name="xdocletDir" location="${javalibs}/xdoclet-1.2b3" />
<property name="ojbDocletJar"
location="${javalibs}/db-ojb-1.0.rc4/lib/xdoclet-ojb-module-1.2b3-dev.ja
r" />
<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>
<pathelement location="${ojbDocletJar}" />
</path>
<target name="clean">
<delete dir="build"/>
</target>
<target name="prepare" depends="clean">
<mkdir dir="lib"/>
<copy todir="lib">
<fileset dir="${ojbDir}/lib"/>
</copy>
</target>
<target name="processOjbDoclets" depends="prepare">
<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">
<pathconvert property="enhancerFiles" pathsep=" ">
<path id="enhancerFiles">
<fileset dir="classes">
<include name="persistent/*.class"/>
</fileset>
<fileset dir="build">
<include name="persistent/*.jdo"/>
</fileset>
</path>
</pathconvert>
<java fork="yes" failonerror="yes"
classname="com.sun.jdori.enhancer.Main"
classpathref="build-classpath">
<arg line="-v -f -d build/classes ${enhancerFiles}" />
</java>
</target>
<target name="makeDbSchema" depends="enhancePersistentClasses">
<ant dir="." antfile="${build-torque}"
target="project-sql-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="schemaDirectory" value="build"/>
<property name="outputDirectory" value="build"/>
</ant>
</target>
<target name="removeExtraneous" depends="makeRepository">
<delete dir="lib"/>
</target>
</project>
Any ideas?
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]