@Mojo(name="generate-csv-bundle",
defaultPhase=GENERATE_RESOURCES,
requiresProject=true,
requiresDependencyResolution=RUNTIME)
public class GenerateCsvBundleMojo
extends AbstractCsvBundleMojo
AbstractI18nMojo.locales.
Created on 7/26/14.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
addInClassPath
To add the generated csv file in the classpath.
|
protected File |
bundleCsvDirectory
If you want to specify where to generate the csv file.
|
protected File |
bundleCsvFile
The definitive file where to write the csv file.
|
protected String |
bundleCsvFileName
Location of the csv file to split.
|
protected String |
bundleInputEncoding
Encoding used to read any i18n property files.
|
protected File |
bundleOutputDir
Root directory where to generate aggregated bundles (this directory will
be added as resources of the project).
|
protected String |
bundleOutputEncoding
Encoding used to write any files.
|
protected String |
bundleOutputName
Name of the bundle to use.
|
protected String |
bundleOutputPackage
Package name of the generate aggregated bundles.
|
protected File |
outputFolder
The definitive directory where to load the bundles (includes the package of bundle).
|
bundleCsvSeparatorbundles, encoding, locales, mavenSession, project, silent, verbose| Constructor and Description |
|---|
GenerateCsvBundleMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doAction() |
protected File |
getBundleOutputFolder() |
void |
init() |
backupFile, checkBundle, checkPackaging, failsIfAnyKeyMissingInBundle, failsIfAnyKeyMissingValue, getBackupFile, getEncoding, getProject, isSilent, isVerbose, setEncoding, setProject, setVerboseacceptPackaging, 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, writeFilegetLog, getPluginContext, setLog, setPluginContext@Parameter(property="i18n.bundleOutputName",
defaultValue="${project.artifactId}-i18n",
required=true)
protected String bundleOutputName
@Parameter(property="i18n.bundleInputEncoding") protected String bundleInputEncoding
AbstractI18nMojo.encoding parameter.@Parameter(property="i18n.bundleOutputEncoding") protected String bundleOutputEncoding
AbstractI18nMojo.encoding parameter.@Parameter(property="i18n.bundleOutputDir",
defaultValue="${project.build.directory}/generated-sources/resources",
required=true)
protected File bundleOutputDir
@Parameter(property="i18n.bundleOutputPackage",
defaultValue="META-INF",
required=true)
protected String bundleOutputPackage
META-INF package
since it is the favorite package of I18n runtime initializer.
The package name is dotted as it will be stored as folder like in Java
language.
Example :
package name : foo.bar
directory : foo/bar
@Parameter(property="i18n.addInClassPath",
defaultValue="true")
protected boolean addInClassPath
bundleCsvDirectory is filled, then will add the generated csv file at the root of class-path,
otherwise will add add it in the bundleOutputPackage package.@Parameter(property="i18n.bundleCsvFile",
defaultValue="${i18n.bundleOutputName}-i18n.csv",
required=true)
protected String bundleCsvFileName
@Parameter(property="i18n.bundleCsvDirectory") protected File bundleCsvDirectory
protected File outputFolder
protected File bundleCsvFile
public void init()
throws Exception
init in class AbstractI18nMojoExceptionprotected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionprotected File getBundleOutputFolder()
Copyright © 2007–2020 CodeLutin. All rights reserved.