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",
defaultPhase=GENERATE_TEST_SOURCES,
requiresDependencyCollection=COMPILE_PLUS_RUNTIME,
requiresDependencyResolution=NONE,
requiresOnline=true,
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
,
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
-
Method Summary
Methods inherited from class io.github.ascopes.protobufmavenplugin.mojo.AbstractGenerateMojo
execute
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
TestGenerateMojo
public TestGenerateMojo()
-