Here's a macrodef
<macrodef name="macro.dbunit-update">
<attribute name="databaseDriver" />
<attribute name="databaseUrl" />
<attribute name="databaseUsername" />
<attribute name="databasePassword" />
<attribute name="datatypeFactory" />
<attribute name="operation" />
<attribute name="srcDir" />
<attribute name="filename" />
<attribute name="file-extension" />
<attribute name="format" />
<!-- <element name="options" optional="true" /> -->
<sequential>
<echo message="------ MACRO macro.dbunit-update
-----------" />
<dbunit driver="${databaseDriver}" url="${databaseUrl}"
userid="${databaseUsername}" password="${databasePassword}"
datatypeFactory="${datatypeFactory}">
<classpath refid="dbunit.classpath"/>
<operation type="${operation}"
src="${srcDir}/[EMAIL PROTECTED]" format="@{format}"/>
</dbunit>
</sequential>
</macrodef>
Here's invoking it
<target name="dbunit-update-XML" depends="int.echo-properties"
description="Refreshes DB using data from XML file">
<macro.dbunit-update databasedriver="${databaseDriver}"
databasepassword="${databasepassword}"
databaseurl="${databaseurl}"
databaseusername="${databaseusername}"
datatypefactory="${datatypefactory}"
file-extension="xml"
filename="${filename}"
format="flat"
operation="${operation}"
srcdir="${srddir}">
</macro.dbunit-update>
</target>
On 20/06/06, cristal <[EMAIL PROTECTED]> wrote:
Thanks Pete, that sounds very promising. Could you also post a piece of
sample code? Thanks a lot.
--
View this message in context:
http://www.nabble.com/-m2--problem-w--antcall-in-ANT-based-mojo-t1307160.html#a4956130
Sent from the Maven - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]