I have a plugin which transforms the compiled classes. This transformation needs to be done for both the module's classes and the module's test classes. Thus, I bind the plugin to both the process-classes and process-test-classes phases. The problem I have is that I need to determine which phase the plugin is currently executing in, as I do not (cannot, actually) transform the same set of classes twice.
Thus, within the plugin, I would need to know if I'm executing process-classes - in which case I transform the module's classes. Or if I'm executing process-test-classes - in which I case I do not transform the module's classes and transform only the module's test classes.
I could, of course, create two plugins for this, but this kind of solution deeply offends my sensibilities and is probably against the law in several states.
It seems like something I could reach from my module should be able to tell me what the current phase is. I just can't for the life of me find out what that something is.
Thanks...