Class StartMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(threadSafe=true,
          name="start",
          defaultPhase=PRE_INTEGRATION_TEST)
    public final class StartMojo
    extends org.apache.maven.plugin.AbstractMojo
    Starts MySQL.
    Since:
    0.1
    • Constructor Detail

      • StartMojo

        public StartMojo()
    • 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