Package org.mybatis.maven.mvnmigrate
Class BootstrapCommandMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.mybatis.maven.mvnmigrate.BootstrapCommandMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="bootstrap")
public final class BootstrapCommandMojo
extends org.apache.maven.plugin.AbstractMojo
Goal which execute the ibatis migration bootstrap command.
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.ibatis.migration.commands.BootstrapCommandcreateCommandClass(org.apache.ibatis.migration.options.SelectedOptions options) Creates the specific mojo command.voidexecute()execute the command.protected ResourceBundleThe current locale.protected org.apache.ibatis.migration.commands.BootstrapCommandReturn the command.protected Stringprotected Localeprotected Fileprotected voidinit()Initialize the MyBatis Migration command.protected booleanisForce()protected booleanisSkip()Test if the skip flag is setted.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
BootstrapCommandMojo
public BootstrapCommandMojo()
-
-
Method Details
-
createCommandClass
protected org.apache.ibatis.migration.commands.BootstrapCommand 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.MojoFailureExceptionexecute the command.- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
init
protected void init() throws org.apache.maven.plugin.MojoFailureExceptionInitialize the MyBatis Migration command.- Throws:
org.apache.maven.plugin.MojoFailureException
-
getLocale
-
getRepository
-
getEnvironment
-
isForce
protected boolean isForce() -
getCommand
protected org.apache.ibatis.migration.commands.BootstrapCommand getCommand()Return the command.- Returns:
BaseCommandthe command created.
-
isSkip
protected boolean isSkip()Test if the skip flag is setted.- Returns:
- the skip flag.
-
getBundle
The current locale.- Parameters:
locale- the locale- Returns:
- the bundle
-