0
# Dropwizard BOM
1
2
Dropwizard BOM (Bill of Materials) is a Maven POM artifact that provides centralized dependency management for all Dropwizard framework modules. It ensures consistent versioning across the entire Dropwizard ecosystem by managing versions of all framework components, eliminating version conflicts and simplifying dependency declarations in consuming projects.
3
4
## Package Information
5
6
- **Package Name**: dropwizard-bom
7
- **Package Type**: maven
8
- **Language**: Java
9
- **Group ID**: io.dropwizard
10
- **Artifact ID**: dropwizard-bom
11
- **Version**: 4.0.14
12
- **Packaging**: pom
13
- **Installation**: Import in Maven `dependencyManagement` section
14
15
## Core Usage
16
17
Import the BOM in your Maven POM's `dependencyManagement` section:
18
19
```xml
20
<dependencyManagement>
21
<dependencies>
22
<dependency>
23
<groupId>io.dropwizard</groupId>
24
<artifactId>dropwizard-bom</artifactId>
25
<version>4.0.14</version>
26
<type>pom</type>
27
<scope>import</scope>
28
</dependency>
29
</dependencies>
30
</dependencyManagement>
31
```
32
33
After importing the BOM, declare dependencies without version numbers:
34
35
```xml
36
<dependencies>
37
<dependency>
38
<groupId>io.dropwizard</groupId>
39
<artifactId>dropwizard-core</artifactId>
40
</dependency>
41
<dependency>
42
<groupId>io.dropwizard</groupId>
43
<artifactId>dropwizard-auth</artifactId>
44
</dependency>
45
</dependencies>
46
```
47
48
## Basic Usage
49
50
```xml
51
<?xml version="1.0" encoding="UTF-8"?>
52
<project xmlns="http://maven.apache.org/POM/4.0.0"
53
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
54
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
55
http://maven.apache.org/xsd/maven-4.0.0.xsd">
56
<modelVersion>4.0.0</modelVersion>
57
58
<groupId>com.example</groupId>
59
<artifactId>my-dropwizard-app</artifactId>
60
<version>1.0.0</version>
61
62
<!-- Import Dropwizard BOM -->
63
<dependencyManagement>
64
<dependencies>
65
<dependency>
66
<groupId>io.dropwizard</groupId>
67
<artifactId>dropwizard-bom</artifactId>
68
<version>4.0.14</version>
69
<type>pom</type>
70
<scope>import</scope>
71
</dependency>
72
</dependencies>
73
</dependencyManagement>
74
75
<!-- Declare dependencies without versions -->
76
<dependencies>
77
<dependency>
78
<groupId>io.dropwizard</groupId>
79
<artifactId>dropwizard-core</artifactId>
80
</dependency>
81
<dependency>
82
<groupId>io.dropwizard</groupId>
83
<artifactId>dropwizard-jersey</artifactId>
84
</dependency>
85
<dependency>
86
<groupId>io.dropwizard</groupId>
87
<artifactId>dropwizard-jetty</artifactId>
88
</dependency>
89
</dependencies>
90
</project>
91
```
92
93
## Capabilities
94
95
### Core Framework Components
96
97
Core Dropwizard framework modules for application lifecycle and configuration.
98
99
```xml { .api }
100
<!-- Core framework classes and application lifecycle -->
101
<dependency>
102
<groupId>io.dropwizard</groupId>
103
<artifactId>dropwizard-core</artifactId>
104
</dependency>
105
106
<!-- Configuration management and YAML parsing -->
107
<dependency>
108
<groupId>io.dropwizard</groupId>
109
<artifactId>dropwizard-configuration</artifactId>
110
</dependency>
111
112
<!-- Application lifecycle management -->
113
<dependency>
114
<groupId>io.dropwizard</groupId>
115
<artifactId>dropwizard-lifecycle</artifactId>
116
</dependency>
117
118
<!-- Common utilities and helper classes -->
119
<dependency>
120
<groupId>io.dropwizard</groupId>
121
<artifactId>dropwizard-util</artifactId>
122
</dependency>
123
124
<!-- Bean validation integration -->
125
<dependency>
126
<groupId>io.dropwizard</groupId>
127
<artifactId>dropwizard-validation</artifactId>
128
</dependency>
129
```
130
131
### Web and HTTP Components
132
133
Web server and HTTP-related functionality including JAX-RS and servlet support.
134
135
```xml { .api }
136
<!-- JAX-RS integration with Jersey -->
137
<dependency>
138
<groupId>io.dropwizard</groupId>
139
<artifactId>dropwizard-jersey</artifactId>
140
</dependency>
141
142
<!-- Jetty server integration -->
143
<dependency>
144
<groupId>io.dropwizard</groupId>
145
<artifactId>dropwizard-jetty</artifactId>
146
</dependency>
147
148
<!-- Common servlet implementations -->
149
<dependency>
150
<groupId>io.dropwizard</groupId>
151
<artifactId>dropwizard-servlets</artifactId>
152
</dependency>
153
154
<!-- Static asset serving capability -->
155
<dependency>
156
<groupId>io.dropwizard</groupId>
157
<artifactId>dropwizard-assets</artifactId>
158
</dependency>
159
160
<!-- HTML form processing support -->
161
<dependency>
162
<groupId>io.dropwizard</groupId>
163
<artifactId>dropwizard-forms</artifactId>
164
</dependency>
165
166
<!-- HTTP/2 protocol support -->
167
<dependency>
168
<groupId>io.dropwizard</groupId>
169
<artifactId>dropwizard-http2</artifactId>
170
</dependency>
171
172
<!-- HTTP request logging functionality -->
173
<dependency>
174
<groupId>io.dropwizard</groupId>
175
<artifactId>dropwizard-request-logging</artifactId>
176
</dependency>
177
```
178
179
### Authentication and Security
180
181
Authentication and authorization framework for securing applications.
182
183
```xml { .api }
184
<!-- Authentication and authorization framework -->
185
<dependency>
186
<groupId>io.dropwizard</groupId>
187
<artifactId>dropwizard-auth</artifactId>
188
</dependency>
189
```
190
191
### Data Access Components
192
193
Database connectivity, ORM integration, and data migration tools.
194
195
```xml { .api }
196
<!-- Database connection pool management -->
197
<dependency>
198
<groupId>io.dropwizard</groupId>
199
<artifactId>dropwizard-db</artifactId>
200
</dependency>
201
202
<!-- Hibernate ORM integration -->
203
<dependency>
204
<groupId>io.dropwizard</groupId>
205
<artifactId>dropwizard-hibernate</artifactId>
206
</dependency>
207
208
<!-- JDBI 3 database access integration -->
209
<dependency>
210
<groupId>io.dropwizard</groupId>
211
<artifactId>dropwizard-jdbi3</artifactId>
212
</dependency>
213
214
<!-- Database migration support via Liquibase -->
215
<dependency>
216
<groupId>io.dropwizard</groupId>
217
<artifactId>dropwizard-migrations</artifactId>
218
</dependency>
219
```
220
221
### Serialization Components
222
223
JSON serialization and data format handling.
224
225
```xml { .api }
226
<!-- Jackson JSON serialization integration -->
227
<dependency>
228
<groupId>io.dropwizard</groupId>
229
<artifactId>dropwizard-jackson</artifactId>
230
</dependency>
231
```
232
233
### Monitoring and Metrics Components
234
235
Metrics collection, health checks, and monitoring infrastructure.
236
237
```xml { .api }
238
<!-- Metrics collection and reporting -->
239
<dependency>
240
<groupId>io.dropwizard</groupId>
241
<artifactId>dropwizard-metrics</artifactId>
242
</dependency>
243
244
<!-- Graphite metrics reporting -->
245
<dependency>
246
<groupId>io.dropwizard</groupId>
247
<artifactId>dropwizard-metrics-graphite</artifactId>
248
</dependency>
249
250
<!-- Health check framework -->
251
<dependency>
252
<groupId>io.dropwizard</groupId>
253
<artifactId>dropwizard-health</artifactId>
254
</dependency>
255
```
256
257
### Logging Components
258
259
Logging configuration, management, and structured logging support.
260
261
```xml { .api }
262
<!-- Logging configuration and management -->
263
<dependency>
264
<groupId>io.dropwizard</groupId>
265
<artifactId>dropwizard-logging</artifactId>
266
</dependency>
267
268
<!-- Structured JSON logging support -->
269
<dependency>
270
<groupId>io.dropwizard</groupId>
271
<artifactId>dropwizard-json-logging</artifactId>
272
</dependency>
273
```
274
275
### HTTP Client Components
276
277
HTTP client functionality with metrics and instrumentation.
278
279
```xml { .api }
280
<!-- HTTP client with metrics and instrumentation -->
281
<dependency>
282
<groupId>io.dropwizard</groupId>
283
<artifactId>dropwizard-client</artifactId>
284
</dependency>
285
```
286
287
### View and Template Components
288
289
Template rendering engines and view handling.
290
291
```xml { .api }
292
<!-- View rendering framework -->
293
<dependency>
294
<groupId>io.dropwizard</groupId>
295
<artifactId>dropwizard-views</artifactId>
296
</dependency>
297
298
<!-- FreeMarker template engine integration -->
299
<dependency>
300
<groupId>io.dropwizard</groupId>
301
<artifactId>dropwizard-views-freemarker</artifactId>
302
</dependency>
303
304
<!-- Mustache template engine integration -->
305
<dependency>
306
<groupId>io.dropwizard</groupId>
307
<artifactId>dropwizard-views-mustache</artifactId>
308
</dependency>
309
```
310
311
### Testing Components
312
313
Testing utilities and support classes for Dropwizard applications.
314
315
```xml { .api }
316
<!-- Testing utilities and support classes -->
317
<dependency>
318
<groupId>io.dropwizard</groupId>
319
<artifactId>dropwizard-testing</artifactId>
320
<scope>test</scope>
321
</dependency>
322
```
323
324
### Platform Integration Components
325
326
Platform-specific integrations and socket support.
327
328
```xml { .api }
329
<!-- Unix domain socket support -->
330
<dependency>
331
<groupId>io.dropwizard</groupId>
332
<artifactId>dropwizard-unix-socket</artifactId>
333
</dependency>
334
```
335
336
## Managed Dependencies
337
338
The BOM manages versions for all 29 Dropwizard modules:
339
340
| Module | Purpose | Category |
341
|--------|---------|----------|
342
| dropwizard-core | Core framework and application lifecycle | Core |
343
| dropwizard-configuration | Configuration management and YAML parsing | Core |
344
| dropwizard-lifecycle | Application lifecycle management | Core |
345
| dropwizard-util | Common utilities and helper classes | Core |
346
| dropwizard-validation | Bean validation integration | Core |
347
| dropwizard-jersey | JAX-RS integration with Jersey | Web/HTTP |
348
| dropwizard-jetty | Jetty server integration | Web/HTTP |
349
| dropwizard-servlets | Common servlet implementations | Web/HTTP |
350
| dropwizard-assets | Static asset serving | Web/HTTP |
351
| dropwizard-forms | HTML form processing support | Web/HTTP |
352
| dropwizard-http2 | HTTP/2 protocol support | Web/HTTP |
353
| dropwizard-request-logging | HTTP request logging | Web/HTTP |
354
| dropwizard-auth | Authentication and authorization | Security |
355
| dropwizard-db | Database connection pool management | Data Access |
356
| dropwizard-hibernate | Hibernate ORM integration | Data Access |
357
| dropwizard-jdbi3 | JDBI 3 database access | Data Access |
358
| dropwizard-migrations | Database migration via Liquibase | Data Access |
359
| dropwizard-jackson | Jackson JSON serialization | Serialization |
360
| dropwizard-metrics | Metrics collection and reporting | Monitoring |
361
| dropwizard-metrics-graphite | Graphite metrics reporting | Monitoring |
362
| dropwizard-health | Health check framework | Monitoring |
363
| dropwizard-logging | Logging configuration and management | Logging |
364
| dropwizard-json-logging | Structured JSON logging | Logging |
365
| dropwizard-client | HTTP client with instrumentation | Client |
366
| dropwizard-views | View rendering framework | Templates |
367
| dropwizard-views-freemarker | FreeMarker template engine | Templates |
368
| dropwizard-views-mustache | Mustache template engine | Templates |
369
| dropwizard-testing | Testing utilities and support | Testing |
370
| dropwizard-unix-socket | Unix domain socket support | Platform |
371
372
## Benefits
373
374
- **Version Consistency**: Ensures all Dropwizard modules use compatible versions
375
- **Simplified Management**: Import one BOM instead of managing individual module versions
376
- **Conflict Resolution**: Eliminates dependency version conflicts between Dropwizard modules
377
- **Transitive Dependencies**: Manages transitive dependency versions for optimal compatibility
378
- **Easy Upgrades**: Update all Dropwizard modules by changing BOM version
379
380
## Integration Patterns
381
382
### Complete Application Setup
383
384
```xml
385
<dependencyManagement>
386
<dependencies>
387
<dependency>
388
<groupId>io.dropwizard</groupId>
389
<artifactId>dropwizard-bom</artifactId>
390
<version>4.0.14</version>
391
<type>pom</type>
392
<scope>import</scope>
393
</dependency>
394
</dependencies>
395
</dependencyManagement>
396
397
<dependencies>
398
<!-- Core framework -->
399
<dependency>
400
<groupId>io.dropwizard</groupId>
401
<artifactId>dropwizard-core</artifactId>
402
</dependency>
403
404
<!-- Database access -->
405
<dependency>
406
<groupId>io.dropwizard</groupId>
407
<artifactId>dropwizard-hibernate</artifactId>
408
</dependency>
409
410
<!-- Authentication -->
411
<dependency>
412
<groupId>io.dropwizard</groupId>
413
<artifactId>dropwizard-auth</artifactId>
414
</dependency>
415
416
<!-- Testing support -->
417
<dependency>
418
<groupId>io.dropwizard</groupId>
419
<artifactId>dropwizard-testing</artifactId>
420
<scope>test</scope>
421
</dependency>
422
</dependencies>
423
```
424
425
### Microservice Setup
426
427
```xml
428
<dependencies>
429
<!-- Minimal microservice stack -->
430
<dependency>
431
<groupId>io.dropwizard</groupId>
432
<artifactId>dropwizard-core</artifactId>
433
</dependency>
434
<dependency>
435
<groupId>io.dropwizard</groupId>
436
<artifactId>dropwizard-client</artifactId>
437
</dependency>
438
<dependency>
439
<groupId>io.dropwizard</groupId>
440
<artifactId>dropwizard-metrics</artifactId>
441
</dependency>
442
</dependencies>
443
```