|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.i18n.plugin.AbstractI18nMojo
org.nuiton.i18n.plugin.bundle.AbstractI18nBundleMojo
org.nuiton.i18n.plugin.bundle.AbstractMakeI18nBundleMojo
public abstract class AbstractMakeI18nBundleMojo
Common mojo to all final bundle maker.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
| Field Summary | |
|---|---|
protected File |
bundleOutputDir
Directory where to generate aggregated bundles. |
protected String |
bundleOutputName
Name of the bundle to generate. |
protected boolean |
checkBundle
A flag to check that bundles are complete (no missing i18n translations). |
protected boolean |
failsIfWarning
A flag to make the build fails if there is some warnings while generating bundle, says when it misses some translations. |
protected boolean |
generateDefaultLocale
A flag to generate a bundle with the first locale defined as a default bundle (with no locale specialization). |
protected boolean |
showEmpty
A flag to show missing i18n translation. |
protected Map<Locale,SortedSet<String>> |
unsafeMapping
to keep all none translated i18n keys by locale. |
| Fields inherited from class org.nuiton.i18n.plugin.bundle.AbstractI18nBundleMojo |
|---|
collectOutputDir, collectOutputName |
| Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo |
|---|
artifactId, bundles, encoding, genSrc, locales, out, project, silent, src, strictMode, verbose |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractMakeI18nBundleMojo()
|
|
| Method Summary | |
|---|---|
protected void |
failsIfWarning()
|
protected void |
generateDefaultBundle()
Generates the default bundle, says the bundle with no locale specialized. |
protected abstract File |
getBundleFile(File root,
String artifactId,
Locale locale,
boolean create)
Gets the bundle file for the given parameters. |
void |
init()
|
| Methods inherited from class org.nuiton.i18n.plugin.bundle.AbstractI18nBundleMojo |
|---|
getCollectI18nResources, getCollectOutputFile, getLinesAsURL |
| Methods inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo |
|---|
addGetter, backupFile, checkBundle, checkPackaging, getArtifactId, getBackupFile, getEncoding, getGetterFile, getI18nFile, getProject, isSilent, isStrictMode, isVerbose, needGeneration, 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, doAction, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute, getLog, setLog |
| Field Detail |
|---|
protected File bundleOutputDir
protected String bundleOutputName
protected boolean generateDefaultLocale
protected boolean checkBundle
failsIfWarning is on.
protected boolean showEmpty
checkBundle to be activated).
protected boolean failsIfWarning
protected Map<Locale,SortedSet<String>> unsafeMapping
| Constructor Detail |
|---|
public AbstractMakeI18nBundleMojo()
| Method Detail |
|---|
public void init()
throws Exception
init in class AbstractI18nMojoException
protected void failsIfWarning()
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
protected abstract File getBundleFile(File root,
String artifactId,
Locale locale,
boolean create)
throws IOException
root - the root directory where bundles are storedartifactId - the artifactId (says the prefix of bundle)locale - the locale used in bundle (null means no locale specialized)create - a flag to create the file if none existing
IOException - if any IO problem while creating it (if needed).
protected void generateDefaultBundle()
throws IOException
IOException - if any IO problem while the copy.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||