i18n:parserValidation
Full name:
org.nuiton.i18n:i18n-maven-plugin:4.1:parserValidation
Description:
Find i18n keys from xworks xml validation files. Note: this
goal must always be invoked before the
process-resources
phase, otherwise all files will be
considered as uptodate.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.0
. - Binds by default to the lifecycle phase:
generate-resources
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<bundles> |
String |
2.0 |
Locales to treate, separated by comma. Example :
fr_FR,en_GB Default value is: fr_FR,en_GB .User property is: i18n.bundles . |
<coreRuleFile> |
String |
2.0 |
Defines the core rules file used to detect i18n keys in xml
validation files. Note : If you do not want to use it, set
it to empty and fill the userRulesFiles parameter.Default value is: validation.rules .User property is: i18n.coreRuleFile . |
<defaultBasedir> |
File |
2.0 |
Root directory of the default entry. Default value is: ${basedir}/src/main/resources .User property is: i18n.defaultBasedir . |
<defaultIncludes> |
String |
2.0 |
Default included files to process (ant-like expression).
Note: default value is **\/**-validation.xml Default value is: **/*-validation.xml .User property is: i18n.defaultIncludes . |
<encoding> |
String |
2.0 |
Encoding used to load and store properties. Default value is: ${project.build.sourceEncoding} .User property is: i18n.encoding . |
<out> |
File |
2.0 |
Directory where to generate i18n files. Default value is: ${basedir}/target/generated-sources/i18n .User property is: i18n.out . |
<outputGetter> |
String |
2.0 |
Defines the file name of the getter where to put detected i18n keys
while getter phase. Default value is: validation.getter .User property is: i18n.outputGetter . |
<src> |
File |
2.0 |
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.0 |
Build directory (used to know if files in sources are up-to-date). Default value is: ${basedir}/target/classes .User property is: i18n.cp . |
<entries> |
I18nSourceEntry[] |
2.0 |
Source entries (src+includes+excludes) to process. User property is: i18n.entries . |
<force> |
boolean |
1.2 |
To force reparse of all sources. Default value is: false .User property is: i18n.force . |
<namespaces> |
Map |
2.0 |
Defines namespaces mapping if needed. Example :
<namespaces> <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s> </namespaces> |
<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.0 |
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.0 |
To treat default entry offered by the mojo. Default value is: true .User property is: i18n.treateDefaultEntry . |
<useLocalResolver> |
boolean |
1.6.0 |
Always use the local xworks dtd to increase performance. Default value is: true .User property is: i18n.useLocalResolver . |
<userRulesFiles> |
String[] |
2.0 |
Extra rules files to use for detecting i18n keys in xml validation
files. Note : If the coreRulesFile is not
defined, then you must fill this parameter. |
<verbose> |
boolean |
2.0 |
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.0
- Required:
Yes
- User Property:
i18n.bundles
- Default:
fr_FR,en_GB
<coreRuleFile>
Defines the core rules file used to detect i18n keys in xml
validation files. Note : If you do not want to use it, set
it to empty and fill the
userRulesFiles
parameter.- Type:
java.lang.String
- Since:
2.0
- Required:
Yes
- User Property:
i18n.coreRuleFile
- Default:
validation.rules
<cp>
Build directory (used to know if files in sources are up-to-date).
- Type:
java.io.File
- Since:
2.0
- Required:
No
- User Property:
i18n.cp
- Default:
${basedir}/target/classes
<defaultBasedir>
Root directory of the default entry.
- Type:
java.io.File
- Since:
2.0
- Required:
Yes
- User Property:
i18n.defaultBasedir
- Default:
${basedir}/src/main/resources
<defaultIncludes>
Default included files to process (ant-like expression).
Note: default value is **\/**-validation.xml
- Type:
java.lang.String
- Since:
2.0
- Required:
Yes
- User Property:
i18n.defaultIncludes
- Default:
**/*-validation.xml
<encoding>
Encoding used to load and store properties.
- Type:
java.lang.String
- Since:
2.0
- 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.0
- Required:
No
- User Property:
i18n.entries
<force>
To force reparse of all sources.
- Type:
boolean
- Since:
1.2
- Required:
No
- User Property:
i18n.force
- Default:
false
<namespaces>
Defines namespaces mapping if needed. Example :
<namespaces> <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s> </namespaces>
- Type:
java.util.Map
- Since:
2.0
- Required:
No
<out>
Directory where to generate i18n files.
- Type:
java.io.File
- Since:
2.0
- 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:
Yes
- User Property:
i18n.outputGetter
- Default:
validation.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.0
- 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.0
- Required:
No
- User Property:
i18n.strictMode
- Default:
false
<treateDefaultEntry>
To treat default entry offered by the mojo.
- Type:
boolean
- Since:
2.0
- Required:
No
- User Property:
i18n.treateDefaultEntry
- Default:
true
<useLocalResolver>
Always use the local xworks dtd to increase performance.
- Type:
boolean
- Since:
1.6.0
- Required:
No
- User Property:
i18n.useLocalResolver
- Default:
true
<userRulesFiles>
Extra rules files to use for detecting i18n keys in xml validation
files. Note : If the
coreRulesFile
is not
defined, then you must fill this parameter.- Type:
java.lang.String[]
- Since:
2.0
- Required:
No
<verbose>
Verbose flag. Note : if not setted, we used the
maven.verbose
property.- Type:
boolean
- Since:
2.0
- Required:
No
- User Property:
i18n.verbose
- Default:
${maven.verbose}