Plugin Documentation

This report describes goals, parameters details, requirements and sample usage of this plugin.

Goals

Goals available for this plugin:

Goal Report? Description
javacc:help No Display help information on javacc-maven-plugin.
Call mvn javacc:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
javacc:javacc No The javacc goal, for generating the parser files from a JavaCC grammar.
It searches the source directory for all grammar files and run JavaCC once for each file it finds, managing the output directory from the user setting or the default setting, and adding it to the project-wide compile source roots.
It uses an intermediate output directory to help discard any generated file when the user wants instead his customized version he has put in any compile source root.

Detailed information about the JavaCC options can be found on the JavaCC website.
The code repositories can be found within JavaCC at GitHub.

javacc:jjdoc Yes The jjdoc goal, for producing documentation for a JavaCC / JJTree / JTB grammar.
It is used indirectly under the hood when using the plugin as a reporting plugin, triggered by the Maven site plugin, producing JJDoc reports. In that case there can be only one execution and one configuration defining the source directories and other parameters.
It can also be used directly as a standalone goal, as a build plugin, if one wants more control, for example for multiple executions with different configurations with different sets of source directories and other parameters.
It searches the source directories for all grammar files (those included and not excluded) and runs JJDoc once for each file it finds, producing output files of the format set through the JJDoc options, and of names set through JJDoc options OUTPUT_DIRECTORY and OUTPUT_FILE.
It also produces, for each execution, an HTML "index" file named through the plugin parameter jjdocReportsPage containing a table with the hyperlinks for the grammar file name to its corresponding generated JJDoc document, in a directory set by a plugin parameter jjdocReportsDirectory if used in a build plugin or by the Maven site plugin parameter outputDirectory if used in a reporting plugin.
And finally, if used in a reporting plugin, the Maven site plugin will create a menu entry to the HTML "index" page in the "Project Documentation / Project Reports" menu of the site.

Detailed information about the JJDoc options can be found on the JJDoc documentation page.
Examples can be found in the integration tests jjdoc-goal and site-phase.
The code repositories can be found within JavaCC at GitHub and JTB at GitHub.

javacc:jjtree No The jjtree goal, for generating the tree files (but not the parser files) from a JJTree grammar.
It searches the source directory for all grammar files and run JJTree once for each file it finds, managing the output directory from the user setting or the default setting, and adding it to the project-wide compile source roots.
It uses an intermediate output directory to help discard any generated file when the user wants instead his customized version he has put in any compile source root.

Detailed information about the JJTree options can be found on the JavaCC website.
The code repositories can be found within JavaCC at GitHub.

javacc:jjtree-javacc No The jjtree-javacc goal, for generating the tree and the parser files from a JJTree grammar.
It searches the source directory for all grammar files and run JJTree and JavaCC once for each file it finds, managing the output directory from the user setting or the default setting, and adding it to the project-wide compile source roots.
It uses an intermediate output directory for each processor to help discard any generated file when the user wants instead his customized version he has put in any compile source root.

Detailed information about the JJTree and JavaCC options can be found on the JavaCC website.
The code repositories can be found within JavaCC at GitHub.

javacc:jtb No The jtb goal, for generating the tree files (but not the parser files) from a JTB grammar.
It searches the source directory for all grammar files and run JTB once for each file it finds, managing the output directory from the user setting or the default setting, and adding it to the project-wide compile source roots.
It uses an intermediate output directory to help discard any generated file when the user wants instead his customized version he has put in any compile source root.

Detailed information about the JTB options can be found on the JTB wiki.
The code repository can be found within JTB at GitHub.

javacc:jtb-javacc No The jtb-javacc goal, for generating the tree and the parser files from a JTB grammar.
It searches the source directory for all grammar files and run JTB then JavaCC once for each file it finds, managing the output directory from the user setting or the default setting, and adding it to the project-wide compile source roots.
It uses an intermediate output directory for each processor to help discard any generated file when the user wants instead his customized version he has put in any compile source root.

Detailed information about the JTB and JavaCC options can be found on the JTB wiki and the JavaCC website.
The code repositories can be found within JTB at GitHub and JavaCC at GitHub.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.9.12
JDK 1.8

System Requirements History

The following specifies the minimum requirements to run this Maven plugin for historical versions:

Plugin Version Maven JDK
3.8.0 - 8
from 3.0.0 to 3.0.3 2.0.6 7

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.javacc.plugin</groupId>
          <artifactId>javacc-maven-plugin</artifactId>
          <version>3.8.0-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.javacc.plugin</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
      </plugin>
      ...
    </plugins>
  </build>
  ...
  <!-- To use the report goals in your POM or parent POM -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.javacc.plugin</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>3.8.0-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"