Eduardo Bezerra
Eduardo Bezerra

Reputation: 1963

aspectj: How to weave aspects from a library into user code?

I have a library with some classes and a few aspects in it. Say AspectedLib.jar is the file that contains such definitions (created in eclipse, with "export jar file with aspectj support"). If I import the AspectedLib.jar file, and even use some of the classes defined in it, it works, but none of the joinpoints is triggered, i.e., the aspects are not executed.

How can I make this work? Ideally, how can I set this up in eclipse*?

* Version: Juno Service Release 2; Build id: 20130225-0426

Upvotes: 0

Views: 1210

Answers (1)

Andrew Eisenberg
Andrew Eisenberg

Reputation: 28737

You need to add the jar to your aspect path. In your Eclipse project preferences, go to AspectJ build -> Aspect Path and add the jar.

Upvotes: 1

Related Questions