Class SplitCsvBundleMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.nuiton.plugin.AbstractPlugin
-
- org.nuiton.i18n.plugin.AbstractI18nMojo
-
- org.nuiton.i18n.plugin.bundle.csv.AbstractCsvBundleMojo
-
- org.nuiton.i18n.plugin.bundle.csv.SplitCsvBundleMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,org.nuiton.plugin.Plugin
,org.nuiton.plugin.PluginWithEncoding
@Mojo(name="split-csv-bundle", defaultPhase=GENERATE_RESOURCES, requiresProject=true, requiresDependencyResolution=RUNTIME) public class SplitCsvBundleMojo extends AbstractCsvBundleMojo
To split a previously csv i18n file into simple i18n bundles for the locales defined inAbstractI18nMojo.locales
. The order ofAbstractI18nMojo.locales
will be used to extract for each locale i18n bundle (means the order defined in the csv file is not used). Make sure to use exactly the same order. Created on 7/26/14.- Since:
- 3.3
- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description protected String
artifactId
Name to use as prefix of generated files.protected File
bundleCsvFile
Location of the csv file to split.protected File
bundleOutputDir
Root directory where to generate aggregated bundles (this directory will be added as resources of the project).protected String
bundleOutputName
Name of the bundle to generate.-
Fields inherited from class org.nuiton.i18n.plugin.bundle.csv.AbstractCsvBundleMojo
bundleCsvSeparator
-
Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo
bundles, encoding, locales, mavenSession, project, silent, verbose
-
-
Constructor Summary
Constructors Constructor Description SplitCsvBundleMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doAction()
void
init()
-
Methods inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo
backupFile, checkBundle, checkPackaging, failsIfAnyKeyMissingInBundle, failsIfAnyKeyMissingValue, getBackupFile, getEncoding, getProject, isSilent, isVerbose, setEncoding, setProject, setVerbose
-
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, checkEncoding, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
bundleOutputName
@Parameter(property="i18n.bundleOutputName", defaultValue="${project.artifactId}-i18n", required=true) protected String bundleOutputName
Name of the bundle to generate.
-
bundleOutputDir
@Parameter(property="i18n.bundleOutputDir", defaultValue="${project.build.directory}", required=true) protected File bundleOutputDir
Root directory where to generate aggregated bundles (this directory will be added as resources of the project).
-
artifactId
@Parameter(property="i18n.artifactId", defaultValue="${project.artifactId}", readonly=true) protected String artifactId
Name to use as prefix of generated files. Note : By default, use the artifact id.
-
bundleCsvFile
@Parameter(property="i18n.bundleCsvFile", required=true) protected File bundleCsvFile
Location of the csv file to split.
-
-