On 7/14/06, Matt Benson <[EMAIL PROTECTED]> wrote:
Henri: Did you ever get this working? -Matt
Sorry, was working on it on Saturday but then an unhappy 2 year old intervened before the reply was finished. Replying below, thanks for the followup. On 7/14/06, Matt Benson <[EMAIL PROTECTED]> wrote:
Can you try calling maybeConfigure(), followed by getRealThing() on your UnknownElement to get your JUnitTask instance?
Thanks Matt, the code looks really good now - just doesn't work :( Here's where I am: if(event.getTask().getTaskName().equals("junit")) { Task task = event.getTask(); UnknownElement ue = (UnknownElement) task; ue.maybeConfigure(); JUnitTask jut = (JUnitTask) ue.getRealThing(); jut.setHaltonerror(false); jut.setHaltonfailure(false); FormatterElement fe = new FormatterElement(); FormatterElement.TypeAttribute feta = new FormatterElement.TypeAttribute(); feta.setValue("xml"); fe.setType(feta); jut.addFormatter(fe); } The Halt's have stopped working, which I'd previously overridden via: RuntimeConfigurable rc = ue.getWrapper(); rc.setAttribute("haltonfailure", "false"); rc.setAttribute("haltonerror", "false"); Looking at UnknownElement, I think the real call to maybeConfigure from within Project blows away the one that I've put in place, then applies the RuntimeConfigurable again. (then I continued to dig into things but didn't get anywhere in particular) Hen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]