Class ProtocPlugin

java.lang.Object
org.xolstice.maven.plugin.protobuf.ProtocPlugin

public class ProtocPlugin extends Object
Describes a protoc plugin that is written in Java and assembled from resolved artifacts at runtime. The state is populated from the Maven plugin's configuration.
Since:
0.3.0
  • Field Details

  • Constructor Details

    • ProtocPlugin

      public ProtocPlugin()
  • Method Details

    • getId

      public String getId()
      Returns the unique id for this plugin.
      Returns:
      the plugin's unique id.
    • getGroupId

      public String getGroupId()
      Returns group id of the plugin's artifact for dependency resolution.
      Returns:
      the plugin's group id.
    • getArtifactId

      public String getArtifactId()
      Returns the plugin's artifact id for dependency resolution.
      Returns:
      the plugin's artifact id.
    • getVersion

      public String getVersion()
      Returns the plugin's version specification for dependency resolution. This can be specified as either a single version or a version range.
      Returns:
      the plugin's version or version range.
    • getClassifier

      public String getClassifier()
      Returns an optional classifier of the plugin's artifact for dependency resolution.
      Returns:
      the plugin's artifact classifier.
    • getMainClass

      public String getMainClass()
      Returns the plugin's Java main class to be execute by protoc.
      Returns:
      fully qualified name for the main class.
    • getArgs

      public List<String> getArgs()
      Returns optional command line arguments to pass to the main() method.
      Returns:
      a list of command-line arguments.
    • getJvmArgs

      public List<String> getJvmArgs()
      Returns optional JVM options for plugin execution.
      Returns:
      a list of JVM options.
    • getJavaHome

      public String getJavaHome()
    • setJavaHome

      public void setJavaHome(String javaHome)
    • getWinJvmDataModel

      public String getWinJvmDataModel()
    • getPluginName

      public String getPluginName()
    • validate

      public void validate(org.apache.maven.plugin.logging.Log log)
      Validate the state of this plugin specification.
      Parameters:
      log - a logger instance for diagnostic output.
    • archDirectoryExists

      private boolean archDirectoryExists(String arch)
    • getPluginExecutableFile

      public File getPluginExecutableFile(File pluginDirectory)
      Returns the generated plugin executable path.
      Parameters:
      pluginDirectory - directory where plugins will be created
      Returns:
      file handle for the plugin executable.
    • toString

      public String toString()
      Overrides:
      toString in class Object