/aspectj-immutables

Demonstrates an issue with the combination of AspectJ and Immutables annotation processors

Primary LanguageJava

AspectJ and Immutables

This repo demonstrates a way of handling the combination of AspectJ and Immutables annotation processors.

It consists of four modules:

  1. aspectj -- an implementation of a cross-domain concern, @LogExecutionTime, using AspectJ
  2. immutables -- an implementation of an immutable model, using Immutables
  3. mixed-service -- an attempt to use @LogExecutionTime annotation when a module has an immutable model, using Immutables
  4. pure-service -- an attempt to use @LogExecutionTime annotation and importing another module that uses Immutables

The pure-service module can be compiled, but the mixed-service needs extra configuration of aspectj-maven-plugin excluding immutables from AJC. See this PR for the changes.