Maybe I'm not making aspectj-maven-plugin work ...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Maybe I'm not making aspectj-maven-plugin work ...

Benson Margulies
And maybe I'm not making aspectj work.

I don't know which.

In Maven module (1), I have a whole family of classes, each of which
implements 'equals'.

I want to 'around' these, but only in Maven module (2).

So, in Maven module (2), I configure the plugin, and specify to weave
the dependency.

Sure enough, log messages like:

[DEBUG] woven class (from

Then I have an aspect:


 * See if we can't make an aspect to spy on equals ...
public aspect AdmEquals {
    boolean around(Object other): execution(public boolean
BaseAttribute+.equals(..)) && args(other) {
        boolean result = proceed(other);
        if (!result) {
        return true;

Sadly for me, the results are no results at all. When I run a main
method of a class in module (2), no sign of the aspect in action. Is
there some initialization I need to do?

To unsubscribe from this list, please visit: