ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell" <>
Subject Abusing the BuildListener
Date Thu, 13 Jul 2006 00:36:51 GMT
I suspect this isn't what was intended for the build listener, but
I've been using it to override the build.xml for <junit> tasks. In
startTask I ensure that haltonerror and haltonfailure are set to
false. Next up I want to ensure there is always a <formatter
type="xml"/>, but adding a new task in seems a lot more painful than
simply modifying the existing objects.

Here's a chunk of my code:

UnknownElement proxy = new UnknownElement("formatter");
RuntimeConfigurable fc = new RuntimeConfigurable( proxy, "formatter");
fc.setAttribute("type", "xml");
rc.addChild(fc);   // rc is the RuntimeConfig for the junit task

When I build with a listener that contains this, I get:

Class doesn't support the "type" attribute.

Before I dig deep into how the xml is parsed and turned into an object
model - is it blatantly obvious what I'm doing wrong?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message