All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zanata.maven.PushSimpleMojo Maven / Gradle / Ivy

Go to download

Zanata client for managing projects, publishing source text and retrieving translations.

There is a newer version: 4.6.2
Show newest version
package org.zanata.maven;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.zanata.client.commands.push.PushOptions;

/**
 * Pushes source text to a Zanata project version so that it can be translated,
 * and optionally push translated text as well. NB: Any documents which exist on
 * the server but not locally will be deleted as obsolete.
 * @author Sean Flanigan [email protected]
 */
@Mojo(name = "push", requiresOnline = true, requiresProject = false)
public class PushSimpleMojo extends AbstractPushMojo implements PushOptions {
    /**
     * Obsolete option, only for backwards compatibility
     */
    @Parameter(property = "zanata.useSrcOrder", defaultValue = "false")
    @Deprecated
    private boolean useSrcOrder;

    /**
     * Whether module processing should be enabled. This option is obsolete.
     * Please use push-module instead.
     */
    @Parameter(property = "zanata.enableModules")
    private boolean enableModules = false;

    public PushSimpleMojo() {
        if (enableModules) {
            throw new RuntimeException(
                    "Please use push-module for module support");
        }
    }

    @Override
    public boolean getEnableModules() {
        return false;
    }

    @Override
    public boolean getDeleteObsoleteModules() {
        // False for Simple push
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy