Maven ===== The [`guardrail-dev/guardrail-maven-plugin`](https://github.com/guardrail-dev/guardrail-maven-plugin) installation instructions can be found in that project's README. By putting the following in your `pom.xml`, generated classes for petstore and github clients and `myserver` server routes are available the next time the `compile` or `generate-sources` goals are run. The motivation for generating servers in your test sources is to facilitate [generating "real" mock downstream servers](https://guardrail.dev/#/scala/akka-http/README?id=generating-test-only-real-server-mocks-for-unit-tests). ```xml ... dev.guardrail guardrail-maven-plugin 0.62.0 generate-petstore-client generate-sources ${project.basedir}/petstore.yaml generate-github-client generate-sources ${project.basedir}/github.yaml com.example.clients.github generate-server generate-sources server ${project.basedir}/myserver.yaml com.example.server true generate-petstore-server generate-test-sources server ${project.basedir}/petstore.yaml generate-github-server generate-test-sources server ${project.basedir}/github.yaml com.example.tests.github generate-client generate-test-sources ${project.basedir}/myserver.yaml com.example.tests.server true ... ``` For the curious, generated sources end up in `target/generated-sources/`. These will be overwritten every time `compile` runs, so modification is not possible. If you find the generated source does not fit your needs, please see the section on [guardrail-specific extensions](https://guardrail.dev/scala/akka-http/guardrail-extensions) in the documentation.