Class TestResourcesHelper

java.lang.Object
io.micronaut.maven.testresources.TestResourcesHelper

public class TestResourcesHelper extends Object
Utility class to stop Test Resources service.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestResourcesHelper(boolean enabled, boolean shared, File buildDirectory, Integer explicitPort, Integer clientTimeout, Integer serverIdleTimeoutMinutes, org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, DependencyResolutionService dependencyResolutionService, org.apache.maven.toolchain.ToolchainManager toolchainManager, String testResourcesVersion, boolean classpathInference, List<org.apache.maven.model.Dependency> testResourcesDependencies, String sharedServerNamespace, boolean debugServer, boolean foreground)
     
    TestResourcesHelper(org.apache.maven.execution.MavenSession mavenSession, boolean enabled, boolean shared, File buildDirectory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    computeSystemProperties(io.micronaut.testresources.buildtools.ServerSettings serverSettings)
    Computes the system properties to set for the test resources client to be able to connect to the server.
    void
    setSharedServerNamespace(String sharedServerNamespace)
     
    void
    Starts the Test Resources Service.
    void
    stop(boolean quiet)
    Contains the logic to stop the Test Resources Service.

    Methods inherited from class java.lang.Object

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

    • TestResourcesHelper

      public TestResourcesHelper(boolean enabled, boolean shared, File buildDirectory, Integer explicitPort, Integer clientTimeout, Integer serverIdleTimeoutMinutes, org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, DependencyResolutionService dependencyResolutionService, org.apache.maven.toolchain.ToolchainManager toolchainManager, String testResourcesVersion, boolean classpathInference, List<org.apache.maven.model.Dependency> testResourcesDependencies, String sharedServerNamespace, boolean debugServer, boolean foreground)
    • TestResourcesHelper

      public TestResourcesHelper(org.apache.maven.execution.MavenSession mavenSession, boolean enabled, boolean shared, File buildDirectory)
  • Method Details

    • start

      public void start() throws org.apache.maven.plugin.MojoExecutionException
      Starts the Test Resources Service.
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • computeSystemProperties

      public Map<String,String> computeSystemProperties(io.micronaut.testresources.buildtools.ServerSettings serverSettings)
      Computes the system properties to set for the test resources client to be able to connect to the server.
      Parameters:
      serverSettings - The server settings
      Returns:
      The system properties
    • stop

      public void stop(boolean quiet) throws org.apache.maven.plugin.MojoExecutionException
      Contains the logic to stop the Test Resources Service.
      Parameters:
      quiet - Whether to perform logging or not.
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • setSharedServerNamespace

      public void setSharedServerNamespace(String sharedServerNamespace)
      Parameters:
      sharedServerNamespace - The shared server namespace (if any).