Reqstool Maven Plugin
Description
This Maven plugin generates a zip artifact containing combined annotations and various reports for Reqstool.
Configuration
To configure the plugin add a <configuration>
block for the plugin under the <build>
in pom.xml.
Complete Configuration Example
<build>
<plugins>
<plugin>
<groupId>se.lfv.reqstool</groupId>
<artifactId>reqstool-maven-plugin</artifactId>
<version>0.1.0</version>
<configuration>
<!-- File Paths -->
<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}/reqstool</datasetPath>
<!-- Test Results -->
<testResults>
<testResult>target/surefire-reports/**/*.xml</testResult>
<testResult>target/failsafe-reports/**/*.xml</testResult>
</testResults>
<!-- Project Reference -->
<project>${project}</project>
<log>${log}</log>
<!-- Execution Controls -->
<skip>false</skip>
<skipAssembleZipArtifact>false</skipAssembleZipArtifact>
<skipAttachZipArtifact>false</skipAttachZipArtifact>
</configuration>
</plugin>
</plugins>
</build>
Configuration Parameters
requirementsAnnotationsFile
The requirementsAnnotationsFile
parameter specifies the path to the requirements annotations file.
Defaults to the value set below.
<configuration>
<requirementsAnnotationsFile>
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
</requirementsAnnotationsFile>
</configuration>
svcsAnnotationsFile
The svcsAnnotationsFile
parameter specifies the path to the svcs annotations file.
Defaults to the value set below.
<configuration>
<svcsAnnotationsFile>
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml
</svcsAnnotationsFile>
</configuration>
outputDirectory
The outputDirectory
parameter specifies the path to where to put the generated output.
Defaults to the value set below.
<configuration>
<outputDirectory>
${project.build.directory}/reqstool
</outputDirectory>
</configuration>
datasetPath
The datasetPath
parameter specifies the path to the dataset.
Defaults to the value set below.
<configuration>
<datasetPath>
${project.basedir}/reqstool
</datasetPath>
</configuration>
project
The project
parameter specifies the name of the maven project.
Defaults to the value set below.
<configuration>
<project>
${project}
</project>
</configuration>
testResults
The testResults
parameter specifies one or more testResult paths.
<configuration>
<testResults>
<testResult>path/to/test/result.xml</testResult>
<testResult>path/to/test/result.xml</testResult>
</testResults>
</configuration>
log
The log
parameter specifies the log.
Defaults to the value set below.
<configuration>
<log>
${log}
</log>
</configuration>
skip
Skip the execution of the plugin. Defaults to the value set below.
<configuration>
<skip>
false
</skip>
</configuration>
skipAssembleZipArtifact
Skip zip artifact assembly. Defaults to the value set below.
<configuration>
<skipAssembleZipArtifact>
false
</skipAssembleZipArtifact>
</configuration>
skipAttachZipArtifact
Skip zip artifact attachment. Defaults to the value set below.
<configuration>
<skipAttachZipArtifact>
false
</skipAttachZipArtifact>
</configuration>
Notes:
-
All path parameters support both absolute and relative paths
-
Maven property placeholders (
${…}
) can be used in all configuration values -
The plugin executes in the
verify
phase by default -
Test result paths support Ant-style pattern matching
Usage
To use the LFV Reqstool Java Maven Plugin, add the following configuration to your Maven project’s pom.xml
:
<build>
<plugins>
<plugin>
<groupId>se.lfv.reqstool</groupId>
<artifactId>reqstool-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<goals>
<goal>assemble-and-attach-zip-artifact</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>se.lfv.reqstool</groupId>
<artifactId>reqstool-java-annotations</artifactId>
<version>0.1.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
The default <phase>
the plugin runs during is verify
, this is done to ensure all test files are generated before the plugin runs.