public abstract class AbstractCrowdinMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected File |
crowdInArchive |
static String |
DEFAULT_TRANSLATIONS_REGISTRY_FILE_PATH |
| Constructor and Description |
|---|
AbstractCrowdinMojo() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
crowdInMojoExecute()
The core method of the Mojo.
|
protected void |
execGit(File workingDirectory,
String params) |
protected void |
execGit(File workingDirectory,
String params,
org.twdata.maven.mojoexecutor.MojoExecutor.Element... successCodes) |
void |
execute() |
String |
getApplyApprovedOnlyOption() |
CrowdinFileFactory |
getFactory() |
CrowdinAPIHelper |
getHelper() |
List<String> |
getLanguages() |
org.apache.maven.execution.MavenSession |
getMavenSession() |
org.apache.maven.plugin.BuildPluginManager |
getPluginManager() |
org.apache.maven.project.MavenProject |
getProject()
The Maven Project Object
|
String |
getProjectId() |
String |
getProjectKey() |
Properties |
getProperties() |
String |
getTranslationsArchivePath() |
String |
getTranslationsRegistryFilePath() |
File |
getWorkingDir() |
protected void |
initDir(String _filePath)
Create parent directories of a file
|
protected void |
initTranslations(CrowdinFile _master)
A function that initializes translations of the master file given in parameter
then upload these translations into Crowdin accordingly
|
protected boolean |
isAllPropertyFilesExisted() |
boolean |
isDryRun() |
boolean |
isForce() |
protected Properties |
loadProperties(String _propertiesFile)
A convenience method to load properties file
|
protected String |
printFileContent(File file) |
void |
setTranslationsArchivePath(String translationsArchivePath) |
void |
setTranslationsRegistryFilePath(String translationsRegistryFilePath) |
public static final String DEFAULT_TRANSLATIONS_REGISTRY_FILE_PATH
protected File crowdInArchive
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected Properties loadProperties(String _propertiesFile) throws IOException
_propertiesFile - the name/path of the file to loadIOExceptionpublic abstract void crowdInMojoExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic File getWorkingDir()
public boolean isDryRun()
public boolean isForce()
public CrowdinAPIHelper getHelper()
public CrowdinFileFactory getFactory()
public String getProjectId()
public String getProjectKey()
public String getTranslationsArchivePath()
public void setTranslationsArchivePath(String translationsArchivePath)
public String getTranslationsRegistryFilePath()
public void setTranslationsRegistryFilePath(String translationsRegistryFilePath)
public String getApplyApprovedOnlyOption()
public org.apache.maven.project.MavenProject getProject()
public org.apache.maven.execution.MavenSession getMavenSession()
public org.apache.maven.plugin.BuildPluginManager getPluginManager()
public Properties getProperties()
protected void initDir(String _filePath)
_filePath - the full path of the parent of that fileprotected boolean isAllPropertyFilesExisted()
protected void initTranslations(CrowdinFile _master)
_master - The master file of which translations will be detected and uploaded.protected void execGit(File workingDirectory, String params) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void execGit(File workingDirectory, String params, org.twdata.maven.mojoexecutor.MojoExecutor.Element... successCodes) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.