Fork me on GitHub

mn:start-testresources-service

Full name:

io.micronaut.build:micronaut-maven-plugin:3.5.0: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.

Required Parameters

Name Type Since Description
<buildDirectory> File - (no description)
Default value is: ${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 is: 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 value is: true.
<clientTimeout> Integer - Configures the maximum amount of time to wait for the server to start a test resource. Some containeres may take a long amount of time to start with slow internet connections.
Default value is: 60.
User property is: micronaut.test.resources.client-timeout.
<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 is: micronaut.test.resources.port.
<keepAlive> Boolean - Whether the test resources service should be kept alive after the build.
Default value is: false.
User property is: keepAlive.
<shared> boolean - Whether the test resources service should be shared between independent builds (e.g different projects, even built with different build tools).
Default value is: false.
User property is: micronaut.test.resources.shared.
<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 value is: false.
User property is: 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 containeres 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

<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

<keepAlive>

Whether the test resources service should be kept alive after the build.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: keepAlive
  • Default: false

<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

<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