# Getting Started with Infinispan

## 1. Get Up and Running with Infinispan

It’s easy to get started with Infinispan. All you need is Java, dependency management tooling, and either the Infinispan server or core libraries.

### 1.1. Software Requirements

To run Infinispan, you’ll need:

- Java 1.8 JDK at a minimum. Infinispan recommends JDK 11 but also works with JDK 14.

- Maven 3.2 or later. Infinispan also works with Gradle and Ivy.

### 1.2. JDK

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

- OpenJDK

- Oracle Java SE

### 1.3. Maven

Run `mvn --version` to check your current Maven version. If you have Maven 3.2 or later, you are ready to go.

If you need to install Maven, visit https://maven.apache.org/install.html.

### 1.4. Getting Infinispan

To start using Infinispan, you can:

- Download the Infinispan server distribution. Visit the Download Infinispan page to get a stable or development version.

- Pull the Infinispan server image.

- Add the `infinispan-core` artifact to your `pom.xml` and use Infinispan directly in your project. See Embedding Infinispan for more information.

### 1.5. Infinispan Tutorials

Infinispan provides a set of tutorials that demonstrate various capabilities in a few easy steps.

Clone the tutorial repository as follows:

    $ git clone git@github.com:infinispan/infinispan-simple-tutorials.git

## 2. Creating Infinispan Projects

Infinispan provides a set of Maven archetypes that you can use to generate skeleton projects with sample code and `pom.xml` files. You can then import these projects into your IDE and start building and running applications with Infinispan capabilities.

Prerequisites

- Maven 3.2 or later.

- Ensure the JBoss GA repository, `jboss-ga-repository`, is included in your Maven settings.

Procedure

1. Open a terminal window and navigate to a directory where you

2. Generate projects from Infinispan archetypes with the following command:

       $ mvn archetype:generate -DarchetypeGroupId=org.infinispan.archetypes \
           -DarchetypeArtifactId=<archetype-name> \ (1)
           -DarchetypeVersion=<infinispan-version> (2)

   1 | Creates projects from one of the following archetypes: `client` Creates a sample Hot Rod Java client application. `embedded` Creates a sample application that embeds Infinispan. `store` Creates a sample implementation of a custom cache store.
   2 | Specifies the Infinispan version to use, for example: `-DarchetypeVersion=11.0.7.Final`

3. When prompted, define artifactId, groupId, and version values for your project.

4. Import your new Infinispan project into your IDE.

5. Run your project application from the directory where the `pom.xml` file resides as follows:

       $ mvn package exec:java

   | The `store` archetype does not include a project application, `Application.java`, that you can run.

Reference

- Introduction to Maven Archetypes