Creating a Library for aspectjrt.jar
This feature is supported in the Ultimate edition only.
To be able to use the AspectJ support, in addition to enabling AspectJ support plugins, you should create a library containing
aspectjrt.jar and add this library to dependencies of the modules in which you are going to develop your aspects.
aspectjrt.jar is included in the AspectJ distribution which you can download from the AspectJ website.
Creating a library for aspectjrt.jar and adding it to module dependencies
By the time you start to perform this task, you must have already downloaded and installed AspectJ.
- Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
- Depending on whether you want to create the new library at the project or the IDE level, select Libraries or Global Libraries.
- Click and select Java.
- In the dialog that opens, find and select
aspectjrt.jar. (This file is located in
<AspectJ installation directory>\lib.)
- In the Choose Modules dialog, select the modules in which you want to use this library and click OK.
As a result, the library is added to dependencies of the corresponding modules.
- Click OK in the Project Structure dialog.