Repository navigation
Getting Started
Applies to Milo 1.2.0-SNAPSHOT. Source baseline 7faaf4f05, 2026-10-04.
Use Java 17 or later and Maven 3.6.3 or later to build an application that embeds the client SDK, server SDK, or both. The examples here are exercised on Temurin 17.0.19+10 and Maven 3.9.16. Later JDKs were not tested for this guide.
Version 1.2.0-SNAPSHOT is unreleased. The latest release on 2026-10-04 is 1.1.7; use its matching source and examples for 1.1 APIs. This guide's main examples use 1.2 APIs. Only the migration guide's explicitly labeled "Before" blocks use 1.1.7.
Create an empty Maven application directory and save this complete configuration as pom.xml. It includes both SDKs so the two first-program tutorials use the same project. A client-only application can omit milo-sdk-server; a server-only application can omit milo-sdk-client. The imported BOM aligns Milo artifact versions. Without a BOM, put the same explicit Milo version on each SDK dependency.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>milo-first-programs</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.milo</groupId>
<artifactId>milo-bom</artifactId>
<version>1.2.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.milo</groupId>
<artifactId>milo-sdk-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.milo</groupId>
<artifactId>milo-sdk-server</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.18</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
</plugin>
</plugins>
</build>
</project>The SLF4J Simple dependency supplies console logging for this tutorial. Use your hosting application's logging provider when integrating Milo into an existing application. The compiler plugin's Java release setting controls compilation; it does not install a JDK.
The POM's sonatype-snapshots repository resolves the preview artifacts from central.sonatype.com/repository/maven-snapshots/. Releases resolve through Maven Central. The source README at this baseline still lists oss.sonatype.org and older release coordinates. This tutorial's POM supersedes those entries for 1.2.0-SNAPSHOT.
Snapshot publications change over time. The source commit above identifies the API baseline; a later download with the same 1.2.0-SNAPSHOT label can contain changes. Record your resolved artifact versions and hashes when reproducing a build. For development tied to this exact source commit, follow the source build instructions and build that revision. A timestamped repository artifact and a Git commit are separate identifiers; do not assume they are byte-for-byte identical. This guide's fresh consumer resolved timestamp 20261004.170950.
Maven can select a newer remote snapshot after you install a local build, or a newer local installation when you intended to use the published snapshot. To use your source build consistently, install it in a dedicated local repository and remove this POM's snapshot repository for that consumer. Check that no settings profile or mirror reintroduces a snapshot source. Confirm resolution using the classpath file produced below and the artifact directories' maven-metadata-local.xml and repository metadata. Keep the resolved JAR hashes with the build record.
Copy the complete FirstServer and FirstClient programs into the paths named on those pages. From the application directory, compile them and write the runtime dependency classpath:
mvn -q compile org.apache.maven.plugins:maven-dependency-plugin:3.9.0:build-classpath -Dmdep.outputFile=target/classpath.txtSuccessful compilation creates target/classes; the dependency goal writes target/classpath.txt. Start the server in one terminal and the client in another using the commands on their pages. The client should print Temperature: 21.5, and both programs have explicit shutdown paths.
The shell launch commands use the POSIX classpath separator :. On Windows, use the IDE entry points or adapt the classpath separator to ; and read the classpath file using your shell. Those adaptations are not separate tested command examples here.
If Maven cannot resolve a snapshot, check repository reachability and whether snapshots are enabled. If Java reports an unsupported class version, check the runtime selected by the launching shell as well as the compiler. If the client reports Bad_ConnectionRejected, start FirstServer or check whether it failed to bind; see Troubleshooting.
Many larger repository client examples use ClientExampleRunner, which starts ExampleServer on all network interfaces and configures demonstration trust. It exposes an unsecured anonymous endpoint and fixed example credentials; run it only on a trusted host or network, or behind a firewall. The first programs use two explicit processes so their ownership and shutdown are visible. See Examples for the learning paths and external requirements.
The source module and reproduction checks contain the complete programs, fixtures, and validation tools.
OPC UA concepts · First server · First client · Client SDK · Server SDK · Contributing
User guide for Milo 1.2.0-RC1 at source 69cb25087, 2026-10-12. Home · Getting started · Examples · Troubleshooting · Release notes
- Home
- Start here
- Client guide
- Server guide
- Feature guides
- Reference
- Operations
- Examples
- Release notes
- Contributing