Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

 

Installing the GreenPepper Maven Plugin

 

In order to install the GreenPepper Maven Plugin, it is necessary to add a plugin entry to your project's pom.xml.

<plugin>
	<groupId>com.greenpepper</groupId>
	<artifactId>greenpepper-maven-plugin</artifactId>
	<version>4.0.0-SNAPSHOT</version>
	...
	<!-- further configuration here -->
</plugin>

 

For automatic downloads and upgrades, it is possible to add additional repositories to your project's pom.xml like this:

<repositories>
	<repository>
		<id>novatec</id>
		<url>http://nexus.novatec-gmbh.lan/content/groups/public</url>
		<snapshots>
			<enabled>true</enabled>
			<updatePolicy>never</updatePolicy>
		</snapshots>
		<releases>
			<enabled>true</enabled>
			<updatePolicy>never</updatePolicy>
		</releases>
</repositories>
 
<pluginRepositories>
	<id>novatec</id>
	<url>http://nexus.novatec-gmbh.lan/content/groups/public</url>
	<snapshots>
		<enabled>true</enabled>
		<updatePolicy>never</updatePolicy>
	</snapshots>
	<releases>
		<enabled>true</enabled>
		<updatePolicy>never</updatePolicy>
	</releases>
</pluginRepositories>

 

 

Configuring the GreenPepper Maven Plugin

 

Considering the default Maven Build Lifecycle, there are three phases in which the GreenPepper Maven Plugin is used.
 

  • During the Pre-Integration Test, the plugin is used to compile and copy the fixture classes of an application. By default, the compiled classes are copied to:
    ${project.build.directory}/fixture-test-classes/
  • During the next phase, the Integration Test, the plugin is used to execute the specifications of an application. As the result of an execution, it generates reports in plain HTML or XML file format which are by default stored in:
    ${basedir}/target/greenpepper-reports/
  • Finally, during the Post-Integration Test, the plugin creates the fixture jars of an application. These are typically generated in:
    ${basedir}/target/

 

In step one ("Installing the GreenPepper Maven Plugin") we had a look on a short block of code where it said "further configuration here". Below you find an example of how said configuration could look like.

<plugin>
	<groupId>com.greenpepper</groupId>
	<artifactId>greenpepper-maven-plugin</artifactId>
	<version><!-- your version of the GreenPepper Maven Plugin --></version>
	<configuration>
	    <source><!-- your source version --></source>
	    <target><!-- your target version --></target>
	    <fixtureSourceDirectory><!-- source directory of your fixtures, for example: src/fixture/java --></fixtureSourceDirectory>
	    <fixtureOutputDirectory><!-- output directory of the compiled fixture classes, for example: target/fixture-test-classes --></fixtureOutputDirectory>
	    <specsDirectory><!-- destination for downloaded specification files, for example: src/sprecs--></specsDirectory>
		<reportsDirectory><!-- destination for generated HTML reports, for example: target/greenpepper-reports</reportsDirectory>
		<reportsType><!-- the file format of your reports (XML or HTML) --></reportsType>
	    <resources>
	        <resource>
	            <directory><! -- directory for a specific resource. Example: src/fixture/resources--></directory>
	            <excludes>
	                <exclude>**/*.java</exclude>
	            </excludes>
	        </resource>
	    </resources>
	    <repositories>
	        <repository>
		        <type><!-- fully qualified name of your suit resolver class, for instance: com.greenpepper.repository.FileSystemRepository --></type>
				<root><!-- root directory of the current repository. Example: ${basedir}/src/fixture/specs --></root>
		        <suites>
		        	<suite><!-- the suit's URI --></suite>
		        </suites>
	        </repository>
	        <repository>
	            <type><!-- fully qualified name of your test resolver. --></type>
	            <tests>
	            	<test><!-- the test's URI --></test>
	            </tests>
	        </repository>
	    </repositories>
	</configuration>
<plugin>

 


 

 

 

 

 

 

 

 

 

 

 

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.