Offline / Enterprise Build

This page describes how to build OmegaT without internet access, which is typically required in enterprise environments with restricted networks. It is also useful when building old OmegaT from source distribution to reproduce some issues even if the dependencies are removed from the remote repository.

Overview

OmegaT’s source distribution (OmegaT_*_Source.zip) is designed to be self-contained for application dependencies: all runtime and module JARs are bundled under lib/provided/core and lib/provided/modules.

However, the build-logic layer — the Gradle convention plugins that provide tasks such as SpotBugs, Spotless, ErrorProne, and documentation tools — depends on additional Gradle plugins and libraries that are included in the source distribution.

build-logic/build.gradle depends on mavenLocal(), mavenCentral(), gradlePlugins() and DocBook.org repository.

To build fully offline, an enterprise administrator must pre-populate the maven local directory from lib/provided/build-logic with the required JARs. An admin can copy the folder tree lib/provided/build-logic/* into ~/.m2/repositories to construct the maven local reposiotry.

So the workflow for an admin is:

  1. Construct the maven local repsoitory by cp -r lib/provided/build-logic/* ~/.m2/repositories/ with all required JARs.

  2. Developers then run ./gradlew --offline normally.

Directory Layout

Required dependencies are bundled in the source distribution.

<project-root>/
├── lib/
│   └── provided/
│       ├── core/         ← application runtime deps
│       ├── modules/      ← module plugin deps
│       └── build-logic/  ← copy to maven local repo by admin for offline builds
└── build-logic/
    └── build.gradle      ← use mavenLocal() in addtion of mavenCentral() and gradlePlugins()

See Also