Elffuss BraidHub

kikocis/java-driver public

dd6f2ca5f35e · 1.9 KiBRenderedRawPermalink
1# OSGi Tests
2
3A collection of simple tests for the Java Driver in an OSGi environment.
4
5This project is mainly intended as a tool for validating
6that each new release of the driver is fully OSGi-compatible.
7It is _not_ meant as an example application.
8
9If you are looking for examples demonstrating usage of the driver in an OSGi
10environment, please refer to our [OSGi examples repository].
11
12[OSGi examples repository]:https://github.com/datastax/java-driver-examples-osgi
13
14## Usage
15
16`MailboxService` is an OSGi service that uses Cassandra to
17store messages that can be retrieved by email address.
18
19Before running the tests, there are some prerequisites that must be met:
20
21The tests in this module will try to locate and load the following artifacts:
22
231. The jars of 3 dependent modules:
24 `driver-core`, `driver-mapping` and `driver-extras`.
25 These are expected to be found in their respective `target` directory;
262. The test-jar for `driver-core`. Tests will attempt to load it from your local Maven repository.
27
28Therefore, before you can launch the tests, it is required to run `mvn install`
29first _on the entire project_ to make sure all the above artifacts will be present.
30
31If the above prerequisites are met, then it is possible to build
32this project and run its tests by executing the following Maven goal:
33
34 mvn verify -P short
35
36The "short" profile needs to be activated since the tests run under
37this group.
38
39Once `mvn verify` completes, the bundle jar will be present in the `target/` directory.
40
41The project includes integration tests that verify that the service can
42be activated and used in an OSGi container. It also verifies that
43the Java driver can be used in an OSGi container in the following
44configurations:
45
461. Default (default classifier with all dependencies)
472. Netty-Shaded (shaded classifier with all dependencies w/o Netty)
485. Guava 17
496. Guava 18
507. Guava 19