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

org.zanata.maven.PublicanPullMojo 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 java.io.File;

import org.zanata.client.commands.PublicanPullCommand;
import org.zanata.client.commands.PublicanPullOptions;

/**
 * Pulls translated text from Zanata. DEPRECATED: use 'pull' with projectType 'podir'
 * goal.
 * 
 * @goal publican-pull
 * @requiresOnline true
 * @author Sean Flanigan 
 * @deprecated
 * @see PullSimpleMojo
 */
public class PublicanPullMojo extends ConfigurableProjectMojo implements PublicanPullOptions
{

   /**
    * Base directory for publican files (with subdirectory "pot" and optional
    * locale directories), although the location of "pot" can be overridden with
    * the dstDirPot option.
    * 
    * @parameter expression="${zanata.dstDir}"
    * @required
    */
   private File dstDir;

   /**
    * Base directory for pot files.
    * 
    * @parameter expression="${zanata.dstDirPot}"
    *            default-value="${zanata.dstDir}/pot"
    * @required
    */
   private File dstDirPot;

   /**
    * Export source text from Zanata to local POT files, overwriting or erasing
    * existing POT files (DANGER!)
    * 
    * @parameter expression="${zanata.exportPot}"
    */
   private boolean exportPot;

   public PublicanPullMojo() throws Exception
   {
      super();
   }

   public PublicanPullCommand initCommand()
   {
      return new PublicanPullCommand(this);
   }

   @Override
   public void setDstDir(File dstDir)
   {
      this.dstDir = dstDir;
   }

   @Override
   public void setDstDirPot(File dstDirPot)
   {
      this.dstDirPot = dstDirPot;
   }

   @Override
   public File getDstDir()
   {
      return dstDir;
   }

   @Override
   public File getDstDirPot()
   {
      return dstDirPot;
   }

   @Override
   public boolean getExportPot()
   {
      return exportPot;
   }

   @Override
   public void setExportPot(boolean exportPot)
   {
      this.exportPot = exportPot;
   }
   
   @Override
   public String getCommandName()
   {
      return "publican-pull";
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy