com.lazerycode.selenium
Class SeleniumServerMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.lazerycode.selenium.SeleniumServerMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class SeleniumServerMojo
extends org.apache.maven.plugin.AbstractMojo

Selenium Standalone Server Maven Plugin

Author:
Mark Collin

Field Summary
protected  File customRepositoryMap
          Absolute path to the XML RepositoryMap
protected  File downloadedZipFileDirectory
          Directory where downloaded standalone executable zip files will be saved
protected  int fileDownloadConnectTimeout
          the number of milliseconds until this method will timeout if no connection could be established to remote file location
protected  int fileDownloadReadTimeout
          the number of milliseconds until this method will timeout if if no data could be read from remote file location
protected  int fileDownloadRetryAttempts
          Number of times to retry the file download of each executable
protected  Map<String,String> getSpecificExecutableVersions
          A map of driver standalone versions to download
protected  boolean onlyGetLatestVersions
          Only get the latest version of each standalone executable in RepositoryMap.xml
protected  Map<String,String> operatingSystems
          The Operating systems you would like to download a standalone executable for
protected  boolean overwriteFilesThatExist
          Force the plugin to overwrite any files that have already been extracted from a valid zip file
protected  File rootStandaloneServerDirectory
          Root directory where the standalone server file structure will be created and files will be saved
protected  boolean sixtyFourBitBinaries
          Download 64 bit standalone executable
protected  boolean thirtyTwoBitBinaries
          Download 32 bit standalone executable
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
SeleniumServerMojo()
           
 
Method Summary
 void execute()
           
 
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
 

Field Detail

rootStandaloneServerDirectory

protected File rootStandaloneServerDirectory

Root directory where the standalone server file structure will be created and files will be saved

<rootStandaloneServerDirectory>${project.basedir}/src/main/resources/standalone_executable_root</rootStandaloneServerDirectory>


downloadedZipFileDirectory

protected File downloadedZipFileDirectory

Directory where downloaded standalone executable zip files will be saved

<downloadedZipFileDirectory>${project.basedir}/src/main/resources/downloaded_zip_files</downloadedZipFileDirectory>


customRepositoryMap

protected File customRepositoryMap

Absolute path to the XML RepositoryMap

<xmlRepositoryMap>${project.basedir}/src/main/resources/RepositoryMap.xml</xmlRepositoryMap>


operatingSystems

protected Map<String,String> operatingSystems

The Operating systems you would like to download a standalone executable for

<operatingSystems> <windows>true</windows> <linux>true</linux> <osx>true</osx> </operatingSystems>

Unknown operating systems will cause an error to be thrown, only use the options shown above.

Default:All operating systems.


thirtyTwoBitBinaries

protected boolean thirtyTwoBitBinaries

Download 32 bit standalone executable

.

<thirtyTwoBitBinaries>true</thirtyTwoBitBinaries>


sixtyFourBitBinaries

protected boolean sixtyFourBitBinaries

Download 64 bit standalone executable

<sixtyFourBitBinaries>true</sixtyFourBitBinaries>


onlyGetLatestVersions

protected boolean onlyGetLatestVersions

Only get the latest version of each standalone executable in RepositoryMap.xml

<onlyGetLatestVersions>true</onlyGetLatestVersions>

If set to false this will download all versions specified in the RepositoryMap.xml

This will be ignored if specific executable versions have been specified


getSpecificExecutableVersions

protected Map<String,String> getSpecificExecutableVersions

A map of driver standalone versions to download

<getSpecificExecutableVersions> <googlechrome>19</googlechrome> <internetexplorer>2.21.0</internetexplorer> </getSpecificExecutableVersions>

Unrecognised browser names/versions will be ignored


fileDownloadRetryAttempts

protected int fileDownloadRetryAttempts

Number of times to retry the file download of each executable

<fileDownloadRetryAttempts>1</fileDownloadRetryAttempts>


fileDownloadConnectTimeout

protected int fileDownloadConnectTimeout

the number of milliseconds until this method will timeout if no connection could be established to remote file location

<fileDownloadConnectTimeout>15000</fileDownloadConnectTimeout>


fileDownloadReadTimeout

protected int fileDownloadReadTimeout

the number of milliseconds until this method will timeout if if no data could be read from remote file location

<fileDownloadReadTimeout>15000</fileDownloadReadTimeout>


overwriteFilesThatExist

protected boolean overwriteFilesThatExist

Force the plugin to overwrite any files that have already been extracted from a valid zip file

<overwriteFilesThatExist>false</overwriteFilesThatExist>

crc checks are not performed on files that have been extracted from valid zips, they are assumed to be valid. This will force the plugin to extract everything from valid zips again and overwrite any existing files.

This does not clean out old files, it only writes new files over the top of existing ones.

Constructor Detail

SeleniumServerMojo

public SeleniumServerMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException


Copyright © 2012. All Rights Reserved.