To simplify the work with the Signsoft intelliBO tools, Signsoft intelliBO provides special Ant Tasks. So you can use an Ant script for calling this tools. You may find detailed information about this tasks in section Apache Ant Tasks for Signsoft intelliBO Tools.
The Signsoft intelliBO samples (see /samples) are using such an Ant script build.xml. This may serve as an example to build your own Ant script.
A simplified version of the Ant Script for the use of this first steps sample could look like this (here we assume, that an IBO_HOME system property is set and the H2 database and driver provided by intelliBO is used):
<project name="intelliBO sample" default="all" basedir="." xmlns:ibo="http://www.signsoft.com/intellibo">
<!-- get properties from system environment and property files -->
<target name="init">
<property environment="env" />
<property name="ibo.home" value="${env.IBO_HOME}"/>
<property name="ibo.homedir" location="${ibo.home}" />
<echo message="intelliBO directory: ${ibo.homedir}" />
<!-- intelliBO libraries -->
<path id="ibo.classpath">
<pathelement location="${ibo.homedir}/lib" />
<fileset dir="${ibo.homedir}/lib" includes="*.jar" />
</path>
<!-- add here additional libraries required by the build script -->
<path id="build.classpath">
<path refid="ibo.classpath" />
</path>
<!-- class path for running the sql-related target -->
<path id="jdbc.classpath">
<fileset dir="${ibo.home}/thirdparty/h2/lib" includes="h2.jar" />
</path>
<!-- intelliBO tools task definitions -->
<taskdef uri="http://www.signsoft.com/intellibo"
resource="com/signsoft/ibo/anttasks/antlib.xml"
classpathref="ibo.classpath" />
</target>
<!-- get database configuration properties-->
<target name="configuration" depends="init">
<ibo:dbconfig id="db.config"
driverclassname="org.h2.Driver"
connectionurl="jdbc:h2:database/data;LOCK_MODE=3"
user=""
password=""
databasesupportclassname="com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo"
databasesupportrules="/dbsupport_h2.xml"
/>
</target>
<!-- verify jdo metadata -->
<target name="verify" depends="configuration">
<ibo:verifier source="${basedir}/build/java_do" testdb="false" />
</target>
<!-- enhance the business classes -->
<target name="enhancer" depends="configuration">
<ibo:enhancer source="${basedir}/build/java_do"
destination="${basedir}/build/enhanced_do"
testpc="false" />
</target>
<!-- run schemagen, which creates SQL-scripts for database -->
<target name="schemagen" depends="configuration">
<ibo:schemagen source="${basedir}/build/java_do"
destination="${basedir}/sql"
dbconfigref="db.config">
<classpath refid="jdbc.classpath" />
</ibo:schemagen>
</target>
<!-- execute create scripts in database -->
<target name="createdatabase" depends="configuration" description="set up database schema">
<ibo:sqlrunner dbconfigref="db.config" classpathref="jdbc.classpath">
<fileset dir="${basedir}/sql" includes="drop.sql" />
<fileset dir="${basedir}/sql" includes="create.sql" />
</ibo:sqlrunner>
</target>
<target name="all" depends="verify, enhancer, schemagen, createdatabase"/>
</project>
Please note: The configuration of the database settings used by the "schemagen" task is made by the means of the <ibo:dbconfig> element. You may find more information about this Signsoft intelliBO Ant type in chapter "Apache Ant Tasks for Signsoft intelliBO tools". Please ensure that the settings you made here correspond to the resource settings in your ibo-config.xml.
To control the verbose output level of the tools, you can use the general settings of an Ant script, calling something like:
ant -verbose