Skip to main content

Installation

This guide will help you install the Retorna SDK for Java in your project.

Option 1: Local Installation (Development)

Step 1: Clone and Install the SDK

git clone https://github.com/retorna/retorna-java-sdk.git
cd retorna-java-sdk
mvn clean install

This will compile, run tests, and install the SDK in your local Maven repository (~/.m2/repository).

Step 2: Add the Dependency

In your project's pom.xml, add:

<dependencies>
<dependency>
<groupId>com.retorna</groupId>
<artifactId>retorna-java-sdk</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

Option 2: Maven Central (Production)

When the SDK is available on Maven Central, you can add it directly:

<dependencies>
<dependency>
<groupId>com.retorna</groupId>
<artifactId>retorna-java-sdk</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>

Option 3: Private Repository

If you have access to a private Maven repository, configure pom.xml:

<repositories>
<repository>
<id>retorna-repo</id>
<url>https://repo.retorna.com/maven</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.retorna</groupId>
<artifactId>retorna-java-sdk</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>

Verify the Installation

Create a test file to verify the installation was successful:

import com.retorna.sdk.core.RetornaClient;
import com.retorna.sdk.core.RetornaClientOptions;
import com.retorna.sdk.config.Environment;
import com.retorna.sdk.config.LoggingLevel;

public class TestInstallation {
public static void main(String[] args) {
try {
RetornaClient client = RetornaClient.create(
RetornaClientOptions.builder()
.environment(Environment.DEVELOP)
.loggingLevel(LoggingLevel.INFO)
.clientId("test")
.clientSecret("test")
.privateKey("-----BEGIN PRIVATE KEY-----\ntest\n-----END PRIVATE KEY-----")
.build()
);
System.out.println("✅ SDK installed successfully!");
} catch (Exception e) {
System.err.println("❌ Error: " + e.getMessage());
}
}
}

Compile and run:

mvn clean compile
mvn exec:java -Dexec.mainClass="TestInstallation"

SDK Dependencies

The SDK includes the following dependencies (installed automatically):

  • Jackson (2.15.2) - For JSON serialization/deserialization
  • BouncyCastle (1.78.1) - For cryptography and RSA signatures

Troubleshooting

Error: "Could not find artifact"

If Maven cannot find the artifact:

  1. Verify you ran mvn clean install in the SDK directory
  2. Verify the version in your pom.xml matches the installed version
  3. Clear Maven cache: mvn dependency:purge-local-repository

Error: "UnsupportedClassVersionError"

Make sure you are using Java 17 or higher:

java -version

You should see something like:

openjdk version "17.0.x"

Next Step

Once installed, continue with the SDK Configuration.

Resources
Blog
Find us on social networks
For complaints, please contact via email denuncias@retorna.app
We belong to the Financial Analysis Unit (UAF).
Supervised by
Registration number is C100000211.
Members of
With the support ofCon el apoyo de
Copyright © Retorna Holding Spa 2024