i18n:parserStruts2

Full name:

org.nuiton.i18n:i18n-maven-plugin:4.1:parserStruts2

Description:

To parse struts2 jsp and obtain all keys.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 2.5.
  • Binds by default to the lifecycle phase: generate-resources.

Required Parameters

Name Type Since Description
<bundles> String 2.5 Locales to treate, separated by comma. Example :
fr_FR,en_GB

Default value is: fr_FR,en_GB.
User property is: i18n.bundles.
<defaultIncludes> String 2.5 Default included files to process (ant-like expression). Note: default value is **\/*.jsp
Default value is: **/*.jsp.
User property is: i18n.defaultIncludes.
<encoding> String 2.5 Encoding used to load and store properties.
Default value is: ${project.build.sourceEncoding}.
User property is: i18n.encoding.
<out> File 2.5 Directory where to generate i18n files.
Default value is: ${basedir}/target/generated-sources/i18n.
User property is: i18n.out.
<src> File 2.5 Directory where to find project i18n files.
Default value is: ${basedir}/src/main/resources/i18n.
User property is: i18n.src.

Optional Parameters

Name Type Since Description
<acceptKeyFormat> String 2.5 A regex pattern to accept incoming keys. Only incoming keys which match the pattern will be kept.
User property is: i18n.acceptKeyFormat.
<backupGetter> boolean 1.0.2 Flag to save previous getter in a backup before doing parsing. Note: by default, do not perform backup (but it was here originaly so let it possible...)
Default value is: false.
User property is: i18n.backupGetter.
<cp> File 2.5 Build directory (used to know if files in sources are up-to-date).
Default value is: ${basedir}/target/classes.
User property is: i18n.cp.
<defaultBasedir> File 2.5 Root directory of the default entry.
Default value is: ${basedir}/src/main/webapp.
User property is: i18n.defaultBasedir.
<entries> I18nSourceEntry[] 2.5 Source entries (src+includes+excludes) to process.
User property is: i18n.entries.
<explodedWarPath> File 2.5 Exploded war Build directory (used to know if files in sources are up-to-date).
Default value is: ${project.build.directory}/${project.artifactId}-{project.version}.
User property is: i18n.explodedWarPath.
<force> boolean 1.2 To force reparse of all sources.
Default value is: false.
User property is: i18n.force.
<outputGetter> String 2.0 Defines the file name of the getter where to put detected i18n keys while getter phase.
Default value is: struts2.getter.
User property is: i18n.outputGetter.
<showTouchedFiles> boolean 0.9 Flag to display touched files while parsing. Note: the value will be always true if verbose is set at true.
Default value is: ${maven.verbose}.
User property is: i18n.showTouchedFiles.
<silent> boolean 1.0.0-rc-5 Silent flag to see only errors in console.
Default value is: false.
User property is: i18n.silent.
<strictMode> boolean 2.5 Strict mode to only keep in user i18n detected i18n keys and remove obsolete keys. Note : By default not active. Use this with care since it can delete keys. Moreover if this flag is activated, then all files will be parsed.
Default value is: false.
User property is: i18n.strictMode.
<treateDefaultEntry> boolean 2.5 To treat default entry offered by the mojo.
Default value is: true.
User property is: i18n.treateDefaultEntry.
<verbose> boolean 2.5 Verbose flag. Note : if not setted, we used the maven.verbose property.
Default value is: ${maven.verbose}.
User property is: i18n.verbose.

Parameter Details

<acceptKeyFormat>

A regex pattern to accept incoming keys. Only incoming keys which match the pattern will be kept.
  • Type: java.lang.String
  • Since: 2.5
  • Required: No
  • User Property: i18n.acceptKeyFormat

<backupGetter>

Flag to save previous getter in a backup before doing parsing. Note: by default, do not perform backup (but it was here originaly so let it possible...)
  • Type: boolean
  • Since: 1.0.2
  • Required: No
  • User Property: i18n.backupGetter
  • Default: false

<bundles>

Locales to treate, separated by comma. Example :
fr_FR,en_GB
  • Type: java.lang.String
  • Since: 2.5
  • Required: Yes
  • User Property: i18n.bundles
  • Default: fr_FR,en_GB

<cp>

Build directory (used to know if files in sources are up-to-date).
  • Type: java.io.File
  • Since: 2.5
  • Required: No
  • User Property: i18n.cp
  • Default: ${basedir}/target/classes

<defaultBasedir>

Root directory of the default entry.
  • Type: java.io.File
  • Since: 2.5
  • Required: No
  • User Property: i18n.defaultBasedir
  • Default: ${basedir}/src/main/webapp

<defaultIncludes>

Default included files to process (ant-like expression). Note: default value is **\/*.jsp
  • Type: java.lang.String
  • Since: 2.5
  • Required: Yes
  • User Property: i18n.defaultIncludes
  • Default: **/*.jsp

<encoding>

Encoding used to load and store properties.
  • Type: java.lang.String
  • Since: 2.5
  • Required: Yes
  • User Property: i18n.encoding
  • Default: ${project.build.sourceEncoding}

<entries>

Source entries (src+includes+excludes) to process.
  • Type: org.nuiton.i18n.plugin.parser.I18nSourceEntry[]
  • Since: 2.5
  • Required: No
  • User Property: i18n.entries

<explodedWarPath>

Exploded war Build directory (used to know if files in sources are up-to-date).
  • Type: java.io.File
  • Since: 2.5
  • Required: No
  • User Property: i18n.explodedWarPath
  • Default: ${project.build.directory}/${project.artifactId}-{project.version}

<force>

To force reparse of all sources.
  • Type: boolean
  • Since: 1.2
  • Required: No
  • User Property: i18n.force
  • Default: false

<out>

Directory where to generate i18n files.
  • Type: java.io.File
  • Since: 2.5
  • Required: Yes
  • User Property: i18n.out
  • Default: ${basedir}/target/generated-sources/i18n

<outputGetter>

Defines the file name of the getter where to put detected i18n keys while getter phase.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: i18n.outputGetter
  • Default: struts2.getter

<showTouchedFiles>

Flag to display touched files while parsing. Note: the value will be always true if verbose is set at true.
  • Type: boolean
  • Since: 0.9
  • Required: No
  • User Property: i18n.showTouchedFiles
  • Default: ${maven.verbose}

<silent>

Silent flag to see only errors in console.
  • Type: boolean
  • Since: 1.0.0-rc-5
  • Required: No
  • User Property: i18n.silent
  • Default: false

<src>

Directory where to find project i18n files.
  • Type: java.io.File
  • Since: 2.5
  • Required: Yes
  • User Property: i18n.src
  • Default: ${basedir}/src/main/resources/i18n

<strictMode>

Strict mode to only keep in user i18n detected i18n keys and remove obsolete keys. Note : By default not active. Use this with care since it can delete keys. Moreover if this flag is activated, then all files will be parsed.
  • Type: boolean
  • Since: 2.5
  • Required: No
  • User Property: i18n.strictMode
  • Default: false

<treateDefaultEntry>

To treat default entry offered by the mojo.
  • Type: boolean
  • Since: 2.5
  • Required: No
  • User Property: i18n.treateDefaultEntry
  • Default: true

<verbose>

Verbose flag. Note : if not setted, we used the maven.verbose property.
  • Type: boolean
  • Since: 2.5
  • Required: No
  • User Property: i18n.verbose
  • Default: ${maven.verbose}