|
1 | 1 | = Reqstool Maven Plugin |
2 | 2 |
|
3 | | -include::description.adoc[] |
| 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 | 4 |
|
5 | | -include::configuration.adoc[] |
| 5 | +=== Features |
6 | 6 |
|
7 | | -include::usage.adoc[] |
| 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 |
8 | 12 |
|
9 | | -include::license.adoc[] |
| 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/`) |
| 72 | + |
| 73 | +== License |
| 74 | + |
| 75 | +MIT License. |
0 commit comments