I'm working on tool that does some minor modification to the bytecode. Currently it is maven plugin that's bound to the process-classes phase by default. So it get invoked after compilation.
I am aware that one can configure a "Run configuration" to invoke additional tools to complement or even replace the "make" action. So that could be the place for me to invoke the bytecode mod. tool. Unfortunately things get complicated when using a project with multiple modules as well as when artifacts (like exploded ejb/war etc) are used. Some of the modules are just libraries from the point of view of the modules that used them. As such there is no "Run" config for these modules. The problem is that one quikcly ends up compiling the different modules using IntelliJ's "make" and this end up not having the bytecode undergoing the extra step.
So if you are careful and compile all the module using maven first then it works. Even the classes for exploded artifacts will even get copied verbatim which will preserve the bytecode changes. But if you happen to change something then "make" kicks in, recompiles the stuff and the classes are not transformed that time around. Of course in the end it hard to work this way :(
My question: is there are way to combine say the "make" way of working (being super easy for multi module projects of course) yet also get the additional bytecode transformation step invoked afterwards? Or can (and should) this be done with a plugin? This sound like way more work of course. Any pointer would be much appreciated.
I hope the description of my problem is clear enough and my question as well. If not let me know.