Skip to content

Commit 963e412

Browse files
author
Jimisola Laursen
committed
docs: rewrite plugin docs using Gradle template structure
- Add features list, quick start, minimal setup, prerequisites - Improve configuration with inline comments and better descriptions - Add manual invocation, annotation dependency, lifecycle docs - Convert markdown fenced blocks to AsciiDoc source blocks - Remove project/log params (Maven internal, not user-facing) - Simplify license page Signed-off-by: jimisola <jimisola@jimisola.com>
1 parent ae2f510 commit 963e412

4 files changed

Lines changed: 212 additions & 157 deletions

File tree

Lines changed: 91 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,194 +1,141 @@
11
== Configuration
22

3-
To configure the plugin add a `<configuration>` block for the plugin under the `<build>` in pom.xml.
4-
5-
== Complete Configuration Example
6-
7-
```xml
8-
<build>
9-
<plugins>
10-
<plugin>
11-
<groupId>io.github.reqstool</groupId>
12-
<artifactId>reqstool-maven-plugin</artifactId>
13-
<version>1.0.4</version>
14-
<configuration>
15-
<!-- File Paths -->
16-
<requirementsAnnotationsFile>
17-
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
18-
</requirementsAnnotationsFile>
19-
<svcsAnnotationsFile>
20-
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml
21-
</svcsAnnotationsFile>
22-
<outputDirectory>
23-
${project.build.directory}/reqstool
24-
</outputDirectory>
25-
<datasetPath>${project.basedir}/reqstool</datasetPath>
26-
27-
<!-- Test Results -->
28-
<testResults>
29-
<testResult>target/surefire-reports/**/*.xml</testResult>
30-
<testResult>target/failsafe-reports/**/*.xml</testResult>
31-
</testResults>
32-
33-
<!-- Project Reference -->
34-
<project>${project}</project>
35-
<log>${log}</log>
36-
37-
<!-- Execution Controls -->
38-
<skip>false</skip>
39-
<skipAssembleZipArtifact>false</skipAssembleZipArtifact>
40-
<skipAttachZipArtifact>false</skipAttachZipArtifact>
41-
</configuration>
42-
</plugin>
43-
</plugins>
44-
</build>
45-
```
46-
47-
== Configuration Parameters
48-
49-
=== requirementsAnnotationsFile
3+
The plugin provides sensible defaults, but you can customize if needed by adding a `<configuration>` block in your `pom.xml`:
504

51-
The `requirementsAnnotationsFile` parameter specifies the path to the requirements annotations file.
52-
Defaults to the value set below.
5+
=== Complete Configuration Example
536

54-
```xml
7+
[source,xml]
8+
----
559
<configuration>
10+
<!-- Path to requirements annotations YAML -->
11+
<!-- Default: ${project.build.directory}/generated-sources/annotations/resources/annotations.yml -->
5612
<requirementsAnnotationsFile>
5713
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
5814
</requirementsAnnotationsFile>
59-
</configuration>
6015
61-
```
62-
63-
=== svcsAnnotationsFile
64-
65-
The `svcsAnnotationsFile` parameter specifies the path to the svcs annotations file.
66-
Defaults to the value set below.
67-
68-
```xml
69-
<configuration>
16+
<!-- Path to SVCS (Software Verification Cases) annotations YAML -->
17+
<!-- Default: ${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml -->
7018
<svcsAnnotationsFile>
7119
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml
7220
</svcsAnnotationsFile>
73-
</configuration>
7421
75-
```
22+
<!-- Output directory for ZIP and combined annotations -->
23+
<!-- Default: ${project.build.directory}/reqstool -->
24+
<outputDirectory>${project.build.directory}/reqstool</outputDirectory>
7625
77-
=== outputDirectory
26+
<!-- Dataset directory containing requirements.yml and optional files -->
27+
<!-- Default: ${project.basedir}/reqstool -->
28+
<datasetPath>${project.basedir}/reqstool</datasetPath>
7829
79-
The `outputDirectory` parameter specifies the path to where to put the generated output.
80-
Defaults to the value set below.
81-
82-
```xml
83-
<configuration>
84-
<outputDirectory>
85-
${project.build.directory}/reqstool
86-
</outputDirectory>
87-
</configuration>
88-
89-
```
30+
<!-- Test result file patterns (Ant-style) -->
31+
<testResults>
32+
<testResult>target/surefire-reports/**/*.xml</testResult>
33+
<testResult>target/failsafe-reports/**/*.xml</testResult>
34+
</testResults>
9035
91-
=== datasetPath
36+
<!-- Skip entire plugin execution (default: false) -->
37+
<skip>false</skip>
9238
93-
The `datasetPath` parameter specifies the path to the dataset.
94-
Defaults to the value set below.
39+
<!-- Skip ZIP assembly but keep annotation combining (default: false) -->
40+
<skipAssembleZipArtifact>false</skipAssembleZipArtifact>
9541
96-
```xml
97-
<configuration>
98-
<datasetPath>
99-
${project.basedir}/reqstool
100-
</datasetPath>
42+
<!-- Skip artifact attachment for deployment (default: false) -->
43+
<skipAttachZipArtifact>false</skipAttachZipArtifact>
10144
</configuration>
45+
----
10246

103-
```
47+
=== Configuration Parameters
10448

105-
=== project
49+
==== requirementsAnnotationsFile
10650

107-
The `project` parameter specifies the name of the maven project.
51+
The `requirementsAnnotationsFile` parameter specifies the path to the requirements annotations file.
10852
Defaults to the value set below.
10953

110-
```xml
111-
<configuration>
112-
<project>
113-
${project}
114-
</project>
115-
</configuration>
54+
[source,xml]
55+
----
56+
<requirementsAnnotationsFile>
57+
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
58+
</requirementsAnnotationsFile>
59+
----
11660

117-
```
61+
==== svcsAnnotationsFile
11862

119-
=== testResults
63+
The `svcsAnnotationsFile` parameter specifies the path to the SVCS (Software Verification Cases) annotations file.
64+
Defaults to the value set below.
12065

121-
The `testResults` parameter specifies one or more testResult paths.
66+
[source,xml]
67+
----
68+
<svcsAnnotationsFile>
69+
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml
70+
</svcsAnnotationsFile>
71+
----
12272

123-
```xml
124-
<configuration>
125-
<testResults>
126-
<testResult>path/to/test/result.xml</testResult>
127-
<testResult>path/to/test/result.xml</testResult>
128-
</testResults>
129-
</configuration>
73+
==== outputDirectory
13074

131-
```
75+
The `outputDirectory` parameter specifies the path to where to put the generated output.
76+
Defaults to the value set below.
13277

133-
=== log
78+
[source,xml]
79+
----
80+
<outputDirectory>${project.build.directory}/reqstool</outputDirectory>
81+
----
13482

135-
The `log` parameter specifies the log.
136-
Defaults to the value set below.
83+
==== datasetPath
13784

138-
```xml
139-
<configuration>
140-
<log>
141-
${log}
142-
</log>
143-
</configuration>
85+
The `datasetPath` parameter specifies the path to the dataset directory containing `requirements.yml` and optional files.
86+
Defaults to the value set below.
14487

145-
```
88+
[source,xml]
89+
----
90+
<datasetPath>${project.basedir}/reqstool</datasetPath>
91+
----
14692

147-
=== skip
93+
==== testResults
14894

149-
Skip the execution of the plugin.
150-
Defaults to the value set below.
95+
The `testResults` parameter specifies one or more test result file patterns.
96+
Supports Ant-style pattern matching.
15197

152-
```xml
153-
<configuration>
154-
<skip>
155-
false
156-
</skip>
157-
</configuration>
98+
[source,xml]
99+
----
100+
<testResults>
101+
<testResult>target/surefire-reports/**/*.xml</testResult>
102+
<testResult>target/failsafe-reports/**/*.xml</testResult>
103+
</testResults>
104+
----
158105

159-
```
106+
==== skip
160107

161-
=== skipAssembleZipArtifact
108+
Skip the execution of the entire plugin.
109+
Defaults to `false`.
162110

163-
Skip zip artifact assembly.
164-
Defaults to the value set below.
111+
[source,xml]
112+
----
113+
<skip>false</skip>
114+
----
165115

166-
```xml
167-
<configuration>
168-
<skipAssembleZipArtifact>
169-
false
170-
</skipAssembleZipArtifact>
171-
</configuration>
116+
==== skipAssembleZipArtifact
172117

173-
```
118+
Skip ZIP artifact assembly but continue with annotation combining.
119+
Defaults to `false`.
174120

175-
=== skipAttachZipArtifact
121+
[source,xml]
122+
----
123+
<skipAssembleZipArtifact>false</skipAssembleZipArtifact>
124+
----
176125

177-
Skip zip artifact attachment.
178-
Defaults to the value set below.
126+
==== skipAttachZipArtifact
179127

180-
```xml
181-
<configuration>
182-
<skipAttachZipArtifact>
183-
false
184-
</skipAttachZipArtifact>
185-
</configuration>
128+
Skip artifact attachment for deployment.
129+
Defaults to `false`.
186130

187-
```
131+
[source,xml]
132+
----
133+
<skipAttachZipArtifact>false</skipAttachZipArtifact>
134+
----
188135

189-
Notes:
136+
=== Notes
190137

191138
* All path parameters support both absolute and relative paths
192139
* Maven property placeholders (`${...}`) can be used in all configuration values
193140
* The plugin executes in the `verify` phase by default
194-
* Test result paths support Ant-style pattern matching
141+
* Test result paths support Ant-style pattern matching
Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,71 @@
11
== Description
22

3-
This Maven plugin generates a zip artifact containing combined annotations and various reports for Reqstool.
3+
This Maven plugin generates a ZIP artifact containing combined annotations and various reports for Reqstool. It provides sensible defaults while allowing full customization.
4+
5+
=== Features
6+
7+
* *Sensible defaults*: Works out of the box with standard Maven project layouts
8+
* *Automatic lifecycle integration*: Runs in the `verify` phase to ensure tests complete first
9+
* *Maven repository publishing*: ZIP artifact is attached for deployment to Maven repositories
10+
* *Combines annotations*: Merges requirements annotations from implementation and test code
11+
* *Assembles ZIP artifact*: Creates structured ZIP containing requirements, test results, and configuration
12+
13+
=== Quick Start
14+
15+
==== Add the Plugin
16+
17+
[source,xml]
18+
----
19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>io.github.reqstool</groupId>
23+
<artifactId>reqstool-maven-plugin</artifactId>
24+
<version>1.0.4</version>
25+
<executions>
26+
<execution>
27+
<goals>
28+
<goal>assemble-and-attach-zip-artifact</goal>
29+
</goals>
30+
</execution>
31+
</executions>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
----
36+
37+
==== Default Behavior
38+
39+
The plugin automatically:
40+
41+
1. Runs during the `verify` phase (after all tests complete)
42+
2. Combines annotation files from `target/generated-sources/` and `target/generated-test-sources/`
43+
3. Creates a ZIP artifact in `target/reqstool/` containing:
44+
* `requirements.yml` (from `./reqstool/` directory)
45+
* `software_verification_cases.yml` (optional)
46+
* `manual_verification_results.yml` (optional)
47+
* `annotations.yml` (combined/merged annotations)
48+
* `test_results/` (XML test results from Surefire and Failsafe)
49+
* `reqstool_config.yml` (configuration manifest)
50+
4. Attaches the ZIP for deployment to Maven repositories
51+
52+
==== Minimal Setup
53+
54+
Create a `reqstool/` directory in your project root with a `requirements.yml` file:
55+
56+
[source]
57+
----
58+
my-project/
59+
├── pom.xml
60+
├── reqstool/
61+
│ └── requirements.yml (mandatory)
62+
└── src/
63+
----
64+
65+
Run `mvn verify` and the ZIP artifact will be created automatically.
66+
67+
=== Prerequisites
68+
69+
* Maven 3.9+
70+
* Java 17+
71+
* A `requirements.yml` file in the dataset directory (default: `./reqstool/`)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
== License
22

3-
This project is licensed under the MIT License.
3+
MIT License.

0 commit comments

Comments
 (0)