Hi, Thomas:
This is the example I've cooked up previously and now
tested:
----- Super Class -----
package test;
/**
* Layer Super Type
*/
public abstract class BaseBO
{
/**
* @ojb.field column="n_id"
* primarykey="true"
*/
protected int id;
}
-----------------------
----- Sub Class -------
package test;
/**
*
* @ojb.class table="t_test"
*/
public class TestBO
extends BaseBO
{
/**
* @ojb.field column="v_name"
*/
protected String name;
}
----------------------
----- Build file -----
<?xml version="1.0" encoding="UTF-8"?>
<!--
-->
<project name="Test" default="repository-files"
basedir=".">
<property name="ojb.dir"
value="E:/Programming/db-ojb-1.0.rc3"/>
<property file="${ojb.dir}/build.properties"/>
<property
file="${ojb.dir}/profile/mysql.profile"/>
<path id="build-classpath">
<fileset dir="jar">
<include name="*.jar"/>
</fileset>
</path>
<!--
==================================================================
-->
<!-- DELETE OLD REPOSITORY FILES AND TORQUE SCHEMA
-->
<!--
==================================================================
-->
<target name="cleanup">
<delete file="conf/repository_user.xml"/>
<delete file="conf/project-schema.xml"/>
</target>
<!--
==================================================================
-->
<!-- GENERATE REPOSITORY FILES AND TORQUE SCHEMA
-->
<!--
==================================================================
-->
<target name="repository-files">
<taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"
classpathref="build-classpath"/>
<ojbdoclet destdir="conf">
<fileset dir="src">
<include name="test/*.java"/>
</fileset>
<ojbrepository
destinationFile="repository_user.xml"/>
<torqueschema databaseName="testdb"
destinationFile="project-schema.xml"/>
</ojbdoclet>
</target>
<!--
==================================================================
-->
<!-- GENERATE SQL
-->
<!--
==================================================================
-->
<!--target name="sql-files">
<ant dir="${ojb.dir}"
antfile="build-torque.xml"
target="project-sql-classpath">
<property name="torque.home"
value="${basedir}"/>
<property name="schemaDirectory"
value="conf"/>
<property name="outputDirectory"
value=""/>
</ant>
<ant dir="${ojb.dir}"
antfile="build-torque.xml"
target="project-doc-classpath">
<property name="torque.home"
value="${basedir}"/>
<property name="schemaDirectory"
value="conf"/>
<property name="outputDirectory"
value=""/>
</ant>
</target-->
<!--
==================================================================
-->
<!-- End of targets
-->
<!--
==================================================================
-->
</project>
------------------------
build.xml is in the project base directory, source
code is in the src directory, 3 xdoclet jars are in
the jar directory, generated files are put in the conf
directory.
--- Thomas Dudziak <[EMAIL PROTECTED]> wrote:
> I thought I had that working ... Could you supply an
> testable example
> (some classes) ?
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]