From: <mic...@do...> - 2004-09-13 14:10:41
|
I'm trying to integrate CruiseControl to build a largish Weblogic Workshop application. Workshop provides a 'wlwBuild' Ant task, which takes the Workshop .work file and builds it, using whatever tools necessary (javelin, ejbcgen, jsp compilers, etc). The output is horribly ugly and inconsistent (and doesn't go to a log), and Ant returns the line "Java error 4" back to CC, which is completely useless. So, I've used the Ant <record> task to send the output to a log, and then wrote a custom ant task that parses the output in an XML file, as outlined in the wiki page http://c2.com/w4/cc/wiki.cgi?WritingBuilderPlugins. To be clear, the build process is as follows: 1. CC calls a specific task in my masterbuild.xml Ant file. 2. Task does the following (using core Ant Tasks): a) delete the app b) checkout the app c) run the app's ant file. 3. The App's ant file runs the wlwBuild task. Step 2. c) is wrapped in a <trycatch> block (part of the Ant contrib tasks) like so: <trycatch> <try> <report action=3D"start" ...>=09 <wlwBuild .../> </try> <catch> <property name=3D"build-eai.exception.thrown" value=3D"true"/> </catch> <finally> <report action=3D"stop"...> <wlwBuild2Xml ...> <!-- my custom task, convert ugly stdout to CC xml output --> <fail if=3D"build-eai.exception.thrown>build failed</fail> </finally> </trycatch> I had to use the <trycatch>, else my <wlwBuild2Xml> task wouldn't run if the build actually failed. =09 So I really have two questions 1. What do I do next to get this into my logs and emails? I've tried the <log><merge .../></log> CC task, and it finds and merges the logs, but converts all my <message priority=3D"warning"...> and <message priority=3D"error"...> to <message priority=3D"'info"...>. Am I heading = in the right direction? What next? 2. Any ideas how to get the real failure back into the email, instead of my <fail/> message, or the "Java error 4"? thanks mike =09 |