-
Notifications
You must be signed in to change notification settings - Fork 2
Quick Start
To start using Gora,
1. Clone the source code
Gora has not released a version yet, so you need to check out the source first.
$ git clone git://github.com/enis/gora.git
2. compile the project
$ cd gora
$ ant
3. copy necessary jars to your project,
Include gora-core/build/gora-core-x.×.jar and the jars of all the other modules that you want to use ( for example gora-hbase/build/gora-hbase-x.×.jar )
4. Write your data objects using Avro schema definition.
Example schemas can be found under gora-examples/src/main/avro.
5. Compile the schemas using GoraCompiler
$ cd gora
$ bin/gora compile
6. Define the mappings for the data store.
Define the XML mappings file needed for the data store, and add the files to the class path. See the documentation for the data store for more details.
An example mappings file can be found at gora-hbase/src/test/conf/hbase-mapping.xml
7. Use the Gora API to persist/retrieve/query objects.
See Examples page for more information on the Gora API.
8. Dependencies
gora uses ivy to manage dependencies. However, not all jar’s can be retrieved through ivy or maven. These external jars reside in directories under gora-[modulename]/lib-ext/. If you are adding gora-[modulename] to your classpath, make sure that the modules dependencies are resolved by ivy/maven and include the external jar in lib-ext directory.