Class SchemaGeneratorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.debezium.schemagenerator.maven.SchemaGeneratorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generate-api-spec",
defaultPhase=PREPARE_PACKAGE,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class SchemaGeneratorMojo
extends org.apache.maven.plugin.AbstractMojo
Generates the API spec for the connector(s) in a project.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Stringprivate booleanprivate Fileprivate org.apache.maven.project.MavenProjectGives access to the Maven project information.private List<org.eclipse.aether.repository.RemoteRepository>private org.eclipse.aether.RepositorySystemSessionprivate org.eclipse.aether.RepositorySystemprivate org.apache.maven.execution.MavenSessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringclassPathEntryFor(Class<?> clazz) private intvoidexecute()private Stringprivate Set<org.eclipse.aether.artifact.Artifact>getDependencies(org.apache.maven.artifact.Artifact inputArtifact) private org.apache.maven.artifact.ArtifactReturns the schema generator plug-in artifactprivate static booleanprivate static StringquoteIfNecessary(String value) private org.eclipse.aether.artifact.ArtifactresolveArtifact(org.eclipse.aether.artifact.Artifact inputArtifact) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
format
-
outputDirectory
@Parameter(defaultValue="${project.build.directory}${file.separator}generated-sources", required=true) private File outputDirectory -
groupDirectoryPerConnector
@Parameter(defaultValue="false") private boolean groupDirectoryPerConnector -
filenamePrefix
-
filenameSuffix
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject projectGives access to the Maven project information. -
session
@Parameter(defaultValue="${session}") private org.apache.maven.execution.MavenSession session -
repoSystem
@Component private org.eclipse.aether.RepositorySystem repoSystem -
repoSession
@Parameter(defaultValue="${repositorySystemSession}", readonly=true, required=true) private org.eclipse.aether.RepositorySystemSession repoSession -
remoteRepos
@Parameter(defaultValue="${project.remoteProjectRepositories}", readonly=true, required=true) private List<org.eclipse.aether.repository.RemoteRepository> remoteRepos
-
-
Constructor Details
-
SchemaGeneratorMojo
public SchemaGeneratorMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
exec
private int exec(String className, String classPath, List<String> jvmArgs, List<String> args) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
getClassPath
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getGeneratorPluginArtifact
private org.apache.maven.artifact.Artifact getGeneratorPluginArtifact()Returns the schema generator plug-in artifact -
classPathEntryFor
-
getDependencies
private Set<org.eclipse.aether.artifact.Artifact> getDependencies(org.apache.maven.artifact.Artifact inputArtifact) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
resolveArtifact
private org.eclipse.aether.artifact.Artifact resolveArtifact(org.eclipse.aether.artifact.Artifact inputArtifact) -
isWindows
private static boolean isWindows() -
quoteIfNecessary
-