Class ScriptCommandMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.mybatis.maven.mvnmigrate.ScriptCommandMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="script") public final class ScriptCommandMojo extends org.apache.maven.plugin.AbstractMojo
Goal which executes the ibatis migration script command.
  • Field Summary

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.ibatis.migration.commands.ScriptCommand
    createCommandClass(org.apache.ibatis.migration.options.SelectedOptions options)
    Creates the specific mojo command.
    void
    execute the command.
    protected ResourceBundle
    getBundle(Locale locale)
    The current locale.
    protected org.apache.ibatis.migration.commands.ScriptCommand
    Return the command.
    protected String
     
    protected Locale
     
    protected File
     
    protected void
    Initialize the MyBatis Migration command.
    protected boolean
     
    protected boolean
    Test if the skip flag is setted.

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScriptCommandMojo

      public ScriptCommandMojo()
  • Method Details

    • createCommandClass

      protected org.apache.ibatis.migration.commands.ScriptCommand createCommandClass(org.apache.ibatis.migration.options.SelectedOptions options)
      Creates the specific mojo command.
      Parameters:
      options - the options
      Returns:
      The command created.
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      execute the command.
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • init

      protected void init() throws org.apache.maven.plugin.MojoFailureException
      Initialize the MyBatis Migration command.
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • getLocale

      protected Locale getLocale()
    • getRepository

      protected File getRepository()
    • getEnvironment

      protected String getEnvironment()
    • isForce

      protected boolean isForce()
    • getCommand

      protected org.apache.ibatis.migration.commands.ScriptCommand getCommand()
      Return the command.
      Returns:
      BaseCommand the command created.
    • isSkip

      protected boolean isSkip()
      Test if the skip flag is setted.
      Returns:
      the skip flag.
    • getBundle

      protected ResourceBundle getBundle(Locale locale)
      The current locale.
      Parameters:
      locale - the locale
      Returns:
      the bundle