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:
BackendGoalBase, CronGoal, CronInfoGoal, DOSGoal, EnhanceGoal, IndexGoal, LogsGoal, RollbackGoal, StartGoal, UnpackGoal, UpdateGoal, 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  java.lang.String appDir
          Overrides where the Project War Directory is located.
protected  java.lang.String appId
          The app id.
protected  java.lang.String appVersion
          The app version.
protected static java.lang.String[] ARG_TYPE
           
protected  org.codehaus.plexus.PlexusContainer container
          Plexus container, needed to manually lookup components.
protected  java.lang.String emailAccount
          Deprecated. use maven settings.xml/server/username and "serverId" parameter
protected  java.lang.String encoding
          The character encoding scheme to be applied interacting with the SDK.
protected  java.util.Properties gaeProperties
           
protected  java.util.List<java.lang.String> goalArguments
          Arbitrary list of Goal Arguments to pass along to the app engine task.
protected  java.lang.String hostString
          Overrides the Host header sent with all RPCs.
protected  boolean keepTempUploadDir
          Do not delete temporary directory used in uploading.
protected  java.lang.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  java.lang.String proxy
          Tell AppCfg to use a proxy.
protected  java.lang.String sdkDir
          Specifies where the Google App Engine SDK is located.
protected  java.lang.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  java.lang.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
 void contextualize(org.codehaus.plexus.context.Context context)
           
protected  void ensureSystemProperties()
          Groups alterations to System properties for the proper execution of the actual GAE code.
protected  java.util.List<java.lang.String> getAppCfgArgs()
          Generate all common Google AppEngine Task Parameters for use in all the goals.
protected  java.util.List<java.lang.String> getCommonArgs()
           
protected  boolean hasServerSettings()
           
protected  void runAppCfg(java.lang.String command, java.lang.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 java.lang.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.


encoding

protected java.lang.String encoding
The character encoding scheme to be applied interacting with the SDK. Sent as the --compile_encoding flag.

Since:
0.8.3

appDir

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


sdkDir

protected java.lang.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 java.lang.String emailAccount
Deprecated. use maven settings.xml/server/username and "serverId" parameter
The username to use. Will prompt if omitted.


serverId

protected java.lang.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 java.lang.String uploadServer
The server to connect to.


appId

protected java.lang.String appId
The app id. If defined, it overrides the application name defined in the appengine-web.xml.

Since:
0.9.3

appVersion

protected java.lang.String appVersion
The app version. If defined, it overrides the application major version defined in the appengine-web.xml.

Since:
0.9.3

hostString

protected java.lang.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 java.lang.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 java.lang.String monitorKey
Key to provide when making stop requests.


goalArguments

protected java.util.List<java.lang.String> goalArguments
Arbitrary list of Goal Arguments to pass along to the app engine task.

Since:
0.9.4

gaeProperties

protected java.util.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(java.lang.String command,
                               java.lang.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 ensureSystemProperties() fails

ensureSystemProperties

protected void ensureSystemProperties()
                               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 java.util.List<java.lang.String> getAppCfgArgs()
Generate all common Google AppEngine Task Parameters for use in all the goals.

Returns:
List of arguments to add.

getCommonArgs

protected final java.util.List<java.lang.String> getCommonArgs()


Copyright © 2009-2012 KindleIT. All Rights Reserved.