You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by LAY Oro <la...@yahoo.com> on 2003/07/25 06:30:17 UTC
ojb module does nothing??
Deare all!
i just use a ojb xdoclet module for the first time.
It takes me already 10 days to generate "reposotory-user .xml" and "project-schema.xml" but it still doesn't work
In fact ojb module seem to work correctly but it just create an empty file repository-user.xml and projet-schema.xml (just a few comment lign inside the file).
Here is build.xml.
<?xml version="1.0" encoding="UTF-8"?>
<!--
-->
<project name="Test" default="repository-files" basedir=".">
<property name="ojb.dir" value="C:/eclipse2.1/workspace/db-ojb"/>
<property file="${ojb.dir}/build.properties"/>
<property file="${ojb.dir}/profile/mysql.profile"/>
<path id="build-classpath">
<fileset dir="lib">
<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/repos">
<fileset dir="${ojb.dir}">
<include name="target/test/test/*.java"/>
</fileset>
<ojbrepository destinationFile="repository_user.xml"/>
<torqueschema databaseName="test" 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="conf/output"/>
</ant>
</target>
<!--==================================================================-->
<!-- GENERATE DATABASE -->
<!--==================================================================-->
</project>
in the /lib directory i have many file *.jar needed by the application and three xdoclet*.jar(xdoclet-1.2b3.jar, xdoclet-ojb-module-1.2b3-dev.jar, xdoclet-xdoclet-module-1.2b3.jar) and xjavadoc-1.0.jar
My classes:
/**
* Layer super type
*/
public abstract class BaseBO
{
/**
* @ojb.field column="n_id"
*/
protected int id;
}
/**
* Concrete class
* @ojb.class table="t_test"
*/
public class TestBO
extends BaseBO
{
/**
* @ojb.field column="v_name"
*/
protected String name;
}
Your help is appreciated!!
thanks a lot!
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software