logo JavaCC Maven Plugin

Maven 2 Plugin for processing JavaCC grammar files.

homepage: mojo.codehaus.org/javacc-maven-plugin
fresh index:
last release: 1 decade ago, first release: 2 decades ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
javacc:jjtree (phase: generate-sources)

Parses a JJTree grammar file (*.jjt) and transforms it to Java source files and a JavaCC grammar file. Please see the JJTree Reference Documentation for more information.

javacc:jtb (phase: generate-sources)

Parses a JTB file and transforms it into source files for an AST and a JavaCC grammar file which automatically builds the AST.Note: JTB requires Java 1.5 or higher. This goal will not work with earlier versions of the JRE.

javacc:jjdoc

JJDoc takes a JavaCC parser specification and produces documentation for the BNF grammar. This mojo will search the source directory for all *.jj files and run JJDoc once for each file it finds. Each of these output files, along with an index.html file will be placed in the site directory (target/site/jjdoc), and a link will be created in the "Project Reports" menu of the generated site.

javacc:jtb-javacc (phase: generate-sources)

Preprocesses ordinary grammar files (*.jtb) with JTB and passes the output to JavaCC in order to finally generate a parser with parse tree actions.Note: JTB requires Java 1.5 or higher. This goal will not work with earlier versions of the JRE.

javacc:help

Display help information on javacc-maven-plugin. Call mvn javacc:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

javacc:jjtree-javacc (phase: generate-sources)

Preprocesses decorated grammar files (*.jjt) with JJTree and passes the output to JavaCC in order to finally generate a parser with parse tree actions.

javacc:javacc (phase: generate-sources)

Parses a JavaCC grammar file (*.jj) and transforms it to Java source files. Detailed information about the JavaCC options can be found on the JavaCC website.

Often used code snippets:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>javacc-maven-plugin</artifactId>
  <version>2.6</version>
  <executions>
    <execution>
      <id>javacc</id>
      <goals>
        <goal>javacc</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>javacc-maven-plugin</artifactId>
  <version>2.6</version>
  <executions>
    <execution>
      <id>javacc</id>
      <goals>
        <goal>javacc</goal>
      </goals>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>net.java.dev.javacc</groupId>
      <artifactId>javacc</artifactId>
      <version>6.1.2</version>
    </dependency>
  </dependencies>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>javacc-maven-plugin</artifactId>
  <configuration>
    <sourceDirectory>${basedir}/src/main/javacc</sourceDirectory>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>javacc</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>javacc-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>javacc</goal>
      </goals>
      <configuration>
        <includes>
          <include>FilterParser.jj</include>
        </includes>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>javacc-maven-plugin</artifactId>
  <version>2.6</version>
  <executions>
    <execution>
      <id>javacc</id>
      <phase>generate-sources</phase>
      <goals>
        <goal>javacc</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.