Re: Gump and deprecation

Sam Ruby <[email protected]> Wed, 01 Jan 2003 01:57:08 -0500
Newsgroups gmane.comp.jakarta.alexandria.devel
Message-ID <[email protected]>
[email protected] wrote:
>>Docs on the subject are at:
>>http://jakarta.apache.org/gump/project.html#nag
>>
>>But perhaps a hypothetical example might help:
>>
>><nag from="dIon Gillard &lt;[email protected]&gt;"
>>to="[email protected]">
>><regexp subject="Build Failure - commons XYZ"/>
>><regexp pattern="/deprecat/" subject="Deprecation warning - commons 
> 
> XYZ"/>
> 
>></nag>
> 
> So can I only have one nag?

You can have multiple nags.

> I'd like to have one for failure and one for using deprecated methods.

The example I provided above actually does both.  The first regexp 
(which defaults to /BUILD FAILED/) will send a build failure message. 
The second (which only is processed if the first does not produce a 
match), will send a deprecation warning.  So you will only get at most 
one nag per day, with the subject line indictating the type of problem.

> Since methods are supposed to be deprecated before removal, catching 
> deprecation sounds like a good idea.

Probably only on dependencies for which you are intending to remain 
tightly in synch with.  But you are welcome to experiment to find what 
works for you.

> I'd also like to have a short way of notifying the nag when the build is 
> successful, i.e. no deprecation, no compile errors.

A regexp patterh=/BUILD SUCCCESSFUL/ should do the trick.

> It doesn't appear from the docs that there can be more than one <nag> 
> element.

Nor does it explicitly state that there can be more than one <depend> 
element.  Since this appears to be unclear to you, do you have a 
suggested wording?

The source to this page can be found at:

http://cvs.apache.org/viewcvs/jakarta-alexandria/proposal/gump/site/xdocs/project.xml

- Sam Ruby