Maven build plugin for reqstool that assembles requirements traceability artifacts.
Collects @Requirements and @SVCs annotations from compiled Java code, combines them with test results, and packages everything into a ZIP artifact for analysis by the reqstool CLI.
The plugin binds to the verify lifecycle phase and runs automatically after tests complete. No additional lifecycle configuration is needed in most projects.
Add the plugin to your pom.xml:
<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>All parameters are optional. Defaults match the standard Maven project layout.
| Parameter | Type | Default | Description |
|---|---|---|---|
requirementsAnnotationsFile |
File |
${project.build.directory}/generated-sources/annotations/resources/annotations.yml |
Requirements annotations YAML file generated by the annotation processor for the main source set |
svcsAnnotationsFile |
File |
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml |
SVCs annotations YAML file generated by the annotation processor for the test source set |
outputDirectory |
File |
${project.build.directory}/reqstool |
Output directory for the ZIP artifact and combined annotations file |
datasetPath |
File |
${project.basedir}/reqstool |
Directory containing requirements.yml and optional supporting files |
testResults |
String[] |
(none) | Ant-style glob patterns for test result XML files to include in the ZIP |
skip |
boolean |
false |
Skip all plugin execution |
skipAssembleZipArtifact |
boolean |
false |
Skip ZIP assembly; annotations are still combined into annotations.yml |
skipAttachZipArtifact |
boolean |
false |
Skip attaching the ZIP artifact to the Maven project |
The datasetPath directory must contain at minimum a requirements.yml file. Optional files in the same directory are included if present:
| File | Required |
|---|---|
requirements.yml |
Yes |
software_verification_cases.yml |
No |
manual_verification_results.yml |
No |
<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>
<requirementsAnnotationsFile>
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
</requirementsAnnotationsFile>
<svcsAnnotationsFile>
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml
</svcsAnnotationsFile>
<outputDirectory>${project.build.directory}/reqstool</outputDirectory>
<datasetPath>${project.basedir}/docs/reqstool</datasetPath>
<testResults>
<testResult>target/surefire-reports/**/*.xml</testResult>
<testResult>target/failsafe-reports/**/*.xml</testResult>
</testResults>
<skip>false</skip>
<skipAssembleZipArtifact>false</skipAssembleZipArtifact>
<skipAttachZipArtifact>false</skipAttachZipArtifact>
</configuration>
</plugin>All parameters can be overridden on the command line using the reqstool. prefix:
mvn verify -Dreqstool.skip=true
mvn verify -Dreqstool.datasetPath=/custom/path
mvn verify -Dreqstool.skipAssembleZipArtifact=trueDefault phase: verify
Combines requirements and SVCs annotations, writes a merged annotations.yml to outputDirectory, and (unless skipAssembleZipArtifact is set) assembles a ZIP artifact at <outputDirectory>/<finalName>-reqstool.zip. The ZIP is attached to the Maven project with classifier reqstool and extension zip.
mvn clean verifyThe plugin generates a ZIP artifact in target/reqstool/ containing requirements, annotations, and test results.
Full documentation can be found here.
See the organization-wide CONTRIBUTING.md.
MIT License.