1.1 Integrate Maven Artifact
This tutorial will guide you through the process of integrating the NIMMSTA maven dependency into your project.
Essential Prerequisites
- This integration works with native Kotlin / Java Android Projects. For Xamarin or .NET MAUI, please consider using a websocket integration.
- OS Requirements: You need to either use Windows or Linux (Tested on Ubuntu 20 and 22)
- Bluetooth Requirements: Your system should have native Bluetooth capability with BLE 4.2+ (Supported on Windows 10 Fall Creators Update (1709) or later) or NIMMSTA Bluetooth Dongle
- Java Requirements: The minimum version is Java 8 (major version 52)
- Access to NIMMSTA Maven Repository: It's crucial that you have the necessary credentials for the NIMMSTA Maven Repository. These credentials are key to accessing and integrating the Maven dependency.
- Latest Firmware Bundle: To ensure compatibility and the latest features, download and install the newest firmware bundle available at the NIMMSTA B2B Portal.
- Gradle Compatibility: Your project should be using Gradle version 7.0 or above. This version ensures better performance and more features that are compatible with the NIMMSTA Maven dependency.
- Kotlin Compatibility: Your project should be using Kotlin version 1.8 or above.
Gaining Access to the NIMMSTA Maven Repository
To download the necessary artifacts from the NIMMSTA Repository, specific access credentials are required. These credentials can typically be obtained through direct communication with your service partner or a representative at NIMMSTA. This step is crucial as it provides the authentication required to securely access and download the Maven artifacts needed for your project.
Gradle
Note
If you have a root project gradle file, the maven repository needs to be added using the "allProjects" block.
After you configured the repository, you can add the dependency.
Maven
First you need to add a settings.xml file in your .m2 folder. The .m2 folder is usually located under C:\Users\Username\.m2. If the folder is not present, create it first.
Afterwards you can add the required dependency to your pom.xml.
<project>
<!-- ... -->
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<java.version>1.8</java.version>
<kotlin.version>1.9.0</kotlin.version>
</properties>
<repositories>
<repository>
<id>nimmsta</id>
<url>https://maven.nimmsta.com/repository/nimmsta-core-release/</url>
<name>nimmsta</name>
</repository>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>https://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.nimmsta.core</groupId>
<artifactId>shared-jvm</artifactId>
<version>7.0.XXXX</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-serialization-json</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-serialization-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>1.6.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
</plugin>
</plugins>
</build>
<!-- ... -->
</project>