|
1 | 1 | == Configuration |
2 | 2 |
|
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`: |
50 | 4 |
|
51 | | -The `requirementsAnnotationsFile` parameter specifies the path to the requirements annotations file. |
52 | | -Defaults to the value set below. |
| 5 | +=== Complete Configuration Example |
53 | 6 |
|
54 | | -```xml |
| 7 | +[source,xml] |
| 8 | +---- |
55 | 9 | <configuration> |
| 10 | + <!-- Path to requirements annotations YAML --> |
| 11 | + <!-- Default: ${project.build.directory}/generated-sources/annotations/resources/annotations.yml --> |
56 | 12 | <requirementsAnnotationsFile> |
57 | 13 | ${project.build.directory}/generated-sources/annotations/resources/annotations.yml |
58 | 14 | </requirementsAnnotationsFile> |
59 | | -</configuration> |
60 | 15 |
|
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 --> |
70 | 18 | <svcsAnnotationsFile> |
71 | 19 | ${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml |
72 | 20 | </svcsAnnotationsFile> |
73 | | -</configuration> |
74 | 21 |
|
75 | | -``` |
| 22 | + <!-- Output directory for ZIP and combined annotations --> |
| 23 | + <!-- Default: ${project.build.directory}/reqstool --> |
| 24 | + <outputDirectory>${project.build.directory}/reqstool</outputDirectory> |
76 | 25 |
|
77 | | -=== outputDirectory |
| 26 | + <!-- Dataset directory containing requirements.yml and optional files --> |
| 27 | + <!-- Default: ${project.basedir}/reqstool --> |
| 28 | + <datasetPath>${project.basedir}/reqstool</datasetPath> |
78 | 29 |
|
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> |
90 | 35 |
|
91 | | -=== datasetPath |
| 36 | + <!-- Skip entire plugin execution (default: false) --> |
| 37 | + <skip>false</skip> |
92 | 38 |
|
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> |
95 | 41 |
|
96 | | -```xml |
97 | | -<configuration> |
98 | | - <datasetPath> |
99 | | - ${project.basedir}/reqstool |
100 | | - </datasetPath> |
| 42 | + <!-- Skip artifact attachment for deployment (default: false) --> |
| 43 | + <skipAttachZipArtifact>false</skipAttachZipArtifact> |
101 | 44 | </configuration> |
| 45 | +---- |
102 | 46 |
|
103 | | -``` |
| 47 | +=== Configuration Parameters |
104 | 48 |
|
105 | | -=== project |
| 49 | +==== requirementsAnnotationsFile |
106 | 50 |
|
107 | | -The `project` parameter specifies the name of the maven project. |
| 51 | +The `requirementsAnnotationsFile` parameter specifies the path to the requirements annotations file. |
108 | 52 | Defaults to the value set below. |
109 | 53 |
|
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 | +---- |
116 | 60 |
|
117 | | -``` |
| 61 | +==== svcsAnnotationsFile |
118 | 62 |
|
119 | | -=== testResults |
| 63 | +The `svcsAnnotationsFile` parameter specifies the path to the SVCS (Software Verification Cases) annotations file. |
| 64 | +Defaults to the value set below. |
120 | 65 |
|
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 | +---- |
122 | 72 |
|
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 |
130 | 74 |
|
131 | | -``` |
| 75 | +The `outputDirectory` parameter specifies the path to where to put the generated output. |
| 76 | +Defaults to the value set below. |
132 | 77 |
|
133 | | -=== log |
| 78 | +[source,xml] |
| 79 | +---- |
| 80 | +<outputDirectory>${project.build.directory}/reqstool</outputDirectory> |
| 81 | +---- |
134 | 82 |
|
135 | | -The `log` parameter specifies the log. |
136 | | -Defaults to the value set below. |
| 83 | +==== datasetPath |
137 | 84 |
|
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. |
144 | 87 |
|
145 | | -``` |
| 88 | +[source,xml] |
| 89 | +---- |
| 90 | +<datasetPath>${project.basedir}/reqstool</datasetPath> |
| 91 | +---- |
146 | 92 |
|
147 | | -=== skip |
| 93 | +==== testResults |
148 | 94 |
|
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. |
151 | 97 |
|
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 | +---- |
158 | 105 |
|
159 | | -``` |
| 106 | +==== skip |
160 | 107 |
|
161 | | -=== skipAssembleZipArtifact |
| 108 | +Skip the execution of the entire plugin. |
| 109 | +Defaults to `false`. |
162 | 110 |
|
163 | | -Skip zip artifact assembly. |
164 | | -Defaults to the value set below. |
| 111 | +[source,xml] |
| 112 | +---- |
| 113 | +<skip>false</skip> |
| 114 | +---- |
165 | 115 |
|
166 | | -```xml |
167 | | -<configuration> |
168 | | - <skipAssembleZipArtifact> |
169 | | - false |
170 | | - </skipAssembleZipArtifact> |
171 | | -</configuration> |
| 116 | +==== skipAssembleZipArtifact |
172 | 117 |
|
173 | | -``` |
| 118 | +Skip ZIP artifact assembly but continue with annotation combining. |
| 119 | +Defaults to `false`. |
174 | 120 |
|
175 | | -=== skipAttachZipArtifact |
| 121 | +[source,xml] |
| 122 | +---- |
| 123 | +<skipAssembleZipArtifact>false</skipAssembleZipArtifact> |
| 124 | +---- |
176 | 125 |
|
177 | | -Skip zip artifact attachment. |
178 | | -Defaults to the value set below. |
| 126 | +==== skipAttachZipArtifact |
179 | 127 |
|
180 | | -```xml |
181 | | -<configuration> |
182 | | - <skipAttachZipArtifact> |
183 | | - false |
184 | | - </skipAttachZipArtifact> |
185 | | -</configuration> |
| 128 | +Skip artifact attachment for deployment. |
| 129 | +Defaults to `false`. |
186 | 130 |
|
187 | | -``` |
| 131 | +[source,xml] |
| 132 | +---- |
| 133 | +<skipAttachZipArtifact>false</skipAttachZipArtifact> |
| 134 | +---- |
188 | 135 |
|
189 | | -Notes: |
| 136 | +=== Notes |
190 | 137 |
|
191 | 138 | * All path parameters support both absolute and relative paths |
192 | 139 | * Maven property placeholders (`${...}`) can be used in all configuration values |
193 | 140 | * 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 |
0 commit comments