Skip to content

Commit bababb5

Browse files
authored
83 add reqstool configyml to reqstool zip file (#87)
* feat: Add reqstool prefix to property names * feat: Add reqstool_config.yml to zip artifact * feat: WIP * feat: Fix logic adding files to zip file * feat: Update docs, fix paths set in reqstool_config.yml * feat: Fix test_results in generated reqstool_config.yml * feat: WIP * feat: Update configuration.adoc * feat: WIP * feat: Clarify default phase
1 parent 78206b7 commit bababb5

4 files changed

Lines changed: 276 additions & 104 deletions

File tree

Lines changed: 120 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,194 @@
11
== Configuration
22

3-
To configure the plugin add a <configuration> block for the plugin under the <build> in pom.xml
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>se.lfv.reqstool</groupId>
12+
<artifactId>reqstool-maven-plugin</artifactId>
13+
<version>0.1.0</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
448

549
=== requirementsAnnotationsFile
650

751
The `requirementsAnnotationsFile` parameter specifies the path to the requirements annotations file.
8-
Defaults to the value set below.
52+
Defaults to the value set below.
953

1054
```xml
1155
<configuration>
12-
<requirementsAnnotationsFile>
13-
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
14-
</requirementsAnnotationsFile>
56+
<requirementsAnnotationsFile>
57+
${project.build.directory}/generated-sources/annotations/resources/annotations.yml
58+
</requirementsAnnotationsFile>
1559
</configuration>
1660

1761
```
1862

1963
=== svcsAnnotationsFile
2064

2165
The `svcsAnnotationsFile` parameter specifies the path to the svcs annotations file.
22-
Defaults to the value set below.
66+
Defaults to the value set below.
2367

2468
```xml
2569
<configuration>
26-
<svcsAnnotationsFile>
27-
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations
28-
</svcsAnnotationsFile>
70+
<svcsAnnotationsFile>
71+
${project.build.directory}/generated-test-sources/test-annotations/resources/annotations.yml
72+
</svcsAnnotationsFile>
2973
</configuration>
3074

3175
```
3276

3377
=== outputDirectory
3478

35-
The `outputDirectory` parameter specifies the path to where to put the generated output
36-
Defaults to the value set below.
79+
The `outputDirectory` parameter specifies the path to where to put the generated output.
80+
Defaults to the value set below.
3781

3882
```xml
3983
<configuration>
40-
<outputDirectory>
41-
${project.build.directory}/reqstool
42-
</outputDirectory>
84+
<outputDirectory>
85+
${project.build.directory}/reqstool
86+
</outputDirectory>
4387
</configuration>
4488

4589
```
4690

4791
=== datasetPath
4892

49-
The `datasetPath` parameter specifies the path to the dataset
50-
Defaults to the value set below.
93+
The `datasetPath` parameter specifies the path to the dataset.
94+
Defaults to the value set below.
5195

5296
```xml
5397
<configuration>
54-
<datasetPath>
55-
${project.basedir}/reqstool
56-
</datasetPath>
98+
<datasetPath>
99+
${project.basedir}/reqstool
100+
</datasetPath>
57101
</configuration>
58102

59103
```
60104

61-
=== failsafeReportsDir
105+
=== project
62106

63-
The `failsafeReportsDir` parameter specifies the path to where the failsafe reports are found.
64-
Defaults to the value set below.
107+
The `project` parameter specifies the name of the maven project.
108+
Defaults to the value set below.
65109

66110
```xml
67111
<configuration>
68-
<failsafeReportsDir>
69-
${project.build.directory}/failsafe-reports
70-
</failsafeReportsDir>
112+
<project>
113+
${project}
114+
</project>
71115
</configuration>
72116

73117
```
74118

75-
=== surefireReportsDir
119+
=== testResults
76120

77-
The `surefireReportsDir` parameter specifies the path to where the surefire reports are found.
78-
Defaults to the value set below.
121+
The `testResults` parameter specifies one or more testResult paths.
79122

80123
```xml
81124
<configuration>
82-
<surefireReportsDir>
83-
${project.build.directory}/surefire-reports
84-
</surefireReportsDir>
125+
<testResults>
126+
<testResult>path/to/test/result.xml</testResult>
127+
<testResult>path/to/test/result.xml</testResult>
128+
</testResults>
85129
</configuration>
86130

87131
```
88132

89-
=== project
133+
=== log
90134

91-
The `project` parameter specifies the name of the maven project
92-
Defaults to the value set below.
135+
The `log` parameter specifies the log.
136+
Defaults to the value set below.
93137

94138
```xml
95139
<configuration>
96-
<project>
97-
${project}
98-
</project>
140+
<log>
141+
${log}
142+
</log>
99143
</configuration>
100144

101145
```
102146

103-
=== log
147+
=== skip
148+
149+
Skip the execution of the plugin.
150+
Defaults to the value set below.
151+
152+
```xml
153+
<configuration>
154+
<skip>
155+
false
156+
</skip>
157+
</configuration>
158+
159+
```
160+
161+
=== skipAssembleZipArtifact
162+
163+
Skip zip artifact assembly.
164+
Defaults to the value set below.
165+
166+
```xml
167+
<configuration>
168+
<skipAssembleZipArtifact>
169+
false
170+
</skipAssembleZipArtifact>
171+
</configuration>
172+
173+
```
174+
175+
=== skipAttachZipArtifact
104176

105-
The `log` parameter specifies the log
106-
Defaults to the value set below.
177+
Skip zip artifact attachment.
178+
Defaults to the value set below.
107179

108180
```xml
109181
<configuration>
110-
<log>
111-
${log}
112-
</log>
182+
<skipAttachZipArtifact>
183+
false
184+
</skipAttachZipArtifact>
113185
</configuration>
114186

115187
```
116188

189+
Notes:
117190

191+
* All path parameters support both absolute and relative paths
192+
* Maven property placeholders (`${...}`) can be used in all configuration values
193+
* The plugin executes in the `verify` phase by default
194+
* Test result paths support Ant-style pattern matching

‎docs/modules/ROOT/pages/usage.adoc‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ To use the LFV Reqstool Java Maven Plugin, add the following configuration to yo
88
<plugin>
99
<groupId>se.lfv.reqstool</groupId>
1010
<artifactId>reqstool-maven-plugin</artifactId>
11-
<version>0.0.2</version>
11+
<version>0.1.0</version>
1212
<executions>
1313
<execution>
1414
<goals>
15-
<goal>attach-reqstool-zip</goal>
15+
<goal>assemble-and-attach-zip-artifact</goal>
1616
</goals>
1717
</execution>
1818
</executions>
@@ -27,3 +27,8 @@ To use the LFV Reqstool Java Maven Plugin, add the following configuration to yo
2727
</plugins>
2828
</build>
2929
```
30+
31+
The default `<phase>` the plugin runs during is `verify`, this is done to ensure all test files are generated before the plugin runs.
32+
33+
34+

0 commit comments

Comments
 (0)