 ------
 Usage
 ------
 Vincent Siveton
 ------
 September 2006
 ------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements.  See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership.  The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License.  You may obtain a copy of the License at
~~
~~   http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied.  See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html

Usage

 The Antlr Plugin generates files based on grammar file(s). The following examples describe the basic
 usage of the Plugin.

* Generate Files From Antlr Grammar File(s)

 You must configure the Antlr Plugin as follow:

+-----+
<project>
...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>antlr-maven-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <!--
            Comma separated list of grammar files or pattern grammar files
            By default, grammar file(s) is in ${basedir}/src/main/antlr
          -->
          <grammars>java.g</grammars>
          <!-- <grammars>*.g</grammars> -->
        </configuration>
      </plugin>
      ...
    </plugins>
  </build>
...
</project>
+-----+

 To generate files, you should execute the generate goal of the Antlr Plugin, i.e.:

+-----+
mvn antlr:generate
+-----+

* Generate Files From Antlr Grammar File(s) As Part Of Your Build

 When you compile your project, the Antlr Plugin could be executed. You should add the \<execution\> section
 as follow:

+-----+
<project>
...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>antlr-maven-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <!--
            Comma separated list of grammar files or pattern grammar files
            By default, grammar file(s) is in ${basedir}/src/main/antlr
          -->
          <grammars>java.g</grammars>
          <!-- <grammars>*.g</grammars> -->
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>
...
</project>
+-----+

 When you execute <<<mvn compile>>>, the files will be generated and included in your compile sources.

* Generate Antlr Reports

 To include Antlr reports in your documentation, you must configure the following in the \<reporting\>
 section of your pom:

+-----+
<project>
...
  <reporting>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>antlr-maven-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <!--
            Comma separated list of grammar files or pattern grammar files
            By default, grammar file(s) is in ${basedir}/src/main/antlr
          -->
          <grammars>java15.g</grammars>
          <!-- <grammars>*.g</grammars> -->
        </configuration>
      </plugin>
      ...
    </plugins>
  </reporting>
...
</project>
+-----+

 When you execute <<<mvn site>>>, the report will be generated.
