![]() | ![]() |
Apache > Jakarta > Cactus > Running Tests > Ant | Docs for: v1.7.2 | v1.7 Last update: August 30 2007 |
CactifyEar TaskThe task cactifyear allows the enhancement of an existing enterprise-application archive (EAR) with the elements needed to run Cactus in-container tests. This includes adding a web application that contains the deployed Cactus redirectors. The cactifyear task extends the built-in Ant task ear, so it also supports all attributes and nested elements that ear supports. Parameters
Nested ElementscactuswarThe cactuswar element configures everything that has to do with the cactus web application that will end up in the ear. This element has all the parameters of the cactifywar task except the destfile parameter. The web application will always be named cactus.war and be placed in the root of the ear. Parameters
ExamplesThe following example demonstrates the simplest-possible use of the task. It will add a web application named cactus.war under the context /cactus. The web application will contain the redirectors necessary for cactus to work. <cactifyear srcfile="${build.dir}/my.ear" destfile="${build.dir}/cactified.ear"/> The next example demonstrates how to set the context for the web application. <cactifyear srcfile="${build.dir}/my.ear" destfile="${build.dir}/cactified.ear"> <cactuswar context="/myTestFramework" version="2.3"/> </cactifyear> In the following example, we use an existing war by cactify it and add it to the ear. <cactifyear srcfile="${build.dir}/my.ear" destfile="${build.dir}/cactified.ear"> <cactuswar srcfile="mytest.war"/> </cactifyear> As mentioned previously all parameters of the tasks cactifywar and war can be used. The only exception to this is destfile since the resulting war always is placed inside the ear with the name cactus.war. <cactifyear srcfile="${build.dir}/my.ear" destfile="${build.dir}/cactified.ear"> <cactuswar srcfile="mytest.war" mergewebxml="my-web.xml"> <classes dir="${classes}"> <include name="**/*Test.class"/> </classes> </cactuswar> </cactifyear> |