Running Calabash as an Ant task

Hi there

The Calabash documentation suggests that it is possible to run Calabash as an Ant task. However, I am struggling to get this to work, and wonder if anyone could provide some pointers.

I have added the relevant Calabash namespace and typedef declarations in my Ant script, as described in

http://xmlcalabash.com/docs/reference/antsetup.html

and I have added calabash.jar to my %ANT_HOME%/lib directory, but Ant is unable to resolve the 'calabash' task name. My Ant script contains

<target name="build">
<c:calabash in="${source.dir}/${source-lang}/${source-lang}.xml" out="${conversion.dir}/${source-lang}/${source-lang}.xml" pipeline="${xproc..dir}/demo.xpl">
                                <parameter name="source-lang" value="${source-lang}" />
                </c:calabash>
</target>

I am using the latest version of Calabash, 1.0.16-95.

I get the following errors:

[typedef] Could not load definitions from resource com/xmlcalabash/antlib..xml. It could not be found.

Problem: failed to create task or type antlib:com.xmlcalabash:calabash
Cause: the name is undefined

Which doesn't surprise me as calabash.jar does not contain an antlib.xml file in com/xmlcalabash. The Calabash documentation suggests that the typedef should contain  ' resource="com/xmlcalabash/antlib.xml" '

I find it a bit unusual that just putting calabash.jar into ant/lib is sufficient. I would have expected there to be a separate jar for the ant Calabash Ant task, but then I don't know much about Ant!

Any help or pointers much appreciated.

Cheers


Phil

Phil Gooch
Senior Language Technologist
Language Technology Group
Global Academic Business, Dictionaries
Oxford University Press | Great Clarendon Street | Oxford OX2 6DP

E: phil.gooch@oup.com
T: +44 (0)1865 354987
M: +44 (0)7876 881998


Oxford University Press (UK) Disclaimer

This message is confidential. You should not copy it or disclose its contents to anyone. You may use and apply the information for the intended purpose only. OUP does not accept legal responsibility for the contents of this message. Any views or opinions presented are those of the author only and not of OUP. If this email has come to you in error, please delete it, along with any attachments. Please note that OUP may intercept incoming and outgoing email communications.

Received on Thursday, 27 March 2014 12:20:56 UTC