spring-boot:start

Full name:

org.springframework.boot:spring-boot-maven-plugin:1.3.0.M1:start

Description:

Start a spring application. Contrary to the run goal, this does not block and allows other goal to operate on the application. This goal is typically used in integration test scenario where the application is started before a test suite and stopped after.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Since version: 1.3.0.
  • Binds by default to the lifecycle phase: pre-integration-test.

Required Parameters

Name Type Since Description
classesDirectory File 1.0 Directory containing the classes and resource files that should be packaged into the archive.
Default value is: ${project.build.outputDirectory}.

Optional Parameters

Name Type Since Description
addResources boolean 1.0 Add maven resources to the classpath directly, this allows live in-place editing of resources. Duplicate resources are removed from target/classes to prevent them to appear twice if ClassLoader.getResources() is called.
Default value is: true.
User property is: run.addResources.
agent File[] 1.0 Path to agent jar. NOTE: the use of agents means that processes will be started by forking a new JVM.
User property is: run.agent.
arguments String[] 1.0 Arguments that should be passed to the application. On command line use commas to separate multiple arguments.
User property is: run.arguments.
excludeArtifactIds String 1.1 Comma separated list of artifact names to exclude (exact match).
User property is: excludeArtifactIds.
excludeGroupIds String 1.1 Comma separated list of groupId names to exclude (exact match).
User property is: excludeGroupIds.
excludes List 1.1 Collection of artifact definitions to exclude. The Exclude element defines a groupId and artifactId mandatory properties and an optional classifier property.
folders String[] 1.0 Additional folders besides the classes directory that should be added to the classpath.
fork Boolean 1.2 Flag to indicate if the run processes should be forked. By default process forking is only used if an agent or jvmArguments are specified.
User property is: fork.
includes List 1.2 Collection of artifact definitions to include. The Include element defines a groupId and artifactId mandatory properties and an optional classifier property.
jmxName String 1.3.0 The JMX name of the automatically deployed MBean managing the lifecycle of the spring application.
jmxPort int 1.3.0 The port to use to expose the platform MBeanServer if the application needs to be forked.
jvmArguments String 1.1 JVM arguments that should be associated with the forked process used to run the application. On command line, make sure to wrap multiple values between quotes.
User property is: run.jvmArguments.
mainClass String 1.0 The name of the main class. If not specified the first compiled class found that contains a 'main' method will be used.
maxAttempts int 1.3.0 The maximum number of attempts to check if the spring application is ready. Combined with the "wait" argument, this gives a global timeout value (30 sec by default)
noverify Boolean 1.0 Flag to say that the agent requires -noverify.
User property is: run.noverify.
wait long 1.3.0 The number of milli-seconds to wait between each attempt to check if the spring application is ready.

Parameter Details

addResources:

Add maven resources to the classpath directly, this allows live in-place editing of resources. Duplicate resources are removed from target/classes to prevent them to appear twice if ClassLoader.getResources() is called.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: run.addResources
  • Default: true

agent:

Path to agent jar. NOTE: the use of agents means that processes will be started by forking a new JVM.
  • Type: java.io.File[]
  • Since: 1.0
  • Required: No
  • User Property: run.agent

arguments:

Arguments that should be passed to the application. On command line use commas to separate multiple arguments.
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No
  • User Property: run.arguments

classesDirectory:

Directory containing the classes and resource files that should be packaged into the archive.
  • Type: java.io.File
  • Since: 1.0
  • Required: Yes
  • Default: ${project.build.outputDirectory}

excludeArtifactIds:

Comma separated list of artifact names to exclude (exact match).
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • User Property: excludeArtifactIds

excludeGroupIds:

Comma separated list of groupId names to exclude (exact match).
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • User Property: excludeGroupIds

excludes:

Collection of artifact definitions to exclude. The Exclude element defines a groupId and artifactId mandatory properties and an optional classifier property.
  • Type: java.util.List
  • Since: 1.1
  • Required: No

folders:

Additional folders besides the classes directory that should be added to the classpath.
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

fork:

Flag to indicate if the run processes should be forked. By default process forking is only used if an agent or jvmArguments are specified.
  • Type: java.lang.Boolean
  • Since: 1.2
  • Required: No
  • User Property: fork

includes:

Collection of artifact definitions to include. The Include element defines a groupId and artifactId mandatory properties and an optional classifier property.
  • Type: java.util.List
  • Since: 1.2
  • Required: No

jmxName:

The JMX name of the automatically deployed MBean managing the lifecycle of the spring application.
  • Type: java.lang.String
  • Since: 1.3.0
  • Required: No

jmxPort:

The port to use to expose the platform MBeanServer if the application needs to be forked.
  • Type: int
  • Since: 1.3.0
  • Required: No

jvmArguments:

JVM arguments that should be associated with the forked process used to run the application. On command line, make sure to wrap multiple values between quotes.
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • User Property: run.jvmArguments

mainClass:

The name of the main class. If not specified the first compiled class found that contains a 'main' method will be used.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

maxAttempts:

The maximum number of attempts to check if the spring application is ready. Combined with the "wait" argument, this gives a global timeout value (30 sec by default)
  • Type: int
  • Since: 1.3.0
  • Required: No

noverify:

Flag to say that the agent requires -noverify.
  • Type: java.lang.Boolean
  • Since: 1.0
  • Required: No
  • User Property: run.noverify

wait:

The number of milli-seconds to wait between each attempt to check if the spring application is ready.
  • Type: long
  • Since: 1.3.0
  • Required: No