This guide provides instructions for installing and building the Tarantool Java SDK for different build systems.
- Java 8 or higher
- Maven 3.9.11 or higher (for Maven builds)
- Git (for cloning the repository)
Add the following dependency to your pom.xml:
<dependency>
<groupId>io.tarantool</groupId>
<artifactId>tarantool-client</artifactId>
<version>1.5.0</version>
</dependency>Add the following to your build.gradle:
dependencies {
implementation 'io.tarantool:tarantool-client:1.5.0'
}Or for Gradle Kotlin DSL (build.gradle.kts):
dependencies {
implementation("io.tarantool:tarantool-client:1.5.0")
}-
Clone the repository:
git clone https://github.com/tarantool/tarantool-java-sdk.git cd tarantool-java-sdk -
Build the project with Maven:
# Full build with tests ./mvnw clean install # Build without running tests (faster) ./mvnw clean install -DskipTests # Build without tests and with minimal logging ./mvnw clean install -DskipTests -q
This project uses JUnit 5 for testing and includes both unit tests and integration tests. The project has different test profiles for different types of tests.
# Run all tests (unit + integration)
./mvnw test
# Run all tests during installation
./mvnw clean install# Skip all tests during build
./mvnw clean install -DskipTests
# Alternative: Skip all tests using maven.test.skip
./mvnw clean install -Dmaven.test.skip=trueNote:
-DskipTestscompiles tests but doesn't run them, while-Dmaven.test.skip=trueskips both compilation and execution of tests.
# Skip all integration tests, run only unit tests
./mvnw clean install -P\!box-integration -P\!crud-integration
# Alternative: Run only the default unit test profile
./mvnw clean install -Punit# Skip integration tests for a specific module
./mvnw clean install -pl tarantool-client -P\!box-integration -P\!crud-integration
# Run only unit tests for a specific module
./mvnw clean install -pl tarantool-client -Punit# Skip a specific test class
./mvnw test -Dtest="!MyTestClass"
# Skip a specific test method within a class
./mvnw test -Dtest="MyTestClass#!myTestMethod"
# Run all tests except specific ones
./mvnw test -Dtest="!MyTestClass,!AnotherTestClass"The project may use JUnit categories to group tests. You can include or exclude specific categories:
# Skip integration tests using Maven Surefire plugin configuration
./mvnw test -Dgroups="!integration"
# Run only specific test groups
./mvnw test -Dgroups="unit"# Run a specific test class
./mvnw test -Dtest="MyTestClass"
# Run a specific test method
./mvnw test -Dtest="MyTestClass#myTestMethod"
# Run tests matching a pattern
./mvnw test -Dtest="*IntegrationTest"The project defines several Maven profiles for different test scenarios:
unit(default): Runs only unit testsbox-integration: Runs box integration testscrud-integration: Runs CRUD integration tests
You can activate or deactivate profiles as needed for your testing requirements.
The project consists of multiple modules that can be built individually:
tarantool-core- Core functionalitytarantool-client- Main client librarytarantool-jackson-mapping- Jackson-based serializationtarantool-pooling- Connection poolingtarantool-balancer- Load balancingtarantool-schema- Schema managementtarantool-spring-data- Spring Data integrationtestcontainers- Test containers support
To build a specific module:
./mvnw clean install -pl tarantool-client -am -DskipTestsWhere:
-plspecifies the module to build-ambuilds also the required modules (aggregator modules)
After installation, you can verify that the libraries are properly installed by checking:
-
Maven local repository:
ls ~/.m2/repository/io/tarantool/ -
Using Maven dependency plugin:
./mvnw dependency:tree
If you encounter issues during installation:
- Ensure you have the required Java version (8 or higher)
- Check that Maven is properly configured
- Verify that you have sufficient disk space and permissions
- Clean your local repository cache if needed:
./mvnw dependency:purge-local-repository
For snapshot versions, make sure your repository configuration allows snapshot updates.