Class Protoc
java.lang.Object
org.xolstice.maven.plugin.protobuf.Protoc
This class represents an invokable configuration of the
protoc compiler.
The actual executable is invoked using the plexus Commandline.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classThis class buildsProtocinstances. -
Method Summary
Modifier and TypeMethodDescriptionCreates the command line arguments.intexecute(org.apache.maven.plugin.logging.Log log) Invokes theprotoccompiler using the configuration specified at construction.getError()voidlogExecutionParameters(org.apache.maven.plugin.logging.Log log) Logs execution parameters on debug level to the specified logger.
-
Method Details
-
execute
public int execute(org.apache.maven.plugin.logging.Log log) throws org.codehaus.plexus.util.cli.CommandLineException, InterruptedException Invokes theprotoccompiler using the configuration specified at construction.- Parameters:
log- logger instance.- Returns:
- The exit status of
protoc. - Throws:
org.codehaus.plexus.util.cli.CommandLineException- if command line environment cannot be set up.InterruptedException- if the execution was interrupted by the user.
-
buildProtocCommand
-
logExecutionParameters
public void logExecutionParameters(org.apache.maven.plugin.logging.Log log) Logs execution parameters on debug level to the specified logger. All log messages will be prefixed with ""[PROTOC] "".- Parameters:
log- a logger.
-
getOutput
- Returns:
- the output
-
getError
- Returns:
- the error
-