Package org.nuiton.i18n.plugin.bundle
Class AbstractI18nBundleMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.i18n.plugin.AbstractI18nMojo
org.nuiton.i18n.plugin.bundle.AbstractI18nBundleMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.nuiton.plugin.Plugin,org.nuiton.plugin.PluginWithEncoding
- Direct Known Subclasses:
BundleMojo,CollectI18nArtifactsMojo
Created: 26 déc. 2009
- Since:
- 1.0
- Author:
- Tony Chemit - chemit@codelutin.com
-
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
FieldsModifier and TypeFieldDescriptionprotected FileDirectory where to generate bundles.protected StringBAse name of file which contains bundles locations.Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo
bundles, encoding, locales, mavenSession, project, silent, verboseFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract URL[]getCollectI18nResources(Locale locale) Pour obtenir les urls des fichiers i18n d'un projet (avec recherche dans ses dépendances).protected FilegetCollectOutputFile(Locale locale, boolean create) Pour obtenir le fichier contenant les localisation des bundles i18n du projet pour unelocaledonnée.Methods inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo
backupFile, checkBundle, checkPackaging, failsIfAnyKeyMissingInBundle, failsIfAnyKeyMissingValue, getBackupFile, getEncoding, getProject, init, isSilent, isVerbose, setEncoding, setProject, setVerboseMethods 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, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFileMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute, getLog, setLog
-
Field Details
-
collectOutputDir
@Parameter(property="i18n.collectOutputDir", defaultValue="${basedir}/target/i18n", required=true) protected File collectOutputDirDirectory where to generate bundles.- Since:
- 1.0.2
-
collectOutputName
@Parameter(property="i18n.collectOutputName", defaultValue="collect-${project.artifactId}-i18n", required=true) protected String collectOutputNameBAse name of file which contains bundles locations.- Since:
- 1.0.2
-
-
Constructor Details
-
AbstractI18nBundleMojo
public AbstractI18nBundleMojo()
-
-
Method Details
-
getCollectI18nResources
Pour obtenir les urls des fichiers i18n d'un projet (avec recherche dans ses dépendances). Note: L'ordre des urls reflète l'ordre des dépendances.- Parameters:
locale- la locale a traiter- Returns:
- les urls des bundles i18n detectees pour le projet.
- Throws:
Exception- pour tout problème
-
getCollectOutputFile
Pour obtenir le fichier contenant les localisation des bundles i18n du projet pour unelocaledonnée.- Parameters:
locale- la localecreate- un drapeau pour forcer la création du fichier s'il n'existe pas- Returns:
- le fichier qui contient les urls des bundles i18n pour la locale donnée.
- Throws:
IOException- pour tout pb
-