This guide covers building and developing with the AWS IoT Device SDK for Java v2.
Prerequisites: Follow the setup instructions in the main README first.
# Create workspace directory
mkdir sdk-workspace
cd sdk-workspace
# Clone the repository
git clone https://github.com/awslabs/aws-iot-device-sdk-java-v2.git
cd aws-iot-device-sdk-java-v2
# Build and install
mvn clean installTo use the latest AWS CRT release instead of the tested version:
# Update CRT version before building
mvn versions:use-latest-versions -Dincludes="software.amazon.awssdk.crt*"
mvn clean installTo test local changes, update your application's pom.xml:
<dependency>
<groupId>software.amazon.awssdk.iotdevicesdk</groupId>
<artifactId>aws-iot-device-sdk</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>Note: Ensure the version matches the SDK version in aws-crt-java pom.xml.
Default locations:
- Linux:
/home/<username>/.m2 - Windows:
C:\Users\<username>\.m2 - macOS:
/Users/<username>/.m2
Custom repository location:
mvn -Dmaven.repo.local=/path/to/custom/repo clean installGlobal configuration: Modify settings.xml in Maven configuration directory.
Cleanup: The .m2 directory can be safely deleted to clear local builds.