I have a java application build upon Spring 3. This project has another jar as a dependency.
This dependency contains a @org.aspectj.lang.annotation.Aspect
I've ended up declaring the aspects in the spring's applicationContext xml config and removing the annotations.
What was working so far was using the aspectj plugin for maven, but everytime I changed a class in eclipse, I had to run $ mvn compile
(because eclipse doesn't know the aspects, and was compiling the classes without them), and that's an awful thing to say to anybody that will use MyAspect
.
Then I just created a config file and documented: to use MyAspect
, just import this config rules to your spring's context configuration.