Dashboard > GreenPepper Open Documentation Refactoring > ... > 4. Advanced Confluence > Maven Runner
  GreenPepper Open Documentation Refactoring Log In View a printable version of the current page.  
  Maven Runner
Added by Laurent Cobos, last edited by Francois Denommee on Feb 14, 2011  (view change)
Labels: 
(None)

Maven Runner

These are the steps needed to configure the Maven runner.
Before you begin, you must verify the following:

Maven Runner

Configuring a System Under Test can be tedious if you are having a lot of library dependencies. The Maven Runner allow you to use your existing pom.xml to resolve dependencies needed for the execution of specifications. Only the <dependencies> element of the pom.xml is read. Artifacts found will be resolved and added to the classpath of the runner. The artifact of the project itself will also be part of the classpath.

Maven Runner Configuration

  From the Runner Configuration Panel, please follow these steps.

  1. Click on Add a new Runner


  2. Enter the name of your Runner (Mandatory)
  3. Enter the Command line (please refer to Executing a Specification)
    Know that (similar to velocity)
    • ${classpaths} will be replaced by the Runner, SUT and Fixtures classpaths -(Mandatory for GP)
    • ${mainClass} will be replaced by the Runner specified Main Class -(Mandatory for GP)
    • ${inputPath} will be replaced by an input path -(Mandatory for GP)
    • ${outputPath} will be replaced by an output path -(Mandatory for GP)
    • ${locale} will be replaced by the user locale -Default: English (java only)
    • ${repository} will be replace by the repository of the Specification resolver class -Default: FileSystemRepository
    • ${fixtureFactory} will be replaced by the SUT Fixture Factory Class;Fixture Factory Args -Default: CoreFixtureFactory
    • ${projectDependencyDescriptor} will be replaced by the project dependency descriptor file location-(Mandatory for the Maven runner)
      Example of a command line:
      java -mx252m -cp ${classpaths} ${mainClass} ${inputPath} ${outputPath} -l ${locale} -r ${repository} -f ${fixtureFactory} --xml --pdd ${projectDependencyDescriptor}
  4. The main class : com.greenpepper.maven.runner.Main -(Mandatory, main Maven runner class)
  5. The Server name and port (if you are using the Remote agent)


  6. Click Save
  7. Enter the location of your Runner library and its dependencies.
    • GreenPepper Maven Runner library
      • greenpepper-maven-runner-x.x-complete.jar
    • Maven libraries
      • maven-2.x.x-uber.jar from the lib directory of your Maven home
      • classworlds-1.1.jar from the boot directory of your Maven home

System Under Test Configuration

Make sure your Confluence Space is registered as a GreenPepper Project (see)

From the Space Registration Panel, please follow these steps.

  1. Click on Add a new System Under Test
  2. Enter the name of your System Under Test (Mandatory)
  3. Select your Maven runner (Mandatory)
  4. Enter the Fixture factory to use (optional)
  5. Enter the Fixture arguments (optional)
  6. Enter the Project Dependency Descriptor (Mandatory)
    • Since we are using Maven, there is 2 possibilities :
      • use a valid Project Object Model file (pom.xml)
      • NEW in 2.8 use the groupId:artifactId:version (Maven Coordinates) where the version can be a Version Ranges
        Ex:
        greenpepper-open:greenpepper-core:2.7
        greenpepper-open:greenpepper-extensions-db:[2.7,)

        You may need to add required repositories to the settings.xml of Maven (or routing all repositories using the mirrors) using the coordinates.
  7. Click Save

Maven Plugin Fixture Artifact Dependency

By default, the Maven Runner will detect if the pom.xml is using the Maven Plugin to create fixture artifact. If so, the fixture artifact will be automatically added to the list of dependencies.

However, if you want to use a fixture artifact from another project, you will need to add the <dependency> of that project with <classifier>fixtures</classifier>.

NEW in 2.7.1/2.8.1/2.9 scopes
You can now specify scope on the command line (by default, runtime and compile are always use) :

--scope provided

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators