Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>

<!-- Generated by maven-plugin-tools 3.2 on 2014-10-22 -->

<plugin>
  <name>Maven Protoc Plugin for Protoc and Prettypb</name>
  <description>Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/</description>
  <groupId>net.dongliu</groupId>
  <artifactId>protoc-maven-plugin</artifactId>
  <version>0.3.6</version>
  <goalPrefix>protoc</goalPrefix>
  <mojos>
    <mojo>
      <goal>compile</goal>
      <description>This mojo executes the protoc compiler for genemaven-javadoc-pluginrating java sources from protocol buffer definitions. It also searches dependency artifacts for proto files and includes them in the protopath so that they can be referenced. Finally, it adds the proto files to the project as resources so that they are included in the final artifact.</description>
      <requiresDependencyResolution>compile</requiresDependencyResolution>
      <requiresDirectInvocation>false</requiresDirectInvocation>
      <requiresProject>true</requiresProject>
      <requiresReports>false</requiresReports>
      <aggregator>false</aggregator>
      <requiresOnline>false</requiresOnline>
      <inheritedByDefault>true</inheritedByDefault>
      <phase>generate-sources</phase>
      <implementation>net.dongliu.prettypb.maven.ProtocCompileMojo</implementation>
      <language>java</language>
      <instantiationStrategy>per-lookup</instantiationStrategy>
      <executionStrategy>once-per-session</executionStrategy>
      <threadSafe>false</threadSafe>
      <parameters>
        <parameter>
          <name>additionalProtoPathElements</name>
          <type>java.io.File[]</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>checkStaleness</name>
          <type>boolean</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>excludes</name>
          <type>java.util.Set</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>hashDependentPaths</name>
          <type>boolean</type>
          <required>true</required>
          <editable>true</editable>
          <description>Set this to false to disable hashing of dependent jar paths. This plugin expands jars on the classpath looking for embedded .proto files. Normally these paths are hashed (MD5) to avoid issues with long file names on windows. However if this property is set to false longer paths will be used.</description>
        </parameter>
        <parameter>
          <name>includes</name>
          <type>java.util.Set</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>localRepository</name>
          <type>org.apache.maven.artifact.repository.ArtifactRepository</type>
          <required>true</required>
          <editable>true</editable>
          <description>This is the path to the local maven repository.</description>
        </parameter>
        <parameter>
          <name>outputDirectory</name>
          <type>java.io.File</type>
          <required>true</required>
          <editable>true</editable>
          <description>This is the directory into which the .java will be created.</description>
        </parameter>
        <parameter>
          <name>protocExecutable</name>
          <type>java.lang.String</type>
          <required>true</required>
          <editable>true</editable>
          <description>This is the path to the protoc executable. By default it will search the $PATH.</description>
        </parameter>
        <parameter>
          <name>protoSourceRoot</name>
          <type>java.io.File</type>
          <required>true</required>
          <editable>true</editable>
          <description>The source directories containing the sources to be compiled.</description>
        </parameter>
        <parameter>
          <name>staleMillis</name>
          <type>long</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>tempProtoFileDirectory</name>
          <type>java.io.File</type>
          <required>true</required>
          <editable>true</editable>
          <description>Since protoc cannot access jars, proto files in dependencies are extracted to this location and deleted on exit. This directory is always cleaned during execution.</description>
        </parameter>
        <parameter>
          <name>type</name>
          <type>java.lang.String</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
      </parameters>
      <configuration>
        <hashDependentPaths implementation="boolean" default-value="true"/>
        <localRepository implementation="org.apache.maven.artifact.repository.ArtifactRepository" default-value="${localRepository}"/>
        <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/generated-sources/protoc"/>
        <protocExecutable implementation="java.lang.String" default-value="protoc"/>
        <protoSourceRoot implementation="java.io.File" default-value="${basedir}/src/main/proto"/>
        <tempProtoFileDirectory implementation="java.io.File">${project.build.directory}/protoc-dependencies</tempProtoFileDirectory>
      </configuration>
    </mojo>
    <mojo>
      <goal>testCompile</goal>
      <requiresDependencyResolution>test</requiresDependencyResolution>
      <requiresDirectInvocation>false</requiresDirectInvocation>
      <requiresProject>true</requiresProject>
      <requiresReports>false</requiresReports>
      <aggregator>false</aggregator>
      <requiresOnline>false</requiresOnline>
      <inheritedByDefault>true</inheritedByDefault>
      <phase>generate-test-sources</phase>
      <implementation>net.dongliu.prettypb.maven.ProtocTestCompileMojo</implementation>
      <language>java</language>
      <instantiationStrategy>per-lookup</instantiationStrategy>
      <executionStrategy>once-per-session</executionStrategy>
      <threadSafe>false</threadSafe>
      <parameters>
        <parameter>
          <name>additionalProtoPathElements</name>
          <type>java.io.File[]</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>checkStaleness</name>
          <type>boolean</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>excludes</name>
          <type>java.util.Set</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>hashDependentPaths</name>
          <type>boolean</type>
          <required>true</required>
          <editable>true</editable>
          <description>Set this to false to disable hashing of dependent jar paths. This plugin expands jars on the classpath looking for embedded .proto files. Normally these paths are hashed (MD5) to avoid issues with long file names on windows. However if this property is set to false longer paths will be used.</description>
        </parameter>
        <parameter>
          <name>includes</name>
          <type>java.util.Set</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>localRepository</name>
          <type>org.apache.maven.artifact.repository.ArtifactRepository</type>
          <required>true</required>
          <editable>true</editable>
          <description>This is the path to the local maven repository.</description>
        </parameter>
        <parameter>
          <name>outputDirectory</name>
          <type>java.io.File</type>
          <required>true</required>
          <editable>true</editable>
          <description>This is the directory into which the .java will be created.</description>
        </parameter>
        <parameter>
          <name>protocExecutable</name>
          <type>java.lang.String</type>
          <required>true</required>
          <editable>true</editable>
          <description>This is the path to the protoc executable. By default it will search the $PATH.</description>
        </parameter>
        <parameter>
          <name>protoTestSourceRoot</name>
          <type>java.io.File</type>
          <required>true</required>
          <editable>true</editable>
          <description>The source directories containing the sources to be compiled.</description>
        </parameter>
        <parameter>
          <name>staleMillis</name>
          <type>long</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
        <parameter>
          <name>tempProtoFileDirectory</name>
          <type>java.io.File</type>
          <required>true</required>
          <editable>true</editable>
          <description>Since protoc cannot access jars, proto files in dependencies are extracted to this location and deleted on exit. This directory is always cleaned during execution.</description>
        </parameter>
        <parameter>
          <name>type</name>
          <type>java.lang.String</type>
          <required>false</required>
          <editable>true</editable>
          <description></description>
        </parameter>
      </parameters>
      <configuration>
        <hashDependentPaths implementation="boolean" default-value="true"/>
        <localRepository implementation="org.apache.maven.artifact.repository.ArtifactRepository" default-value="${localRepository}"/>
        <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/generated-test-sources/protoc"/>
        <protocExecutable implementation="java.lang.String" default-value="protoc"/>
        <protoTestSourceRoot implementation="java.io.File" default-value="${basedir}/src/test/proto"/>
        <tempProtoFileDirectory implementation="java.io.File">${project.build.directory}/protoc-dependencies</tempProtoFileDirectory>
      </configuration>
    </mojo>
  </mojos>
</plugin>
New to GrepCode? Check out our FAQ X