reqstool Maven Plugin

This Maven plugin generates a ZIP artifact containing combined annotations and various reports for reqstool. It provides sensible defaults while allowing full customization.

Features

  • Sensible defaults: Works out of the box with standard Maven project layouts

  • Automatic lifecycle integration: Runs in the verify phase to ensure tests complete first

  • Maven repository publishing: ZIP artifact is attached for deployment to Maven repositories

  • Combines annotations: Merges requirements annotations from implementation and test code

  • Assembles ZIP artifact: Creates structured ZIP containing requirements, test results, and configuration

Quick Start

Add the plugin

<build>
    <plugins>
        <plugin>
            <groupId>io.github.reqstool</groupId>
            <artifactId>reqstool-maven-plugin</artifactId>
            <version>1.0.4</version>
            <executions>
                <execution>
                    <goals>
                        <goal>assemble-and-attach-zip-artifact</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <datasetPath>${project.basedir}/docs/reqstool</datasetPath>
            </configuration>
        </plugin>
    </plugins>
</build>

Default behavior

The plugin automatically:

  1. Runs during the verify phase (after all tests complete)

  2. Combines annotation files from target/generated-sources/ and target/generated-test-sources/

  3. Creates a ZIP artifact in target/reqstool/ containing:

    • requirements.yml (from datasetPath directory)

    • software_verification_cases.yml (optional)

    • manual_verification_results.yml (optional)

    • annotations.yml (combined annotations)

    • test_results/ (XML test results matching testResults patterns)

    • reqstool_config.yml (configuration manifest)

  4. Attaches the ZIP for deployment to Maven repositories

Minimal setup

Create a dataset directory with a requirements.yml file:

my-project/
├── pom.xml
├── docs/reqstool/
│   └── requirements.yml  (mandatory)
└── src/

Run mvn verify and the ZIP artifact will be created automatically.

Prerequisites

  • Maven 3.9+

  • Java 21+

  • A requirements.yml file in the dataset directory (default: reqstool/)

License

MIT License.