Class ProtocPlugin
java.lang.Object
org.xolstice.maven.plugin.protobuf.ProtocPlugin
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
archDirectoryExists
(String arch) getArgs()
Returns optional command line arguments to pass to themain()
method.Returns the plugin's artifact id for dependency resolution.Returns an optional classifier of the plugin's artifact for dependency resolution.Returns group id of the plugin's artifact for dependency resolution.getId()
Returns the unique id for this plugin.Returns optional JVM options for plugin execution.Returns the plugin's Java main class to be execute by protoc.getPluginExecutableFile
(File pluginDirectory) Returns the generated plugin executable path.Returns the plugin's version specification for dependency resolution.void
setJavaHome
(String javaHome) toString()
void
validate
(org.apache.maven.plugin.logging.Log log) Validate the state of this plugin specification.
-
Field Details
-
DATA_MODEL_SYSPROP
- See Also:
-
WIN_JVM_DATA_MODEL_32
- See Also:
-
WIN_JVM_DATA_MODEL_64
- See Also:
-
id
-
groupId
-
artifactId
-
version
-
classifier
-
mainClass
-
javaHome
-
winJvmDataModel
-
args
-
jvmArgs
-
-
Constructor Details
-
ProtocPlugin
public ProtocPlugin()
-
-
Method Details
-
getId
Returns the unique id for this plugin.- Returns:
- the plugin's unique id.
-
getGroupId
Returns group id of the plugin's artifact for dependency resolution.- Returns:
- the plugin's group id.
-
getArtifactId
Returns the plugin's artifact id for dependency resolution.- Returns:
- the plugin's artifact id.
-
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
Returns an optional classifier of the plugin's artifact for dependency resolution.- Returns:
- the plugin's artifact classifier.
-
getMainClass
Returns the plugin's Java main class to be execute by protoc.- Returns:
- fully qualified name for the main class.
-
getArgs
Returns optional command line arguments to pass to themain()
method.- Returns:
- a list of command-line arguments.
-
getJvmArgs
Returns optional JVM options for plugin execution.- Returns:
- a list of JVM options.
-
getJavaHome
-
setJavaHome
-
getWinJvmDataModel
-
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
-
getPluginExecutableFile
Returns the generated plugin executable path.- Parameters:
pluginDirectory
- directory where plugins will be created- Returns:
- file handle for the plugin executable.
-
toString
-