ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Turkenkopf" <dturk...@gmail.com>
Subject Building an Ibator Plugin
Date Mon, 13 Oct 2008 15:30:43 GMT
I'm trying to build my first Ibator plugin against the Ibator SVN source,
but when I run Ibator from the ant task, it can't find the
IbatorPluginAdapter class.

I've tried adding the ibator.jar as a classpath entry in the
ibatorConfiguration, but then I run into incompatible classes.

I'm sure it's a pretty straightforward fix, but I'm not sure what I'm doing

Thanks for the help,
Dan Turkenkopf

My build.xml looks like this:

 <project default="genfiles" basedir=".">
     <property name="generated.source.dir" value="${basedir}\output" />

     <target name="compile">
       <javac srcdir="${basedir}\src" destdir="${basedir}\bin"

     <target name="jar" depends="compile">
       <jar destfile="${basedir}\plugin.jar" basedir="${basedir}\bin"/>

     <target name="genfiles" depends="jar" description="Generate the files">
       <taskdef name="ibator"
                classpath="ibator.jar" />
       <ibator overwrite="true" configfile="ibator-config.xml"
verbose="false" >
           <propertyref name="generated.source.dir"/>

And my ibator-config.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ibatorConfiguration
  PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS ibator
Configuration 1.0//EN"

  <classPathEntry location="mysql-connector-java-5.0.4-bin.jar" />
  <classPathEntry location="plugin.jar" />

  <ibatorContext id="TestPlugin">
    <ibatorPlugin type="gov.nyhealth.apps.vms.ibator.plugins.SetPlugin" />

    <jdbcConnection driverClass="com.mysql.jdbc.Driver"

    <javaModelGenerator targetPackage="test.model" targetProject="src">
      <property name="enableSubPackages" value="true" />
      <property name="trimStrings" value="true" />

    <sqlMapGenerator targetPackage="test.xml"  targetProject="src">
      <property name="enableSubPackages" value="true" />

    <daoGenerator type="SPRING" targetPackage="test.dao"
      <property name="enableSubPackages" value="true" />

    <table schema="SCHEMA_NAME" tableName="TABLE_NAME" >
      <property name="KeyName" value="KEY_COLUMN" />
      <property name="SetKeyName" value="SET_KEY_COLUMN" />
      <columnOverride column="COLUMN" property="overiddenColumn" />


View raw message