@Mojo(name="push",
defaultPhase=NONE)
public class PushCrowdinMojo
extends AbstractCrowdinMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
confirm
This parameter must be
true for push to execute. |
protected String |
projectName
This parameter must match the POM name of the current project in is used
to prevent pushing from the wrong project.
|
protected Boolean |
replaceModifiedContext
The global option of whether to overwrite context when updating source
files, even if the context has been modified on Crowdin.
|
protected UpdateOption |
updateOption
The default update behavior for updated strings when pushing.
|
client, comment, crowdinServerId, disableBranches, downloadFolder, downloadFolderPath, gitBaseFolder, httpTimeout, lineSeparator, mavenSession, project, projectId, rootBranch, server, statusFiles, translationFileSets| Constructor and Description |
|---|
PushCrowdinMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected FileExportOptions |
generateExportOptions(TranslationFileSet fileSet,
FileInfo templateFile)
Builds the "effective"
FileExportOptions from a combination of
the template file settings (if any) and the TranslationFileSet
configuration. |
protected Boolean |
getReplaceModifiedContext(TranslationFileSet fileSet)
Gets the effective "
replaceModifiedContext" value from either the
TranslationFileSet or the default parameter. |
protected UpdateOption |
getUpdateOption(TranslationFileSet fileSet)
Gets the effective "
updateOption" value from either the
TranslationFileSet or the default parameter. |
protected void |
initializeParameters()
Initializes the
Mojo parameters since they are set via reflection
and can't be handled in the constructor. |
cleanDownloadFolder, createClient, getBranch, getBranch, getPluginVersion, initializeServer, setClient, setComment, setCrowdinServerId, setDisableBranches, setDownloadFolder, setDownloadFolder, setGitBaseFolder, setHTTPTimeout, setLineSeparator, setProject, setProjectId, setRootBranch, setServer, setStatusFiles, setTranslationFileSets@Parameter(property="projectName",
required=true)
protected String projectName
@Parameter(property="confirm",
defaultValue="false")
protected String confirm
true for push to execute. If this isn't
specified in the POM file, -Dconfirm=true is required as a
command line argument for the push to execute.@Parameter(property="updateOption",
defaultValue="clear_translations_and_approvals")
protected UpdateOption updateOption
@Parameter(property="replaceModifiedContext",
defaultValue="false")
protected Boolean replaceModifiedContext
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected UpdateOption getUpdateOption(TranslationFileSet fileSet)
updateOption" value from either the
TranslationFileSet or the default parameter.fileSet - the TranslationFileSet to use.updateOption" value.protected Boolean getReplaceModifiedContext(TranslationFileSet fileSet)
replaceModifiedContext" value from either the
TranslationFileSet or the default parameter.fileSet - the TranslationFileSet to use.replaceModifiedContext" value.protected FileExportOptions generateExportOptions(@Nonnull TranslationFileSet fileSet, @Nullable FileInfo templateFile) throws org.apache.maven.plugin.MojoExecutionException
FileExportOptions from a combination of
the template file settings (if any) and the TranslationFileSet
configuration.fileSet - the TranslationFileSet from which to get the
configuration.templateFile - the FileInfo for the template file, if any.FileExportOptions.org.apache.maven.plugin.MojoExecutionException - If validation of the resulting options
fails.protected void initializeParameters()
throws org.apache.maven.plugin.MojoExecutionException
AbstractCrowdinMojoMojo parameters since they are set via reflection
and can't be handled in the constructor.initializeParameters in class AbstractCrowdinMojoorg.apache.maven.plugin.MojoExecutionException - If an error occurs during initialization.Copyright © 2024. All rights reserved.