com.atlassian.maven.plugins.testharness
Class AbstractStartCargoServiceMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.atlassian.maven.plugins.testharness.AbstractStartServiceMojo
          extended by com.atlassian.maven.plugins.testharness.AbstractStartCargoServiceMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
StartBambooMojo, StartConfluenceMojo, StartJiraMojo

public abstract class AbstractStartCargoServiceMojo
extends AbstractStartServiceMojo

A base class for services that use Cargo to start.

Since:
0.3
Author:
Tim Moore (tmoore@atlassian.com)

Field Summary
 
Fields inherited from class com.atlassian.maven.plugins.testharness.AbstractStartServiceMojo
WEB_APP_LIB_DIR
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractStartCargoServiceMojo()
           
 
Method Summary
protected abstract  java.lang.String[] getExtraClassPathElements()
          set of strings that will be added to the classpath for the application Container
protected abstract  java.util.Map getSystemProperties()
          System properties to be set on the application Container.
protected  void installDependencies()
          Installs dependencies into the container
protected  void installThisArtifact()
           
protected  void removeConflictingJars()
          Remove jar files from WEB-INF/lib based on configuration.
protected  void startContainer()
          setups up the application Container and then starts it
 
Methods inherited from class com.atlassian.maven.plugins.testharness.AbstractStartServiceMojo
configureWebapp, copyDependenciesTo, execute, expandArtifact, getApplicationDependencies, getContainer, getContainerOutputLog, getDefaultServiceDirectory, getDependencyUtils, getLocalRepository, getProject, getRegexesOfJarFilesToRemove, getRemoteRepositories, getService, getServiceConfigDirectory, getServiceName, getServiceWebappDirectory, installThisArtifactsDependencies, loadDependencyList, resolveDependencies, setContainer, setDependencyUtils, setLocalRepository, setProject, setRemoteRepositories, setService
 
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
 

Constructor Detail

AbstractStartCargoServiceMojo

public AbstractStartCargoServiceMojo()
Method Detail

removeConflictingJars

protected void removeConflictingJars()
                              throws org.apache.maven.plugin.MojoExecutionException
Remove jar files from WEB-INF/lib based on configuration.

Specified by:
removeConflictingJars in class AbstractStartServiceMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - Throw if there are any errors removing existing dependencies.

installDependencies

protected void installDependencies()
                            throws org.apache.maven.plugin.MojoExecutionException
Description copied from class: AbstractStartServiceMojo
Installs dependencies into the container

Specified by:
installDependencies in class AbstractStartServiceMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs installing the dependencies

installThisArtifact

protected void installThisArtifact()
                            throws org.apache.maven.plugin.MojoExecutionException
Specified by:
installThisArtifact in class AbstractStartServiceMojo
Throws:
org.apache.maven.plugin.MojoExecutionException

startContainer

protected void startContainer()
                       throws org.apache.maven.plugin.MojoExecutionException
setups up the application Container and then starts it

Specified by:
startContainer in class AbstractStartServiceMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs starting or running the container

getSystemProperties

protected abstract java.util.Map getSystemProperties()
System properties to be set on the application Container.

Returns:
A Map of the system properties.

getExtraClassPathElements

protected abstract java.lang.String[] getExtraClassPathElements()
                                                         throws org.apache.maven.artifact.resolver.AbstractArtifactResolutionException,
                                                                org.apache.maven.project.artifact.InvalidDependencyVersionException
set of strings that will be added to the classpath for the application Container

Throws:
org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
org.apache.maven.project.artifact.InvalidDependencyVersionException


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.