Class AbstractSchemaMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.permazen.maven.AbstractSchemaMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractMainSchemaMojo

public abstract class AbstractSchemaMojo extends org.apache.maven.plugin.AbstractMojo
Generates a schema XML file from a set of Permazen model classes.
  • Field Details

    • packages

      @Parameter protected String[] packages
      Specifies Java package names under which to search for classes with @PermazenType annotations.

      If no <classes> or <packages> are configured, then by default this plugin searches all classes in the output directory.

    • classes

      @Parameter protected String[] classes
      Specifies the names of specific Java classes to search for @PermazenType annotations.

      If no <classes> or <packages> are configured, then by default this plugin searches all classes in the output directory.

    • encodingRegistryClass

      @Parameter protected String encodingRegistryClass

      The EncodingRegistry to use for looking up field encodings. By default, a DefaultEncodingRegistry is used.

      To configure a custom EncodingRegistry, specify its class name like this:

       <configuration>
           <encodingRegistryClass>com.example.MyEncodingRegistry</encodingRegistryClass>
           ...
       </configuration>
       
      The specified class (com.example.MyEncodingRegistry in this example) must be available either as part of the project being built or in one of the project's dependencies.
    • schemaIdProperty

      @Parameter(defaultValue="") protected String schemaIdProperty
      The name of a Maven property to set to the auto-generated schema ID. This is a string that is a unique hash of the schema and which looks like "Schema_12e983a72e72ed56741ddc45e47d3377".
    • project

      @Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
  • Constructor Details

    • AbstractSchemaMojo

      public AbstractSchemaMojo()
  • Method Details

    • getClassOutputDirectory

      protected abstract File getClassOutputDirectory()
    • addDependencyClasspathElements

      protected abstract void addDependencyClasspathElements(List<String> elements) throws org.apache.maven.artifact.DependencyResolutionRequiredException
      Throws:
      org.apache.maven.artifact.DependencyResolutionRequiredException
    • execute

      protected abstract void execute(SchemaUtility schemaUtility) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • execute

      public final void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException