Peter-

This doesn't address your question, and I'm not sure it would help you
directly, but I know that Jeff Martin has written an Ant task called
ChangeLog as part of the Alexandria project
(http://java.apache.org/alexandria) that helps attribute file ownership.
From the JavaDoc: "The task will examine the output of cvs log and group
related changes together.  It produces an XML output representing the list
of changes."  Like I said, I'm not sure this helps, but thought I'd mention
it FYI.

Along the lines of automated builds, notifying developers of build errors,
etc., you might want to check out Martin Fowler's article on Continuous
Integration (http://martinfowler.com/articles/continuousIntegration.html) as
well as this entry in the Ant FAQ
<http://jakarta.apache.org/jyve-faq/Turbine/screen/DisplayQuestionAnswer/act
ion/SetAll/project_id/2/faq_id/16/topic_id/196/question_id/741> that
describes an Ant build listener that sends out an email with a log of the
build after a build is finished (successfully or not).

Sincerest regards,
Chris Todd
Software Engineer
Alabanza Corporation
[EMAIL PROTECTED]

-----Original Message-----
From: Peter Vogel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 8:32 PM
To: '[EMAIL PROTECTED]'
Subject: Extensible Attributes


Hi all,

A fairly common thing in large development projects is the idea that there
are certain people who "own" a section of the code, any build problems in
that code should be brought to the attention of that owner/those owners.

When I've solved this in the past, with a non-ant driven build, I've parsed
the
output of gnumake and had an associative array (PERL) I slurp in on the side
to
indicate who "owns" or should be notified about various directories within
the tree.

I was about to do the same thing today with an ant-based (but still PERL
driven
at the top) build, when I thought:  "Wait!  This is XML, we'll maintain the
owner info
in the same place as the rest of the build!" so I proceeded to add an
"owner" attribute
to targets, and my perl script uses XML::Parser to snag that information
from build.xml
before calling ant and parsing its output.

Cool!  Except for some reason, which this XML neophyte does not understand,
ANT is
very strict about the attributes that it will allow on the tags it handles.
So I went and
hacked ProjectHelper.java to have it recognize and ignore the "owner"
attribute in
TargetHandler's init interface.

So, I have two primary questions:

1.  Why be so strict about attributes on tags, such that you throw an
exception for
     any unrecognized tag?  Why not just silently ignore (or warn, if you
must) unrecognized
     tags?  Isn't that the whole point of XML?, to allow disparate tools to
communicate more
     efficiently?  Isn't it the case that some tools will look at some
tags/attributes and not
     others and vice versa?  If anyone else agrees, perhaps the
            }else { throw SAXParseException("unknown attribute ..."); }
     should be eliminated from ProjectHelper.java?

2.  If there *is* a good reason (and remember, I'm an XML neophyte, so what
do I know?) for
     this stringency, can we add the following code to TargetHandler::init?:

        } else if {key.equals("owner")) {
            /* ignore me */
        ...

Thanks!
-Peter
Manager, Configuration Management
Arsin Corporation
4800 Great America Parkway, Suite 425
Santa Clara, CA 95054


Reply via email to