Package com.jcabi.mysql.maven.plugin
Class RunMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.jcabi.mysql.maven.plugin.RunMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(threadSafe=true, name="run", defaultPhase=PRE_INTEGRATION_TEST) public final class RunMojo extends org.apache.maven.plugin.AbstractMojo
Run MySQL in background and don't stop it when Maven is finished.- Since:
- 0.4
-
-
Constructor Summary
Constructors Constructor Description RunMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
clear()
If true, always delete existing database files and create a new instance from scratch.Config
config()
Get configuration.File
dataDir()
Get directory with MySQL data.File
distDir()
Get directory with MySQL dist.void
execute()
void
run(Instances instances)
Run custom functionality.void
setSkip(boolean skp)
Set skip option.File
socketFile()
Get MySQL socket location.
-
-
-
Method Detail
-
run
public void run(Instances instances) throws org.apache.maven.plugin.MojoFailureException
Run custom functionality.- Parameters:
instances
- Instances to work with- Throws:
org.apache.maven.plugin.MojoFailureException
- If fails
-
setSkip
public void setSkip(boolean skp)
Set skip option.- Parameters:
skp
- Shall we skip execution?
-
execute
public void execute() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
distDir
public File distDir() throws org.apache.maven.plugin.MojoFailureException
Get directory with MySQL dist.- Returns:
- Directory
- Throws:
org.apache.maven.plugin.MojoFailureException
- If fails
-
dataDir
public File dataDir()
Get directory with MySQL data.- Returns:
- Directory
-
socketFile
public File socketFile()
Get MySQL socket location.- Returns:
- Overridden socket location (null for default)
-
clear
public boolean clear()
If true, always delete existing database files and create a new instance from scratch. If false, try to reuse existing files.- Returns:
- If existing database files should be deleted.
-
config
public Config config()
Get configuration.- Returns:
- Configuration
-
-