Friday, January 8, 2010

Using the sysconsole tool with ant

You can easily call all IPP-sysconsole commands as an ant script. For example drop/create the IPP schema:

<path id="infinity.tools.sysconsole.path">
<fileset dir="${local.dir.lib}" includes="*" />
<pathelement location="${jboss.home}/client/jbossall-client.jar" />
<pathelement location="${jboss.home}/client/log4j.jar" />
</path>
<target name="infinity-drop-schema" description="Drop Schema">
<java classname="ag.carnot.workflow.tools.sysconsole.Main"
classpathref="infinity.tools.sysconsole.path" fork="true">
<arg line="-f -dbtype ORACLE9i -dbdriver oracle.jdbc.driver.OracleDriver
-dburl ${audittrail.database.url} -dbuser ${audittrail.database.username}
-dbpassword ${audittrail.database.password} -password sysop dropschema" />
</java>
</target>
<target name="infinity-create-schema" description="Create Schema">
<java classname="ag.carnot.workflow.tools.sysconsole.Main"
classpathref="infinity.tools.sysconsole.path" fork="true">
<arg line="-f -dbtype ORACLE9i -dbdriver oracle.jdbc.driver.OracleDriver
-dburl ${audittrail.database.url} -dbuser ${audittrail.database.username}
-dbpassword ${audittrail.database.password} createschema" />
</java>
</target>

No comments:

Post a Comment