org.apache.hadoop.maven.plugin.protoc (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.maven.plugin.protoc

# Package org.apache.hadoop.maven.plugin.protoc

package org.apache.hadoop.maven.plugin.protoc

Plugins to generate Java files based on protocol buffers with the protoc command.

For generated files intended for primary build artifacts use like:

      <plugins>
        ... SNIP ...
        <plugin>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-maven-plugins</artifactId>
          <executions>
            ... SNIP ...
            <execution>
              <id>compile-protoc</id>
              <goals>
                <goal>protoc</goal>
              </goals>
              <configuration>
                <protocVersion>${protobuf.version}</protocVersion>
                <protocCommand>${protoc.path}</protocCommand>
                <imports>
                  <param>${basedir}/src/main/proto</param>
                </imports>
                <source>
                  <directory>${basedir}/src/main/proto</directory>
                  <includes>
                    <include>HAServiceProtocol.proto</include>
                    ... SNIP ...
                    <include>RefreshCallQueueProtocol.proto</include>
                    <include>GenericRefreshProtocol.proto</include>
                  </includes>
                </source>
              </configuration>
            </execution>
            ... SNIP ...
          </executions>
          ... SNIP ...
        </plugin>
      </plugins>

For generated files intended only for test, use like:

      <plugins>
        ... SNIP ...
        <plugin>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-maven-plugins</artifactId>
          <executions>
            ... SNIP ...
            <execution>
              <id>compile-test-protoc</id>
              <goals>
                <goal>test-protoc</goal>
              </goals>
              <configuration>
                <protocVersion>${protobuf.version}</protocVersion>
                <protocCommand>${protoc.path}</protocCommand>
                <imports>
                  <param>${basedir}/src/test/proto</param>
                </imports>
                <source>
                  <directory>${basedir}/src/test/proto</directory>
                  <includes>
                    <include>test.proto</include>
                    <include>test_rpc_service.proto</include>
                  </includes>
                </source>
              </configuration>
            </execution>
            ... SNIP ...
          </executions>
          ... SNIP ...
        </plugin>
      </plugins>

- Classes
  Class
  Description
  org.apache.hadoop.maven.plugin.protoc.ProtocMojo
  Mojo to generate java classes from .proto files using protoc.
  org.apache.hadoop.maven.plugin.protoc.ProtocRunner
  Common execution for both the main and test protoc mojos.
  org.apache.hadoop.maven.plugin.protoc.ProtocTestMojo
  Mojo to generate java test classes from .proto files using protoc.