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:
- Verify you ran
mvn clean installin the SDK directory - Verify the version in your
pom.xmlmatches the installed version - 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.



