Fork me on GitHub

properties:write-prefixed-properties

Full name:

org.codehaus.mojo:properties-maven-plugin:1.5.0:write-prefixed-properties

Description:

Writes project properties having keys with specific or common prefix to a file, removing this prefix. Can be used in association with keyPrefix attribute on ReadPropertiesMojo, to isolate properties for specific environment for example.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.4.1.

Required Parameters

Name Type Since Description
<keyPrefix> String - Prefix of the properties that should be written. Can be useful to write properties with different prefix into different files removing this prefix. A property with this prefix will be written even if another property with the common prefix exists.
<outputFile> File 1.0.0 Output file for storing properties.
User Property: properties.outputFile

Optional Parameters

Name Type Since Description
<commonKeyPrefix> String - Common prefix of the properties that should be written. Can be useful to write properties with common prefix into different files removing this prefix. A property with this common prefix will be ignored if another property with the (specific) prefix exists.
Default: *.
<encoding> String 1.4.0 Encoding of the output file, for example UTF-8. When not set, .properties files are written as ISO-8859-1, as the JDK does.

Parameter Details

<commonKeyPrefix>

Common prefix of the properties that should be written. Can be useful to write properties with common prefix into different files removing this prefix. A property with this common prefix will be ignored if another property with the (specific) prefix exists.
  • Type: java.lang.String
  • Required: No
  • Default: *.

<encoding>

Encoding of the output file, for example UTF-8. When not set, .properties files are written as ISO-8859-1, as the JDK does.
  • Type: java.lang.String
  • Since: 1.4.0
  • Required: No

<keyPrefix>

Prefix of the properties that should be written. Can be useful to write properties with different prefix into different files removing this prefix. A property with this prefix will be written even if another property with the common prefix exists.
  • Type: java.lang.String
  • Required: Yes

<outputFile>

Output file for storing properties.
  • Type: java.io.File
  • Since: 1.0.0
  • Required: Yes
  • User Property: properties.outputFile