Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

AspectJMaven/ajdoc

The AspectJ Maven Plugin supports calling AJDoc for generating javadoc-like documentation during the "site" build phase.

Normal JavaDoc will often fail generating docs for your project if you are using inner static aspects. This happens because it will try to parse the aspect inside .java files, and will not be able to. AJDoc instead is an extension of JavaDoc able to parse aspects.

As it happens for JavaDoc (and any other Maven plugin participating in project web site creation), AJDoc is a reporting plugin, so ti can be configured as follows :

<project>
    ...
    <dependencies>
        ...
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.2</version>
            <scope>compile</scope>
        </dependency>
        ...
    </dependencies>
    ...
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <configuration>
                    <complianceLevel>1.5</complianceLevel>
                </configuration>
                <reportSets> 
                   <reportSet>
                       <reports>
                           <report>aspectj-report</report>
                       </reports>
                   </reportSet>
               </reportSets>
           </plugin>
      </plugins>
   </reporting>
...
</project>

See the following pages on official plugin documentation for more informations :

  • How to use AJDoc report in the quick start [1]
  • Documentation of the report goal [2]

Back to the top