|
1 | 1 | == Configuration |
2 | 2 |
|
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 |
4 | 48 |
|
5 | 49 | === requirementsAnnotationsFile |
6 | 50 |
|
7 | 51 | 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. |
9 | 53 |
|
10 | 54 | ```xml |
11 | 55 | <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> |
15 | 59 | </configuration> |
16 | 60 |
|
17 | 61 | ``` |
18 | 62 |
|
19 | 63 | === svcsAnnotationsFile |
20 | 64 |
|
21 | 65 | 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. |
23 | 67 |
|
24 | 68 | ```xml |
25 | 69 | <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> |
29 | 73 | </configuration> |
30 | 74 |
|
31 | 75 | ``` |
32 | 76 |
|
33 | 77 | === outputDirectory |
34 | 78 |
|
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. |
37 | 81 |
|
38 | 82 | ```xml |
39 | 83 | <configuration> |
40 | | - <outputDirectory> |
41 | | - ${project.build.directory}/reqstool |
42 | | - </outputDirectory> |
| 84 | + <outputDirectory> |
| 85 | + ${project.build.directory}/reqstool |
| 86 | + </outputDirectory> |
43 | 87 | </configuration> |
44 | 88 |
|
45 | 89 | ``` |
46 | 90 |
|
47 | 91 | === datasetPath |
48 | 92 |
|
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. |
51 | 95 |
|
52 | 96 | ```xml |
53 | 97 | <configuration> |
54 | | - <datasetPath> |
55 | | - ${project.basedir}/reqstool |
56 | | - </datasetPath> |
| 98 | + <datasetPath> |
| 99 | + ${project.basedir}/reqstool |
| 100 | + </datasetPath> |
57 | 101 | </configuration> |
58 | 102 |
|
59 | 103 | ``` |
60 | 104 |
|
61 | | -=== failsafeReportsDir |
| 105 | +=== project |
62 | 106 |
|
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. |
65 | 109 |
|
66 | 110 | ```xml |
67 | 111 | <configuration> |
68 | | - <failsafeReportsDir> |
69 | | - ${project.build.directory}/failsafe-reports |
70 | | - </failsafeReportsDir> |
| 112 | + <project> |
| 113 | + ${project} |
| 114 | + </project> |
71 | 115 | </configuration> |
72 | 116 |
|
73 | 117 | ``` |
74 | 118 |
|
75 | | -=== surefireReportsDir |
| 119 | +=== testResults |
76 | 120 |
|
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. |
79 | 122 |
|
80 | 123 | ```xml |
81 | 124 | <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> |
85 | 129 | </configuration> |
86 | 130 |
|
87 | 131 | ``` |
88 | 132 |
|
89 | | -=== project |
| 133 | +=== log |
90 | 134 |
|
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. |
93 | 137 |
|
94 | 138 | ```xml |
95 | 139 | <configuration> |
96 | | - <project> |
97 | | - ${project} |
98 | | - </project> |
| 140 | + <log> |
| 141 | + ${log} |
| 142 | + </log> |
99 | 143 | </configuration> |
100 | 144 |
|
101 | 145 | ``` |
102 | 146 |
|
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 |
104 | 176 |
|
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. |
107 | 179 |
|
108 | 180 | ```xml |
109 | 181 | <configuration> |
110 | | - <log> |
111 | | - ${log} |
112 | | - </log> |
| 182 | + <skipAttachZipArtifact> |
| 183 | + false |
| 184 | + </skipAttachZipArtifact> |
113 | 185 | </configuration> |
114 | 186 |
|
115 | 187 | ``` |
116 | 188 |
|
| 189 | +Notes: |
117 | 190 |
|
| 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 |
0 commit comments