|
||||||||||
| 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
org.nuiton.i18n.plugin.bundle.BundleMojo
public class BundleMojo
Generate an aggregate i18n bundle for all dependencies of the project.
The main idea is to have a final unique i18n bundle for a application to launch, this really improve i18n loading time to have a unique named bundle, no need to seek in all dependencies... Moreover, this permits also to deal with order of i18n keys, more precisly, we want to use the higher level i18n key for an application. If the i18n key is present on a library, we want to be able to override it in application (or user wants it:)). This goal permits this using the dependencies graph order of artifacts.
| 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 boolean |
addBundleOuputDirParent
A flag to use the parent of directory AbstractMakeI18nBundleMojo.bundleOutputDir
as directory to add in build ressources. |
protected boolean |
generateDefinitionFile
A flag to generate the i18n definition file. |
| Fields inherited from class org.nuiton.i18n.plugin.bundle.AbstractMakeI18nBundleMojo |
|---|
bundleOutputDir, bundleOutputName, checkBundle, failsIfWarning, showEmpty, unsafeMapping |
| 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 | |
|---|---|
BundleMojo()
|
|
| Method Summary | |
|---|---|
protected void |
doAction()
|
protected void |
generateDefinitionFile(String version,
Map<Locale,String> bundleDico)
|
protected URL[] |
getCollectI18nResources(Locale locale)
Pour obtenir les urls des fichiers i18n d'un projet (avec recherche dans ses dépendances). |
void |
init()
|
| Methods inherited from class org.nuiton.i18n.plugin.bundle.AbstractMakeI18nBundleMojo |
|---|
failsIfWarning |
| Methods inherited from class org.nuiton.i18n.plugin.bundle.AbstractI18nBundleMojo |
|---|
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, 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 boolean addBundleOuputDirParent
AbstractMakeI18nBundleMojo.bundleOutputDir
as directory to add in build ressources.
If the flag is not activated, the, we use directly the given
AbstractMakeI18nBundleMojo.bundleOutputDir directory.
Note : By default we use the parent directory, since this is more
natural, only special cases should desactivate this parameter.
protected boolean generateDefinitionFile
| Constructor Detail |
|---|
public BundleMojo()
| Method Detail |
|---|
public void init()
throws Exception
init in class AbstractMakeI18nBundleMojoException
protected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginException
protected void generateDefinitionFile(String version,
Map<Locale,String> bundleDico)
throws IOException
IOException
protected URL[] getCollectI18nResources(Locale locale)
throws IOException
AbstractI18nBundleMojo
getCollectI18nResources in class AbstractI18nBundleMojolocale - la locale a traiter
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||