specs2 Maven plugin

A Maven plugin that executes specs2 specifications

License

License

BSD
Categories

Categories

Maven Build Tools
GroupId

GroupId

com.mmakowski
ArtifactId

ArtifactId

maven-specs2-plugin
Last Version

Last Version

0.4.3
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

specs2 Maven plugin
A Maven plugin that executes specs2 specifications
Project URL

Project URL

https://github.com/mmakowski/maven-specs2-plugin
Source Code Management

Source Code Management

https://github.com/mmakowski/maven-specs2-plugin

Download maven-specs2-plugin

How to add to project

<plugin>
    <groupId>com.mmakowski</groupId>
    <artifactId>maven-specs2-plugin</artifactId>
    <version>0.4.3</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
org.apache.maven : maven-project jar 2.0.9
org.apache.maven : maven-artifact jar 2.0.9
org.apache.maven : maven-plugin-api jar 2.0.9
org.scala-lang : scala-library jar 2.11.0
com.github.scala-incubator.io : scala-io-core_2.11 jar 0.4.3
com.github.scala-incubator.io : scala-io-file_2.11 jar 0.4.3
org.pegdown : pegdown jar 1.2.1
org.scala-tools.testing : test-interface jar 0.5
junit : junit jar 4.9

Project Modules

There are no modules declared in this project.

Specs2 Maven Plug-in

Build Status Maven Central

This plug-in executes specs2 specifications that have been previously compiled to the test classes directory. It assumes that all specification classes have names ending with specified suffix (Spec by default) and that all classes with such name are specifications.

NOTE: the plugin only supports specs2 2.x. It does not work with specs2 3.x.

Usage

Add this to the build/plugins section of your pom:

<plugin>
  <groupId>com.mmakowski</groupId>
  <artifactId>specs2-maven-plugin</artifactId>
  <version>0.4.4</version>
  <executions>
    <execution>
      <id>verify</id>
      <phase>verify</phase>
      <goals>
        <goal>run-specs</goal>
      </goals>
    </execution>
  </executions>
</plugin>

now the verify phase of your maven build will execute all specifications in your project and will generate HTML reports (in target/specs2-reports) and JUnit XML reports (in target/test-reports).

Features

When run-specs goal is executed, the plug-in:

  1. finds all classes whose name ends with specified suffix in the test classes directory (typically target/test-classes) and attempts to execute each, generating a JUnit XML and HTML reports;
  2. finds a class called index in the test classes directory and attempts to generate a HTML report from it.

Limitations

At the moment each version of the plug-in works with a specific version of Scala only:

scala version recommended plugin version
2.9.1 0.3.0
2.10 0.4.2
2.11 0.4.4

Credits

The plug-in is maintained by Maciek Makowski with contributions from:

Versions

Version
0.4.3
0.4.2
0.4.1
0.4.0
0.4.0-RC1
0.3.0
0.2.1
0.2.0
0.1.0