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
verifyphase 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
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>
</plugin>
</plugins>
</build>
Default Behavior
The plugin automatically:
-
Runs during the
verifyphase (after all tests complete) -
Combines annotation files from
target/generated-sources/andtarget/generated-test-sources/ -
Creates a ZIP artifact in
target/reqstool/containing:-
requirements.yml(from./reqstool/directory) -
software_verification_cases.yml(optional) -
manual_verification_results.yml(optional) -
annotations.yml(combined/merged annotations) -
test_results/(XML test results from Surefire and Failsafe) -
reqstool_config.yml(configuration manifest)
-
-
Attaches the ZIP for deployment to Maven repositories
Minimal Setup
Create a reqstool/ directory in your project root with a requirements.yml file:
my-project/
├── pom.xml
├── reqstool/
│ └── requirements.yml (mandatory)
└── src/
Run mvn verify and the ZIP artifact will be created automatically.