public abstract class AbstractI18nMojo
extends org.nuiton.plugin.AbstractPlugin
implements org.nuiton.plugin.PluginWithEncoding
| Modifier and Type | Field and Description |
|---|---|
protected String |
bundles
Locales to treate, separated by comma.
|
protected String |
encoding
Encoding used to load and store properties.
|
protected Locale[] |
locales
locales to process
|
protected org.apache.maven.execution.MavenSession |
mavenSession |
protected org.apache.maven.project.MavenProject |
project
Dependance du projet.
|
protected boolean |
silent
Silent flag to see only errors in console.
|
protected boolean |
verbose
Verbose flag.
|
| Constructor and Description |
|---|
AbstractI18nMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
backupFile(File f) |
protected void |
checkBundle(Locale locale,
Properties propertiesOut,
boolean showEmpty,
BundleValidation bundleValidation) |
protected boolean |
checkPackaging() |
protected void |
failsIfAnyKeyMissingInBundle(boolean failsIfWarning,
BundleValidation bundleValidation) |
protected void |
failsIfAnyKeyMissingValue(boolean failsIfWarning,
BundleValidation bundleValidation) |
File |
getBackupFile(File file) |
String |
getEncoding() |
org.apache.maven.project.MavenProject |
getProject() |
void |
init() |
boolean |
isSilent() |
boolean |
isVerbose() |
void |
setEncoding(String encoding) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setVerbose(boolean verbose) |
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, checkEncoding, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, doAction, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Parameter(defaultValue="${session}",
readonly=true)
protected org.apache.maven.execution.MavenSession mavenSession
@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter(property="i18n.bundles",
defaultValue="fr_FR,en_GB",
required=true)
protected String bundles
fr_FR,en_GB
@Parameter(property="i18n.encoding",
defaultValue="${project.build.sourceEncoding}",
required=true)
protected String encoding
@Parameter(property="i18n.verbose",
defaultValue="${maven.verbose}")
protected boolean verbose
maven.verbose property.@Parameter(property="i18n.silent",
defaultValue="false")
protected boolean silent
protected Locale[] locales
protected boolean checkPackaging()
checkPackaging in class org.nuiton.plugin.AbstractPluginpublic void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginExceptionprotected void checkBundle(Locale locale, Properties propertiesOut, boolean showEmpty, BundleValidation bundleValidation)
public File getBackupFile(File file)
getBackupFile in class org.nuiton.plugin.AbstractPluginprotected void backupFile(File f) throws IOException
backupFile in class org.nuiton.plugin.AbstractPluginIOExceptionpublic org.apache.maven.project.MavenProject getProject()
getProject in interface org.nuiton.plugin.Pluginpublic void setProject(org.apache.maven.project.MavenProject project)
setProject in interface org.nuiton.plugin.Pluginpublic boolean isVerbose()
isVerbose in interface org.nuiton.plugin.Pluginpublic void setVerbose(boolean verbose)
setVerbose in interface org.nuiton.plugin.Pluginpublic boolean isSilent()
public String getEncoding()
getEncoding in interface org.nuiton.plugin.PluginWithEncodingpublic void setEncoding(String encoding)
setEncoding in interface org.nuiton.plugin.PluginWithEncodingprotected void failsIfAnyKeyMissingValue(boolean failsIfWarning,
BundleValidation bundleValidation)
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionprotected void failsIfAnyKeyMissingInBundle(boolean failsIfWarning,
BundleValidation bundleValidation)
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionCopyright © 2007–2016 CodeLutin. All rights reserved.