net.kindleit.gae
Class EngineGoalBase

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.kindleit.gae.EngineGoalBase
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Direct Known Subclasses:
CronInfoGoal, DeployGoal, EnhanceGoal, IndexGoal, LogsGoal, RollbackGoal, StartGoal, UnpackGoal, VersionGoal

public abstract class EngineGoalBase
extends org.apache.maven.plugin.AbstractMojo
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Base MOJO class for working with the Google App Engine SDK.

Author:
rhansen@kindleit.net

Field Summary
protected  String appDir
          Overrides where the Project War Directory is located.
protected static String[] ARG_TYPE
           
protected  org.codehaus.plexus.PlexusContainer container
          Plexus container, needed to manually lookup components.
protected  String emailAccount
          Deprecated. use maven settings.xml/server/username and "serverId" parameter
protected  Properties gaeProperties
           
protected  String hostString
          Overrides the Host header sent with all RPCs.
protected  boolean keepTempUploadDir
          Do not delete temporary directory used in uploading.
protected  String monitorKey
          Key to provide when making stop requests.
protected  int monitorPort
          Port to listen for stop requests on.
protected  boolean passIn
          Always read the login password from stdin.
protected  String proxy
          Tell AppCfg to use a proxy.
protected  String sdkDir
          Specifies where the Google App Engine SDK is located.
protected  String serverId
          The server id in maven settings.xml to use for emailAccount(username) and password when connecting to GAE.
protected  org.apache.maven.settings.Settings settings
          The Maven settings reference.
protected  boolean splitJars
          Split large jar files (> 10M) into smaller fragments.
protected  String uploadServer
          The server to connect to.
protected  boolean wait
          Decides whether to wait after the server is started or to return the execution flow to the user.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EngineGoalBase()
           
 
Method Summary
protected  void assureSystemProperties()
          Groups alterations to System properties for the proper execution of the actual GAE code.
 void contextualize(org.codehaus.plexus.context.Context context)
           
protected  List<String> getAppCfgArgs()
          Generate all common Google AppEngine Task Parameters for use in all the goals.
protected  List<String> getCommonArgs()
           
protected  boolean hasServerSettings()
           
protected  void runAppCfg(String command, String... commandArguments)
          Passes command to the Google App Engine AppCfg runner.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

ARG_TYPE

protected static final String[] ARG_TYPE

container

protected org.codehaus.plexus.PlexusContainer container
Plexus container, needed to manually lookup components. To be able to use Password Encryption http://maven.apache.org/guides/mini/guide-encryption.html


settings

protected org.apache.maven.settings.Settings settings
The Maven settings reference.


appDir

protected String appDir
Overrides where the Project War Directory is located.


sdkDir

protected String sdkDir
Specifies where the Google App Engine SDK is located.


splitJars

protected boolean splitJars
Split large jar files (> 10M) into smaller fragments.


emailAccount

@Deprecated
protected String emailAccount
Deprecated. use maven settings.xml/server/username and "serverId" parameter
The username to use. Will prompt if omitted.


serverId

protected String serverId
The server id in maven settings.xml to use for emailAccount(username) and password when connecting to GAE. If password present in settings "--passin" is set automatically.


uploadServer

protected String uploadServer
The server to connect to.


hostString

protected String hostString
Overrides the Host header sent with all RPCs.


keepTempUploadDir

protected boolean keepTempUploadDir
Do not delete temporary directory used in uploading.


passIn

protected boolean passIn
Always read the login password from stdin.


proxy

protected String proxy
Tell AppCfg to use a proxy. By default will use first active proxy in maven settings.xml


wait

protected boolean wait
Decides whether to wait after the server is started or to return the execution flow to the user.


monitorPort

protected int monitorPort
Port to listen for stop requests on.


monitorKey

protected String monitorKey
Key to provide when making stop requests.


gaeProperties

protected Properties gaeProperties
Constructor Detail

EngineGoalBase

public EngineGoalBase()
Method Detail

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException

hasServerSettings

protected boolean hasServerSettings()

runAppCfg

protected final void runAppCfg(String command,
                               String... commandArguments)
                        throws org.apache.maven.plugin.MojoExecutionException
Passes command to the Google App Engine AppCfg runner.

Parameters:
command - command to run through AppCfg
commandArguments - arguments to the AppCfg command.
Throws:
org.apache.maven.plugin.MojoExecutionException - If assureSystemProperties() fails

assureSystemProperties

protected void assureSystemProperties()
                               throws org.apache.maven.plugin.MojoExecutionException
Groups alterations to System properties for the proper execution of the actual GAE code.

Throws:
org.apache.maven.plugin.MojoExecutionException - When the gae.home variable cannot be set.

getAppCfgArgs

protected final List<String> getAppCfgArgs()
Generate all common Google AppEngine Task Parameters for use in all the goals.

Returns:
List of arguments to add.

getCommonArgs

protected final List<String> getCommonArgs()


Copyright © 2009-2010 KindleIT. All Rights Reserved.