We have a Spring-OSGI application built with maven, and I want to add application-wide logging around every method of every class of every maven module via AOP. I don't want to be linked to an IDE like Eclipse or any specific OSGI framework. I also want my aspects to be in a single centered area like a single module, and I want it to advise every class, even if they are in other modules.
I have tried aspectj. Our application uses the @Override annotation on interface method implementations and the Java 1.5 compiler generates errors for it. Aspectj 1.6 came out a few days ago and this compiles our application properly. Unfortunately, the aspectj maven plugin is still using aspectj 1.5.2, so it's not compatible with our project. I have tried to switch the compiler to aspectj 1.6 in my pom.xml. That worked, but it would only advise a class if the aspect was in the same maven module. I don't want to duplicate the same aspect in every bundle...
Maybe I'm going at this all wrong. Is there a proper way to do this in light of my requirements? We would greatly appreciate the help.
|