==  Downloading and installing Infinispan

To run Infinispan, you'll need

* A Java 1.8 JDK
* Maven 3.2+, if you wish to use the quickstart examples or create a new project using Infinispan link:../getting_started/getting_started.html#_maven_archetypes[archetype] 
* the Infinispan link:http://infinispan.org/download/[distribution zip], if you wish to use Infinispan in server mode, or want to use the jars in an ant project

TIP: If you already have any of these pieces of software, there is no need to install them again!

=== JDK
Choose your Java runtime, and follow their installation instructions. For example, you could choose one of:

*  link:$$http://openjdk.java.net/install/$$[OpenJDK] 
*  link:$$http://www.java.com/en/download/manual.jsp$$[Oracle Java SE]
*  link:$$http://download.oracle.com/docs/cd/E15289_01/doc.40/e15065/toc.htm$$[Oracle JRockit] 

=== Maven
Follow the official Maven installation guide if you don't already have Maven 3.2 installed.
You can check which version of Maven you have installed (if any) by running mvn --version . If you see a version newer than 3.2, you are ready to go. 

TIP: You can also deploy the examples using your favorite IDE. We provide instructions for using Eclipse only.

=== Infinispan
Finally, download Infinispan from the Infinispan link:http://www.infinispan.org/download[downloads] page.

==== Getting Infinispan from Maven
Add to your pom:

<dependency>
	<groupId>org.infinispan</groupId>
	<artifactId>infinispan-embedded</artifactId>
	<version>8.2.0.Final</version>
</dependency>

==== Installing Infinispan inside Apache Karaf
The Infinispan jars contain the required OSGi manifest headers and can be used
inside OSGi runtime environments as OSGi bundles. In addition to them you will
need to install the required 3rd party dependencies. You can install them
one by one if you wish but to make things easier for you we are providing Apache
Karaf "features" files (also called "feature repositories") which define all
required dependencies and can be used to install everything in just a few steps.

Installing bundles using "features" requires:

*  registering the feature repositories inside Karaf
*  installing the features contained in the repositories


You will first need to start the Apache Karaf console:

 $ cd <APACHE_KARAF_HOME>/bin
 $ ./karaf

To register a feature repository you need to use the `feature:repo-add` command
(or `features:addUrl` if you are using Apache Karaf 2.3.x) and provide its URL
(Apache Maven URLs are preferred):

 karaf@root()> feature:repo-add mvn:org.infinispan/infinispan-core/${version}/xml/features

Replace `${version}` with the actual version you plan to use.
You can now get the list of available features using:

 karaf@root()> feature:list | grep infinispan
 infinispan-core               | ${version}   |           | infinispan-core-${version} |

and install them using:

 karaf@root()> feature:install infinispan-core/${version}

In Apache Karaf the commands are `features:list` and `features:install`.

Alternatively you can just pass the `-i` flag to the `feature:repo-add` command
which will install all the features defined in that repository:

 karaf@root()> feature:repo-add -i mvn:org.infinispan/infinispan-core/${version}/xml/features

This should get you started using Infinispan in library mode. To get additional
functionality just install the corresponding features. For example to use the
LevelDB cachestore install:

 karaf@root()> feature:repo-add -i mvn:org.infinispan/infinispan-cachestore-leveldb/${version}/xml/features

The URL for the feature repositories is constructed from the Maven artifact coordinates
using the format:

 mvn:<groupId>/<artifactId>/<version>/xml/features

To use Infinispan in client/server mode install the Hot Rod Client feature:

 karaf@root()> feature:repo-add -i mvn:org.infinispan/infinispan-client-hotrod/${version}/xml/features

Currently feature repositories are available for the following artifacts:

* infinispan-commons
* infinispan-core
* infinispan-cachestore-jdbc
* infinispan-cachestore-jpa
* infinispan-cachestore-leveldb
* infinispan-cachestore-remote
* infinispan-client-hotrod


For more details regarding the commands available inside Apache Karaf please
consult its user manual.

=== Download the quickstarts
The quickstarts are in GitHub, in link:https://github.com/infinispan/infinispan-quickstart[].

Clone this repository using:

 $ git clone https://github.com/infinispan/infinispan-quickstart

