Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: Java 1.1
Community Wiki and Resources
Download Client Library
JavaDoc
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
Java Client Library
SDK Forum
Wiki: Java Client Library
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1.1 Preparations
Chapter Sections
Chapters

1.1.1. Downloading the Couchbase Client Libraries

In general, there are two options available on how to include the Client SDK in your project. You can either manually include all dependencies in your CLASSPATH or (if you want to make your life easier) use Maven.

To include the libraries (jar files) directly in your project, download the archive and add all jar files to your CLASSPATH of the system/project. Most IDEs also allow you add specific jar files to your project. Make sure to have the following dependencies in your CLASSPATH:

If you don't like to handle dependencies on your own, you can use a build manager to handle them for you. Couchbase provides a Maven repository that you can use which includes the dependencies automatically. The root URL of the repository is located under http://files.couchbase.com/maven2/. Depending on the build manager you're using, the exact syntax to include it may vary. Here is an example on how to do it in Maven by updating your pom.xml.

<repositories>
  <repository>
    <id>couchbase</id>
    <name>Couchbase Maven Repository</name>
    <layout>default</layout>
    <url>http://files.couchbase.com/maven2/</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>

<dependency>
    <groupId>couchbase</groupId>
    <artifactId>couchbase-client</artifactId>
    <version>1.1.4</version>
    <scope>provided</scope>
</dependency>

If you are coming from Scala and want to manage your dependencies through sbt, then you can do it this way (in your build.sbt):

resolvers += "Couchbase Maven Repository" at "http://files.couchbase.com/maven2"

libraryDependencies += "couchbase" % "couchbase-client" % "1.1.4"