org.nuiton.i18n.plugin.bundle
Class TapestryBundleMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.plugin.AbstractPlugin
          extended by org.nuiton.i18n.plugin.AbstractI18nMojo
              extended by org.nuiton.i18n.plugin.bundle.AbstractI18nBundleMojo
                  extended by org.nuiton.i18n.plugin.bundle.AbstractMakeI18nBundleMojo
                      extended by org.nuiton.i18n.plugin.bundle.TapestryBundleMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.nuiton.plugin.Plugin, org.nuiton.plugin.PluginWithEncoding

public class TapestryBundleMojo
extends AbstractMakeI18nBundleMojo

Generates a unique bundle for a tapestry application.

Note : The mojo has nothing specific to tapestry and should be renamed (or removed since the bundle mojo do the same with more options)...

Since:
1.2
Author:
tchemit
Is defined to be executed in:
goal:
collect-i18n-artifacts
Is defined by the goal name:
tapestry-bundle
Is bound to the specified phase of the standard build lifecycle:
generate-resources
Requires the dependencies in this specified scope:
runtime
Requires a Maven project to run:
true

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
 
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
TapestryBundleMojo()
           
 
Method Summary
protected  void doAction()
           
protected  URL[] getCollectI18nResources(Locale locale)
          Pour obtenir les urls des fichiers i18n d'un projet (avec recherche dans ses dépendances).
 File getTapestryI18nFile(File root, String artifactId, Locale locale, boolean create)
           
 
Methods inherited from class org.nuiton.i18n.plugin.bundle.AbstractMakeI18nBundleMojo
failsIfWarning, init
 
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
 

Constructor Detail

TapestryBundleMojo

public TapestryBundleMojo()
Method Detail

doAction

protected void doAction()
                 throws Exception
Specified by:
doAction in class org.nuiton.plugin.AbstractPlugin
Throws:
Exception

getTapestryI18nFile

public File getTapestryI18nFile(File root,
                                String artifactId,
                                Locale locale,
                                boolean create)
                         throws IOException
Parameters:
root - le repertoire ou sont stockes les fichiers i18n
artifactId - le nom de l'artifact
locale - le nom du bundle
create - true pour creer le fichier si non present
Returns:
le fichier i18n
Throws:
IOException - si probleme lors de la creation du fichier

getCollectI18nResources

protected URL[] getCollectI18nResources(Locale locale)
                                 throws IOException
Description copied from class: AbstractI18nBundleMojo
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.

Specified by:
getCollectI18nResources in class AbstractI18nBundleMojo
Parameters:
locale - la locale a traiter
Returns:
les urls des bundles i18n detectees pour le projet.
Throws:
IOException


Copyright © 2007-2010 CodeLutin. All Rights Reserved.