I was thinking about adding support for event listeners to architecture rules. I think it could give us a few different things that we either need or that would benefit us in the future.
It would be setup such that each time architecture rules begins a task, it notifies all of the listeners. A source directory gets added to the configuration, a rule gets added (or removed) a wildcarded package is matched, a package gets investigated, a rule is broken, a cycle is found, etc - all of these events and more can be recorded. Thats the first step.
Next we setup a listener interface and setup an API package. This will hopefully invite other developers to begin extending the project. For example someone someday might make a gui tool or an IDE plugin and want to provide realtime feedback to the gui as packages are investigated. That might be wishful thinking ; p
We can creating a logging implementation of the listener and cleanup some of the logging currently in the code (there is a lot of it) and just keep the warns. Infos and debugs can go to a listner.
We can create a listner to generate the XML output. The interface will have a terminate method or something that tells the listner that the tool is done and to go ahead and output its report. New types of reports could be output with new listners.
The maven plugin can setup a listner for logging to determine what goes out to the console.
I like this idea mainly because it cleans up a lot of logging, and provides a mechanism for the XML report that I would like to start working on.
I hope someone has some feedback or comments on this. Thanks.
~ Mike Nereson