Fork me on GitHub

mn:start-testresources-service

Full name:

io.micronaut.maven:micronaut-maven-plugin:4.7.1:start-testresources-service

Description:

Starts the Micronaut test resources server.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile+runtime.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 3.5.1.

Required Parameters

Name Type Since Description
<buildDirectory> File - No description.
Default: ${project.build.directory}
<testResourcesVersion> String - Micronaut Test Resources version. Should be defined by the Micronaut BOM, but this parameter can be used to define a different version.
User Property: micronaut.test.resources.version

Optional Parameters

Name Type Since Description
<classpathInference> Boolean - If set to true, Micronaut will attempt to infer which dependencies should be added to the Test Resources server classpath, based on the project dependencies. In general the result will consist of modules from the test-resources project, but it may consist of additional entries, for example database drivers.
Default: true
<clientTimeout> Integer - Configures the maximum amount of time to wait for the server to start a test resource. Some containers may take a long amount of time to start with slow internet connections.
Default: 60
User Property: micronaut.test.resources.client-timeout
<debugServer> boolean 4.2.0 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.
Default: false
User Property: micronaut.test.resources.debug-server
<explicitPort> Integer - By default, the Test Resources server will be started on a random (available) port, but it can be set a fixed port by using this parameter.
User Property: micronaut.test.resources.port
<foreground> boolean 4.7.0 Whether the test resources server should be started in the foreground.
Default: false
User Property: micronaut.test.resources.foreground
<serverIdleTimeoutMinutes> Integer 4.2.0 Configures the duration after which the test resources service will automatically shut down if it doesn't get any request.
User Property: micronaut.test.resources.server-idle-timeout-minutes
<shared> boolean - Whether the test resources service should be shared between independent builds (e.g. different projects, even built with different build tools).
Default: false
User Property: micronaut.test.resources.shared
<sharedServerNamespace> String 3.5.1 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.
User Property: micronaut.test.resources.namespace
<testResourcesDependencies> List<Dependency> - Additional dependencies to add to the Test Resources server classpath when not using classpath inference, or when the inference doesn't produce the desired result.
<testResourcesEnabled> boolean - Whether to enable or disable Micronaut test resources support.
Default: false
User Property: micronaut.test.resources.enabled

Parameter Details

<buildDirectory>

No description.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}

<classpathInference>

If set to true, Micronaut will attempt to infer which dependencies should be added to the Test Resources server classpath, based on the project dependencies. In general the result will consist of modules from the test-resources project, but it may consist of additional entries, for example database drivers.
  • Type: java.lang.Boolean
  • Required: No
  • Default: true

<clientTimeout>

Configures the maximum amount of time to wait for the server to start a test resource. Some containers may take a long amount of time to start with slow internet connections.
  • Type: java.lang.Integer
  • Required: No
  • User Property: micronaut.test.resources.client-timeout
  • Default: 60

<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.
  • Type: boolean
  • Since: 4.2.0
  • Required: No
  • User Property: micronaut.test.resources.debug-server
  • Default: false

<explicitPort>

By default, the Test Resources server will be started on a random (available) port, but it can be set a fixed port by using this parameter.
  • Type: java.lang.Integer
  • Required: No
  • User Property: micronaut.test.resources.port

<foreground>

Whether the test resources server should be started in the foreground.
  • Type: boolean
  • Since: 4.7.0
  • Required: No
  • User Property: micronaut.test.resources.foreground
  • Default: false

<serverIdleTimeoutMinutes>

Configures the duration after which the test resources service will automatically shut down if it doesn't get any request.
  • Type: java.lang.Integer
  • Since: 4.2.0
  • Required: No
  • User Property: micronaut.test.resources.server-idle-timeout-minutes

<shared>

Whether the test resources service should be shared between independent builds (e.g. different projects, even built with different build tools).
  • Type: boolean
  • Required: No
  • User Property: micronaut.test.resources.shared
  • Default: false

<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.
  • Type: java.lang.String
  • Since: 3.5.1
  • Required: No
  • User Property: micronaut.test.resources.namespace

<testResourcesDependencies>

Additional dependencies to add to the Test Resources server classpath when not using classpath inference, or when the inference doesn't produce the desired result.
  • Type: java.util.List<org.apache.maven.model.Dependency>
  • Required: No

<testResourcesEnabled>

Whether to enable or disable Micronaut test resources support.
  • Type: boolean
  • Required: No
  • User Property: micronaut.test.resources.enabled
  • Default: false

<testResourcesVersion>

Micronaut Test Resources version. Should be defined by the Micronaut BOM, but this parameter can be used to define a different version.
  • Type: java.lang.String
  • Required: Yes
  • User Property: micronaut.test.resources.version