[ rubbish-db ]

ActiveRecord?はDBの情報を元にAntで生成する。

build.xml

<project name="activerecord" default="create.activerecord" basedir=".">
  <description>$Id: build.xml,v 1.1 2006/07/15 05:28:05 sugawara Exp $</description>

  <property name="jdbc.url" value="jdbc:hsqldb:hsql://localhost" />
  <property name="jdbc.user" value="sa" />
  <property name="jdbc.password" value="" />
  <property name="jdbc.driver.classpath" value="${basedir}/../../hsqldb/lib/hsqldb.jar" />
  <property name="schema" value="PUBLIC" />
  <property name="dest.dir" value="C:/eclipse/workspace/rubbish-db/sample/activerecord/src" />

  <property name="rubbish-db.jar" value="${basedir}/../../rubbish-db.jar" />
  <taskdef name="vogen" classname="rubbish.db.gen.ant.VOGenTask" classpath="${rubbish-db.jar}" />

  <target name="create.activerecord">
    <vogen type="activerecord" url="${jdbc.url}" userid="${jdbc.user}" password="${jdbc.password}"
           classpath="${jdbc.driver.classpath}" destdir="${dest.dir}"
           package="sample.activerecord.bean" schema="${schema}" />
  </target>
</project>