Offline Setup

Some development environments, like air-gapped networks, do not allow outbound internet access. This guide explains how to download required Maven artifacts on an internet-connected machine, transfer them to an air-gapped machine, and run builds and tests fully offline.

Overview

The process has four stages:

  1. Download - On a machine that can access GE Vernova Artifactory, resolve all project dependencies into a dedicated local directory.

  2. Transfer - Package that directory and move it to the air-gapped machine.

  3. Configure - Point Maven (and IntelliJ) to the transferred artifacts and enable offline mode.

  4. Verify - Run an offline build to confirm that no network access is required.

Step 1: Download Artifacts on the Connected Machine

You need a machine that can access GE Vernova Artifactory and a working Maven setup, as described in Configure the SDK.

Prepare the Project

Use the example project (or your own project) as the basis for downloading dependencies. All dependencies listed in its pom.xml will be resolved, so remember to add any dependencies you need for development to the pom.

Clone the example project if you do not already have it:

git clone https://github.com/utilihive/flow-developer-example-project-mvn.git
cd flow-developer-example-project-mvn

Download All Dependencies

Run the following commands from the project root: The -Dmaven.repo.local flag directs Maven to download everything into a clean, dedicated directory (./offline-repo) instead of your personal .m2 cache. This ensures the directory contains only what the project needs.

mvn dependency:go-offline -Dmaven.repo.local=./offline-repo
mvn dependency:resolve-sources -Dmaven.repo.local=./offline-repo

dependency:go-offline resolves project dependencies and Maven plugins. dependency:resolve-sources adds source JARs, which enable contextual documentation in IntelliJ.

Some Maven plugins are loaded very early in the build lifecycle and may not be captured by dependency:go-offline. To ensure they are included, run a full build against the same local repository:

mvn verify -Dmaven.repo.local=./offline-repo

If the build succeeds, the offline-repo directory is complete.

Step 2: Package and Transfer

Archive the offline-repo directory:

# macOS / Linux
tar -czf offline-repo.tar.gz offline-repo/

# Windows (PowerShell)
Compress-Archive -Path offline-repo -DestinationPath offline-repo.zip

Transfer the archive to the air-gapped machine using your approved method (USB drive, secure file transfer, and so on).

Step 3: Configure the Air-Gapped Machine

Extract the Repository

Choose a permanent location for the local repository, and extract the archive there. The examples below use ~/offline-repo, but you can use any path.

# macOS / Linux
mkdir -p ~/offline-repo
tar -xzf offline-repo.tar.gz -C ~/

# Windows (PowerShell)
Expand-Archive -Path offline-repo.zip -DestinationPath $HOME

Configure Maven

Open (or create) $HOME/.m2/settings.xml, and add the following:

<settings>
    <offline>true</offline>

    <localRepository>/home/yourusername/offline-repo</localRepository> (1)
</settings>
1 Replace with the absolute path to the directory you extracted in the previous step. On Windows, use a path like C:\Users\yourusername\offline-repo.
If you already have a settings.xml with other content (for example, server credentials from your connected machine), add only <offline> and <localRepository> to the existing file.

Alternatively, you can pass the flags on the command line instead of modifying settings.xml:

mvn -o -Dmaven.repo.local=~/offline-repo verify

Configure IntelliJ IDEA

  1. Open File  Settings (Windows/Linux) or IntelliJ IDEA  Settings (macOS).

  2. Go to Build, Execution, Deployment  Build Tools  Maven.

  3. Set Local repository to the path of your extracted offline-repo directory.

  4. Go to Build, Execution, Deployment  Build Tools  Maven  Importing.

  5. In the Automatically download section, uncheck Sources and Documentation to prevent IntelliJ from making network requests.

  6. Select OK and wait for IntelliJ to re-index the project.

Step 4: Verify the Offline Setup

Run a full build in offline mode to confirm that all artifacts are available locally:

mvn -o verify

A successful build confirms that no network access is required. If Maven reports a missing artifact, repeat Step 1: Download Artifacts on the Connected Machine for that artifact (add it temporarily to the project pom.xml if needed), then transfer the updated repository again.

Other Dependencies

The steps above cover Maven artifacts only.

If your integration project tests against external services, such as a database, a message broker, or a third-party API, those services must be reachable from the air-gapped machine. Provision any required infrastructure inside the network boundary before running tests.

If your project uses Testcontainers, the Docker images it pulls at test time are not available on an air-gapped machine. On a connected machine, pull the required images, export them with docker save, transfer the archives, and import them on the air-gapped machine with docker load before running tests.