Fork me on GitHub

Configuring report

Configuring AspectJ report

Example of ajdoc report creation, i.e. javadoc-like API documentation enhanced by aspect information.

Note: Since this report is using tools.jar on JDK 8 as a system scoped dependency and the corresponding JDK tool classes for javadoc generation on JDK 9+, you need to make sure that your JAVA_HOME environment variable points to the correct JDK before using this feature. You can just try your default setup, but if classes or libraries are not found, you probably need to adjust your configuration correspondingly.

<project>
  <!-- ... -->
  <dependencies>
    <!-- ... -->
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>${aspectjVersion}</version>
      <scope>compile</scope>
    </dependency>
    <!-- ... -->
  </dependencies>
  <!-- ... -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <verbose>true</verbose>
          <privateScope>true</privateScope>
          <complianceLevel>8</complianceLevel>
          <ajdtBuildDefFile>build.ajproperties</ajdtBuildDefFile>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>aspectj-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <!-- ... -->
</project>