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 Details

    • format

      @Parameter(defaultValue="openapi", property="schema.format") private String format
    • outputDirectory

      @Parameter(defaultValue="${project.build.directory}${file.separator}generated-sources", required=true) private File outputDirectory
    • groupDirectoryPerConnector

      @Parameter(defaultValue="false") private boolean groupDirectoryPerConnector
    • filenamePrefix

      @Parameter(defaultValue="") private String filenamePrefix
    • filenameSuffix

      @Parameter(defaultValue="") private String filenameSuffix
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
      Gives 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.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • exec

      private int exec(String className, String classPath, List<String> jvmArgs, List<String> args) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • getClassPath

      private String getClassPath() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getGeneratorPluginArtifact

      private org.apache.maven.artifact.Artifact getGeneratorPluginArtifact()
      Returns the schema generator plug-in artifact
    • classPathEntryFor

      private String classPathEntryFor(Class<?> clazz)
    • 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

      private static String quoteIfNecessary(String value)