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