> ## Documentation Index
> Fetch the complete documentation index at: https://sandbox.it-centrex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Configurez l'accès au dépôt Maven privé GitLab et ajoutez le SDK Java GIMpay à votre projet.

Le SDK est hébergé sur un repository Maven privé sur GitLab. Une configuration est nécessaire pour y accéder, que vous utilisiez Maven ou Gradle.

## Maven

**1. Déclarez le repository**

Ajoutez le repository GitLab à la section `<repositories>` de votre `pom.xml` :

```xml pom.xml theme={null}
<repositories>
    <repository>
        <id>it-centrex-gitlab</id>
        <name>IT Centrex GitLab Repository</name>
        <url>https://git.it-centrex.com/api/v4/projects/126/packages/maven</url>
    </repository>
</repositories>
```

**2. Configurez l'authentification**

Dans votre fichier `~/.m2/settings.xml`, ajoutez un `<server>` dont l'`id` correspond à celui du repository :

```xml ~/.m2/settings.xml theme={null}
<settings>
  <servers>
    <server>
      <id>it-centrex-gitlab</id>
      <username>VOTRE_NOM_UTILISATEUR_GITLAB</username>
      <password>VOTRE_TOKEN_D_ACCES_GITLAB</password>
    </server>
  </servers>
</settings>
```

> [!NOTE]
>
> Utilisez un **Personal Access Token** GitLab avec les droits `read_api` et `read_repository`, pas votre mot de passe.

**3. Ajoutez la dépendance**

```xml pom.xml theme={null}
<dependency>
    <groupId>com.itcentrex</groupId>
    <artifactId>GIMpaySdk</artifactId>
    <version>1.0.0</version>
</dependency>
```

## Gradle

Ajoutez le repository à votre fichier `build.gradle` et configurez les identifiants. De préférence via des variables d'environnement :

```gradle build.gradle theme={null}
repositories {
    maven {
        url "https://git.it-centrex.com/api/v4/projects/126/packages/maven"
        credentials {
            username = System.getenv("GITLAB_USERNAME")
            password = System.getenv("GITLAB_TOKEN")
        }
    }
}

dependencies {
    implementation 'com.itcentrex:GIMpaySdk:1.0.0'
}
```

## Étapes suivantes

> **[Démarrage rapide](https://sandbox.it-centrex.com/sdks/java/quickstart.md)**
>
> Initialisez le SDK et effectuez votre premier appel.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.