Class AbstractProtocCompileMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.xolstice.maven.plugin.protobuf.AbstractProtocMojo
-
- org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ProtocCompileCppMojo,ProtocCompileCsharpMojo,ProtocCompileCustomMojo,ProtocCompileJavaNanoMojo,ProtocCompileJavaScriptMojo,ProtocCompileMojo,ProtocCompilePythonMojo
public abstract class AbstractProtocCompileMojo extends AbstractProtocMojo
An abstract base mojo configuration for usingprotoccompiler with the main sources.- Since:
- 0.3.3
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringdescriptorSetClassifierIf generated descriptor set is to be attached to the build, specifies an optional classifier.private java.io.FiledescriptorSetOutputDirectoryThis is the directory into which the (optional) descriptor set file will be created.private java.io.FileprotoSourceRootThe source directories containing the.protodefinitions to be compiled.-
Fields inherited from class org.xolstice.maven.plugin.protobuf.AbstractProtocMojo
attachDescriptorSet, attachProtoSources, buildContext, descriptorSetFileName, includeDependenciesInDescriptorSet, includeSourceInfoInDescriptorSet, project, projectHelper, session, toolchainManager, useArgumentFile, writeDescriptorSet
-
-
Constructor Summary
Constructors Constructor Description AbstractProtocCompileMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoAttachGeneratedFiles()protected voiddoAttachProtoSources()protected java.util.List<org.apache.maven.artifact.Artifact>getDependencyArtifacts()protected java.io.FilegetDescriptorSetOutputDirectory()Returns output directory for descriptor set file.protected java.io.FilegetProtoSourceRoot()-
Methods inherited from class org.xolstice.maven.plugin.protobuf.AbstractProtocMojo
addProtocBuilderParameters, checkFilesUpToDate, checkParameters, createDependencyArtifact, createDependencyArtifact, createProtocPlugins, detectJavaHome, doAttachFiles, execute, findGeneratedFilesInDirectory, findProtoFilesInDirectories, findProtoFilesInDirectory, getDependencyArtifactFiles, getExcludes, getIncludes, getOutputDirectory, hasDelta, lastModified, makeProtoPathFromJars, resolveBinaryArtifact, skipMojo, toHexString, truncatePath
-
-
-
-
Field Detail
-
protoSourceRoot
@Parameter(required=true, defaultValue="${basedir}/src/main/proto") private java.io.File protoSourceRootThe source directories containing the.protodefinitions to be compiled.
-
descriptorSetOutputDirectory
@Parameter(required=true, defaultValue="${project.build.directory}/generated-resources/protobuf/descriptor-sets") private java.io.File descriptorSetOutputDirectoryThis is the directory into which the (optional) descriptor set file will be created.- Since:
- 0.3.0
-
descriptorSetClassifier
@Parameter(required=false) protected java.lang.String descriptorSetClassifier
If generated descriptor set is to be attached to the build, specifies an optional classifier.- Since:
- 0.4.1
-
-
Method Detail
-
doAttachProtoSources
protected void doAttachProtoSources()
- Specified by:
doAttachProtoSourcesin classAbstractProtocMojo
-
doAttachGeneratedFiles
protected void doAttachGeneratedFiles()
- Specified by:
doAttachGeneratedFilesin classAbstractProtocMojo
-
getDependencyArtifacts
protected java.util.List<org.apache.maven.artifact.Artifact> getDependencyArtifacts()
- Specified by:
getDependencyArtifactsin classAbstractProtocMojo
-
getDescriptorSetOutputDirectory
protected java.io.File getDescriptorSetOutputDirectory()
Description copied from class:AbstractProtocMojoReturns output directory for descriptor set file. Depends on build phase so must be defined in concrete implementation.- Specified by:
getDescriptorSetOutputDirectoryin classAbstractProtocMojo- Returns:
- output directory for generated descriptor set.
-
getProtoSourceRoot
protected java.io.File getProtoSourceRoot()
- Specified by:
getProtoSourceRootin classAbstractProtocMojo
-
-