|
1 | 1 | # dropwizard-bundles |
| 2 | +[](http://choosealicense.com/licenses/apache-2.0/) |
| 3 | +[](http://semver.org/spec/v2.0.0) |
| 4 | +[](https://travis-ci.com/cratekube/dropwizard-groovy-template) |
| 5 | +[](https://coveralls.io/github/cratekube/dropwizard-groovy-template?branch=master) |
| 6 | + |
2 | 7 | Repository for custom Dropwizard bundles used in CrateKube repositories |
| 8 | + |
| 9 | +## Dropwizard Bundles |
| 10 | + |
| 11 | +### api-key-auth |
| 12 | +The `api-key-auth` bundle provides an extension to Dropwizard authc/authz, allowing you to specify api keys that must |
| 13 | +be sent for requests. Usage of this bundle can be seen in the [ApiKeyAuthBundleSpec](subprojects/api-key-auth/src/test/groovy/io/cratekube/dropwizard/auth/ApiKeyAuthBundleSpec.groovy) |
| 14 | +integration spec. Multiple keys with associated roles can be configured via a Dropwizard configuration file. |
| 15 | + |
| 16 | +## Local development |
| 17 | + |
| 18 | +### Gradle builds |
| 19 | +This project uses [gradle](https://github.com/gradle/gradle) for building and testing. We also use the gradle wrapper |
| 20 | +to avoid downloading a local distribution. The commands below are helpful for building and testing. |
| 21 | +- `./gradlew build` compile and build |
| 22 | +- `./gradlew check` run static code analysis and tests |
| 23 | + |
| 24 | +### Docker builds |
| 25 | +We strive to have our builds repeatable across development environments, so we also provide a Docker build to generate |
| 26 | +the Dropwizard application container. The examples below should be executed from the root of the project. |
| 27 | + |
| 28 | +Running the base docker build: |
| 29 | +```bash |
| 30 | +docker build --target build . |
| 31 | +``` |
| 32 | + |
| 33 | +## Importing bundles into your Dropwizard apps |
| 34 | +This project generates a maven asset for each subproject. To use the bundle in your Dropwizard application you will need |
| 35 | +to include a dependency using the maven coordinates. To use a bundle include following dependency in your project: |
| 36 | + |
| 37 | +Gradle: |
| 38 | +```groovy |
| 39 | +implementation 'io.cratekube.dropwizard-bundles:<subproject-name>:1.0.0' |
| 40 | +``` |
| 41 | + |
| 42 | +Maven: |
| 43 | +```xml |
| 44 | +<dependency> |
| 45 | + <groupId>io.cratekube.dropwizard-bundles</groupId> |
| 46 | + <artifactId>subproject-name</artifactId> |
| 47 | + <version>1.0.0</version> |
| 48 | +</dependency> |
| 49 | +``` |
| 50 | + |
| 51 | +## Contributing |
| 52 | +If you are interested in contributing to this project please review the [contribution guidelines](https://github.com/cratekube/cratekube/blob/master/CONTRIBUTING.md). |
| 53 | +Thank you for your interest in CrateKube! |
0 commit comments