Class ProtocCompileJavaScriptMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.xolstice.maven.plugin.protobuf.AbstractProtocMojo
-
- org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo
-
- org.xolstice.maven.plugin.protobuf.ProtocCompileJavaScriptMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="compile-js", defaultPhase=GENERATE_SOURCES, requiresDependencyResolution=COMPILE, threadSafe=true) public final class ProtocCompileJavaScriptMojo extends AbstractProtocCompileMojoThis mojo executes theprotoccompiler for generating main JavaScript sources from protocol buffer definitions. It also searches dependency artifacts for.protofiles and includes them in theproto_pathso that they can be referenced. Finally, it adds the.protofiles to the project as resources so that they are included in the final artifact.- Since:
- 0.6.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringjavaScriptOptionsAdditional comma-separated options to be passed to the JavaScript generator.private java.io.FileoutputDirectoryThis is the directory into which the.jswill be created.-
Fields inherited from class org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo
descriptorSetClassifier
-
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 ProtocCompileJavaScriptMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddProtocBuilderParameters(Protoc.Builder protocBuilder)Adds mojo-specific parameters to the protoc builder.protected java.io.FilegetOutputDirectory()Returns the output directory for generated sources.-
Methods inherited from class org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo
doAttachGeneratedFiles, doAttachProtoSources, getDependencyArtifacts, getDescriptorSetOutputDirectory, getProtoSourceRoot
-
Methods inherited from class org.xolstice.maven.plugin.protobuf.AbstractProtocMojo
checkFilesUpToDate, checkParameters, createDependencyArtifact, createDependencyArtifact, createProtocPlugins, detectJavaHome, doAttachFiles, execute, findGeneratedFilesInDirectory, findProtoFilesInDirectories, findProtoFilesInDirectory, getDependencyArtifactFiles, getExcludes, getIncludes, hasDelta, lastModified, makeProtoPathFromJars, resolveBinaryArtifact, skipMojo, toHexString, truncatePath
-
-
-
-
Field Detail
-
outputDirectory
@Parameter(required=true, property="javaScriptOutputDirectory", defaultValue="${project.build.directory}/generated-sources/protobuf/js") private java.io.File outputDirectoryThis is the directory into which the.jswill be created.
-
javaScriptOptions
@Parameter(required=false, property="javaScriptOptions") private java.lang.String javaScriptOptionsAdditional comma-separated options to be passed to the JavaScript generator. Cannot contain colon (:) symbols.
-
-
Method Detail
-
addProtocBuilderParameters
protected void addProtocBuilderParameters(Protoc.Builder protocBuilder)
Description copied from class:AbstractProtocMojoAdds mojo-specific parameters to the protoc builder.- Overrides:
addProtocBuilderParametersin classAbstractProtocMojo- Parameters:
protocBuilder- the builder to be modified.
-
getOutputDirectory
protected java.io.File getOutputDirectory()
Description copied from class:AbstractProtocMojoReturns the output directory for generated sources. Depends on build phase so must be defined in concrete implementation.- Specified by:
getOutputDirectoryin classAbstractProtocMojo- Returns:
- output directory for generated sources.
-
-