Class TestGenerateMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.github.ascopes.protobufmavenplugin.mojo.AbstractGenerateMojo
io.github.ascopes.protobufmavenplugin.mojo.TestGenerateMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="generate-test",
configurator="protobuf-maven-plugin-configurator",
defaultPhase=GENERATE_TEST_SOURCES,
requiresDependencyCollection=TEST,
requiresDependencyResolution=TEST,
requiresOnline=false,
threadSafe=true)
public final class TestGenerateMojo
extends AbstractGenerateMojo
Generate source code from protobuf files for use in tests.
Unlike the generate goal, these sources will only be visible
to tests, and will not be included in any final JAR of the project main sources.
Any project dependencies using the compile, provided,
system, or test scopes will be made available to import from protobuf sources.
By default, sources will be read from src/test/protobuf (src/test/proto
is also supported to assist in migration off of other unmaintained Maven plugins),
and generated sources will be written to target/generated-test-sources/protobuf.
Generally, you won't need to use this. It can be useful in some more specific use cases where you are only using the protobuf definitions within the context of a test.
- Author:
- Ashley Scopes
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractGenerateMojo
executeMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
TestGenerateMojo
public TestGenerateMojo()
-