@Mojo(name="collect-i18n-artifacts",
defaultPhase=GENERATE_RESOURCES,
requiresProject=true,
requiresDependencyResolution=RUNTIME)
public class CollectI18nArtifactsMojo
extends AbstractI18nBundleMojo
bundle mojo to generate the final
aggregated bundle.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.shared.dependency.graph.DependencyGraphBuilder |
dependencyTreeBuilder
Dependency tree builder component.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
Local Repository.
|
protected File |
src
Directory where to find project i18n files.
|
collectOutputDir, collectOutputNamebundles, encoding, locales, mavenSession, project, silent, verbose| Constructor and Description |
|---|
CollectI18nArtifactsMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
detectBundles(I18nArtifact i18nArtifact,
List<org.apache.maven.artifact.Artifact> artifacts,
Map<org.apache.maven.artifact.Artifact,I18nArtifact> dico) |
protected I18nArtifact[] |
detectI18nArtifacts()
Detecte les
I18nArtifact et les retourne dans l'ordre de
chargement dans le système i18n, i.e l'ordre des dependances entre
artifacts. |
protected void |
doAction() |
protected URL[] |
getCollectI18nResources(Locale locale)
Pour obtenir les urls des fichiers i18n d'un projet (avec recherche dans
ses dépendances).
|
void |
init() |
protected void |
storeCollectI18nResources(File bundleOut,
URL[] urls) |
getCollectOutputFilebackupFile, checkBundle, checkPackaging, failsIfWarning, getBackupFile, getEncoding, getProject, isSilent, isVerbose, setEncoding, setProject, setVerboseacceptPackaging, 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, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Parameter(property="i18n.src",
defaultValue="${basedir}/src/main/resources/i18n",
required=true)
protected File src
@Parameter(property="localRepository",
required=true,
readonly=true)
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
@Component protected org.apache.maven.shared.dependency.graph.DependencyGraphBuilder dependencyTreeBuilder
public void init()
throws Exception
init in class AbstractI18nMojoExceptionprotected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionprotected URL[] getCollectI18nResources(Locale locale) throws IOException
AbstractI18nBundleMojogetCollectI18nResources in class AbstractI18nBundleMojolocale - la locale a traiterIOExceptionprotected void storeCollectI18nResources(File bundleOut, URL[] urls) throws IOException
IOExceptionprotected I18nArtifact[] detectI18nArtifacts() throws IOException, org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException
I18nArtifact et les retourne dans l'ordre de
chargement dans le système i18n, i.e l'ordre des dependances entre
artifacts.IOException - while detecting bundles from artifactsorg.apache.maven.shared.dependency.graph.DependencyGraphBuilderExceptionprotected void detectBundles(I18nArtifact i18nArtifact, List<org.apache.maven.artifact.Artifact> artifacts, Map<org.apache.maven.artifact.Artifact,I18nArtifact> dico) throws IOException
IOExceptionCopyright © 2007–2016 CodeLutin. All rights reserved.