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
public abstract class AbstractI18nBundleMojo extends AbstractI18nMojo
Created: 26 déc. 2009
- Since:
- 1.0
- Author:
- Tony Chemit - chemit@codelutin.com
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description protected java.io.FilecollectOutputDirDirectory where to generate bundles.protected java.lang.StringcollectOutputNameBAse name of file which contains bundles locations.Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo
bundles, encoding, locales, mavenSession, project, silent, verbose -
Constructor Summary
Constructors Constructor Description AbstractI18nBundleMojo() -
Method Summary
Modifier and Type Method Description protected abstract java.net.URL[]getCollectI18nResources(java.util.Locale locale)Pour obtenir les urls des fichiers i18n d'un projet (avec recherche dans ses dépendances).protected java.io.FilegetCollectOutputFile(java.util.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, setPluginContext
-
Field Details
-
collectOutputDir
@Parameter(property="i18n.collectOutputDir", defaultValue="${basedir}/target/i18n", required=true) protected java.io.File collectOutputDirDirectory where to generate bundles.- Since:
- 1.0.2
-
collectOutputName
@Parameter(property="i18n.collectOutputName", defaultValue="collect-${project.artifactId}-i18n", required=true) protected java.lang.String collectOutputNameBAse name of file which contains bundles locations.- Since:
- 1.0.2
-
-
Constructor Details
-
AbstractI18nBundleMojo
public AbstractI18nBundleMojo()
-
-
Method Details
-
getCollectI18nResources
protected abstract java.net.URL[] getCollectI18nResources(java.util.Locale locale) throws java.lang.ExceptionPour 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:
java.lang.Exception- pour tout problème
-
getCollectOutputFile
protected java.io.File getCollectOutputFile(java.util.Locale locale, boolean create) throws java.io.IOExceptionPour 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:
java.io.IOException- pour tout pb
-