coremedia-application:find-filter-tokens

Full name:

com.coremedia.maven:coremedia-application-maven-plugin:3.0.1:find-filter-tokens

Description:

This mojo parses all configuration files found below the configured outputDirectory for ant-style filter tokens. If any are found it prints out the files containing tokens and the tokens itself. In addition it creates a properties file below your projects build directory named like the output directory

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 2.4.
  • Binds by default to the lifecycle phase: prepare-package.

Optional Parameters

Name Type Since Description
<allowFilterTokens> String 2.6 Allow tokens matching this pattern. Use this in conjunction with the failOnFoundTokens parameter set to true.
Default value is: .*.
<attachConfigurationPropertiesTemplate> boolean 2.4 Attach the generated properties containing all token properties required for postinstall configuration.
Default value is: true.
<configurationTemplateFile> File 2.4 configures where the property file should be written to.
Default value is: ${project.build.directory}/${project.build.finalName}/configuration-template.properties.
<configurationTemplateProperties> Map 2.7 Properties that should be appended to the default configuration template along the ones for which filter tokens are found.
 <configurationTemplateProperties>
   <key>defaultValue</key>
   <another-key>another-defaultValue</another-key>
 </configurationTemplateProperties>


<createTokenizedConfiguration> boolean 2.4 Toggles the creation of a folder containing all files with tokens.
Default value is: true.
<defaultConfigurationProperties> File 2.4 A file containing the default values for filtered tokens and optional comments to be added to the configuration template being generated. Comments will be added too.
Default value is: ${project.basedir}/src/main/filters/default-deployment.properties.
<defaultTokens> String[] 2.7 Token to append to the list of found tokens. Use this if you need the property not for filtering but for installation control flow, eg. you need to toggle something during the installation and want to provide a default value this way.
 <defaultTokens>
   <defaultToken>configure.TOKEN_A</defaultToken>
   <defaultToken>configure.TOKEN_B</defaultToken>
 </defaultToken>


<failOnFoundTokens> boolean 2.4 Fail the build if there are still tokens found in the packaged application.
Default value is: false.
<ignoreFilterTokens> String 2.6 Ignore tokens matching this pattern.
<outputDirectory> File 2.0 Location of the assembled application.

Default value is: ${project.build.directory}/${project.build.finalName}.
<tokenListProperty> String 2.4 The name of the property containing the found tokens as a spaces separated list.
Default value is: configuration.tokens.
<tokenScanPattern> String[] 2.4 Comma separated list of patterns to scan for tokens. defaults to DEFAULT_FILTERING_PATTERN
<tokenizedConfigurationDir> File 2.4 The directory where all configuration files with tokens should be copied to.
Default value is: ${project.build.directory}/${project.build.finalName}/META-INF/configuration-templates.

Parameter Details

<allowFilterTokens>

Allow tokens matching this pattern. Use this in conjunction with the failOnFoundTokens parameter set to true.
  • Type: java.lang.String
  • Since: 2.6
  • Required: No
  • Default: .*

<attachConfigurationPropertiesTemplate>

Attach the generated properties containing all token properties required for postinstall configuration.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • Default: true

<configurationTemplateFile>

configures where the property file should be written to.
  • Type: java.io.File
  • Since: 2.4
  • Required: No
  • Default: ${project.build.directory}/${project.build.finalName}/configuration-template.properties

<configurationTemplateProperties>

Properties that should be appended to the default configuration template along the ones for which filter tokens are found.
 <configurationTemplateProperties>
   <key>defaultValue</key>
   <another-key>another-defaultValue</another-key>
 </configurationTemplateProperties>

  • Type: java.util.Map
  • Since: 2.7
  • Required: No

<createTokenizedConfiguration>

Toggles the creation of a folder containing all files with tokens.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • Default: true

<defaultConfigurationProperties>

A file containing the default values for filtered tokens and optional comments to be added to the configuration template being generated. Comments will be added too.
  • Type: java.io.File
  • Since: 2.4
  • Required: No
  • Default: ${project.basedir}/src/main/filters/default-deployment.properties

<defaultTokens>

Token to append to the list of found tokens. Use this if you need the property not for filtering but for installation control flow, eg. you need to toggle something during the installation and want to provide a default value this way.
 <defaultTokens>
   <defaultToken>configure.TOKEN_A</defaultToken>
   <defaultToken>configure.TOKEN_B</defaultToken>
 </defaultToken>

  • Type: java.lang.String[]
  • Since: 2.7
  • Required: No

<failOnFoundTokens>

Fail the build if there are still tokens found in the packaged application.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • Default: false

<ignoreFilterTokens>

Ignore tokens matching this pattern.
  • Type: java.lang.String
  • Since: 2.6
  • Required: No

<outputDirectory>

Location of the assembled application.
  • Type: java.io.File
  • Since: 2.0
  • Required: No
  • Default: ${project.build.directory}/${project.build.finalName}

<tokenListProperty>

The name of the property containing the found tokens as a spaces separated list.
  • Type: java.lang.String
  • Since: 2.4
  • Required: No
  • Default: configuration.tokens

<tokenScanPattern>

Comma separated list of patterns to scan for tokens. defaults to DEFAULT_FILTERING_PATTERN
  • Type: java.lang.String[]
  • Since: 2.4
  • Required: No

<tokenizedConfigurationDir>

The directory where all configuration files with tokens should be copied to.
  • Type: java.io.File
  • Since: 2.4
  • Required: No
  • Default: ${project.build.directory}/${project.build.finalName}/META-INF/configuration-templates