Class TestResourcesConfiguration

java.lang.Object
io.micronaut.maven.testresources.TestResourcesConfiguration
Direct Known Subclasses:
AbstractTestResourcesMojo

public class TestResourcesConfiguration extends Object
Base configuration class for Test Resources.
Since:
3.5.1
Author:
Álvaro Sánchez-Mariscal
  • Field Details

    • DISABLED

      public static final String DISABLED
      See Also:
    • CONFIG_PROPERTY_PREFIX

      public static final String CONFIG_PROPERTY_PREFIX
      See Also:
    • testResourcesEnabled

      @Parameter(property="micronaut.test.resources.enabled", defaultValue="false") protected boolean testResourcesEnabled
      Whether to enable or disable Micronaut test resources support.
    • shared

      @Parameter(property="micronaut.test.resources.shared", defaultValue="false") protected boolean shared
      Whether the test resources service should be shared between independent builds (e.g different projects, even built with different build tools).
    • sharedServerNamespace

      @Parameter(property="micronaut.test.resources.namespace") protected String sharedServerNamespace
      Allows configuring a namespace for the shared test resources server. This can be used in case it makes sense to have different instances of shared services, for example when independent builds sets share different services.
      Since:
      3.5.1
    • debugServer

      @Parameter(property="micronaut.test.resources.debug-server", defaultValue="false") protected boolean debugServer
      Allows starting the test resources server in debug mode. The server will be started with the ability to attach a remote debugger on port 8000.
      Since:
      4.2.0
  • Constructor Details

  • Method Details

    • isTestResourcesEnabled

      public boolean isTestResourcesEnabled()
      Returns:
      Whether to enable or disable Micronaut test resources support.
    • isShared

      public boolean isShared()
      Returns:
      Whether the test resources service should be shared between independent builds.
    • getSharedServerNamespace

      Returns:
      The shared server namespace (if any).
    • setTestResourcesEnabled

      public void setTestResourcesEnabled(boolean testResourcesEnabled)
      Whether to enable or disable Micronaut test resources support.
      Parameters:
      testResourcesEnabled - enabled flag
    • setShared

      public void setShared(boolean shared)
      Whether the test resources service should be shared between independent builds.
      Parameters:
      shared - shared flag
    • setSharedServerNamespace

      public void setSharedServerNamespace(String sharedServerNamespace)
      The shared server namespace (if any).
      Parameters:
      sharedServerNamespace - the shared server namespace to be set
    • setDebugServer

      public void setDebugServer(boolean debugServer)
      Whether to start the test resources server in debug mode.
      Parameters:
      debugServer - debug flag