Fork me on GitHub

build-helper:reserve-network-port

Full name:

org.codehaus.mojo:build-helper-maven-plugin:3.5.0:reserve-network-port

Description:

Reserve a list of random and not in use network ports and place them in a configurable project properties.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.2.
  • Binds by default to the lifecycle phase: process-test-classes.

Optional Parameters

Name Type Since Description
<maxPortNumber> Integer 1.8 Specify this if you want the port be chosen with a number lower than that one.
<minPortNumber> Integer 1.8 Specify this if you want the port be chosen with a number higher than that one.

If maxPortNumber is specified, defaults to 1024.


<outputFile> File 1.2 Output file to write the generated properties to. if not given, they are written to Maven project
<portNames> String[] 1.2 A List to property names to be placed in Maven project. At least one of #urls or #portNames has to be specified.
<randomPort> boolean 1.10 Specify true or false if you want the port selection randomized.
<urls> String[] 1.11 A List of urls to resource where list of name could be found. Can be in form of classpath:com/myproject/names.txt . At least one of #urls or #portNames has to be specified.

Parameter Details

<maxPortNumber>

Specify this if you want the port be chosen with a number lower than that one.
  • Type: java.lang.Integer
  • Since: 1.8
  • Required: No

<minPortNumber>

Specify this if you want the port be chosen with a number higher than that one.

If maxPortNumber is specified, defaults to 1024.

  • Type: java.lang.Integer
  • Since: 1.8
  • Required: No

<outputFile>

Output file to write the generated properties to. if not given, they are written to Maven project
  • Type: java.io.File
  • Since: 1.2
  • Required: No

<portNames>

A List to property names to be placed in Maven project. At least one of #urls or #portNames has to be specified.
  • Type: java.lang.String[]
  • Since: 1.2
  • Required: No

<randomPort>

Specify true or false if you want the port selection randomized.
  • Type: boolean
  • Since: 1.10
  • Required: No

<urls>

A List of urls to resource where list of name could be found. Can be in form of classpath:com/myproject/names.txt . At least one of #urls or #portNames has to be specified.
  • Type: java.lang.String[]
  • Since: 1.11
  • Required: No