IntelliJ IDEA 2018.2 Help

Creating a Library for aspectjrt.jar

After you enable the AspectJ support plugins, add a library containing aspectjrt.jar, and then add an AspectJ facet with corresponding dependencies, if they are required for developing your aspects.

aspectjrt.jar is included in the AspectJ distribution which you can download from the AspectJ website.

To create a library for AspectJ:

  1. Open the Project Structure dialog (Ctrl+Shift+Alt+S).

  2. Depending on whether you want to create the new library at the project or the IDE level, select Libraries or Global Libraries.

  3. Click the Add button (icons general add svg) and select Java.

  4. Select the aspectjrt.jar file, which should be located in <AspectJ installation directory>\lib or wherever you downloaded it.

  5. In the Choose Modules dialog, select the modules in which you want to use this library and click OK.

To add AspectJ dependencies:

  1. Open the Project Structure dialog (Ctrl+Shift+Alt+S).

  2. Select Facets.

  3. Click the Add button (icons general add svg) and select AspectJ.

  4. In the Choose Modules dialog, select the modules in which you want to use this facet and click OK.

  5. Select the new AspectJ facet for the relevant module and add dependencies as paths to corresponding aspects (aspectpath).

Last modified: 20 November 2018