| 1 | # OSGi Example |
| 2 | |
| 3 | A simple example application that demonstrates using the Java Driver in |
| 4 | an OSGi service. |
| 5 | |
| 6 | `MailboxService` is an OSGi service that uses Cassandra to |
| 7 | store messages that can be retrieved by email address. |
| 8 | |
| 9 | ## Usage |
| 10 | |
| 11 | To build the bundle and run tests, execute the following Maven goal: |
| 12 | |
| 13 | mvn verify -P short |
| 14 | |
| 15 | The "short" profile needs to be activated since the tests run under |
| 16 | this group. |
| 17 | |
| 18 | Note: tests will try to load the jars of 3 dependent modules: |
| 19 | `driver-core`, `driver-mapping` and `driver-extras`. |
| 20 | For this to succeed, you need to run `mvn package` |
| 21 | first for these modules and make sure the jars are present |
| 22 | in each module's `target/` subdirectory. |
| 23 | |
| 24 | Once `mvn verify` completes, the bundle jar will be present in the `target/` directory. |
| 25 | |
| 26 | The project includes integration tests that verify the service can |
| 27 | be activated and used in an OSGi container. It also verifies that |
| 28 | driver-core can be used in an OSGi container in the following |
| 29 | configurations: |
| 30 | |
| 31 | 1. Default (default classifier with all dependencies) |
| 32 | 2. Netty-Shaded (shaded classifier with all depedencies w/o Netty) |
| 33 | 5. Guava 17 |
| 34 | 6. Guava 18 |
| 35 | 7. Guava 19 |