The most recent patch for this version is 26.2.1.  Learn more

Skip to main content

Offline installation

Axiomatics Policy DevOps (APD) downloads Gradle, the Gradle plugins, and its libraries from the internet: from the Gradle servers, Maven Central, and the Axiomatics Maven repository. For environments where internet access is limited, or restricted to internal corporate networks, you can install and run APD in one of two modes:

  • Offline mode: without any network access, such as in an air-gapped network. Axiomatics provides all files, which you copy into your project.
  • Local mode: with access to your corporate network only. Your corporate artifact server, such as Artifactory or Nexus, provides the files.

Offline mode​

Complete all actions that require internet access, such as downloading the files below, before you move them to the air-gapped environment. Then, install APD in offline mode.

Before you start, make sure you have a JDK 17 and Git installed. Offline, Gradle cannot download the JDK that APD uses to compile and run the tests, so it must be installed.

  1. Clone the APD project from GitHub. If you cannot clone from GitHub, ask for the APD files together with the Maven repository clone in step 2.

    git clone https://github.com/axiomatics/axiomatics-policy-devops
    note

    Alternatively, you can download the repo contents as a ZIP fileOpens in a new tab.

  2. Contact Axiomatics through the Support portalOpens in a new tab to request the Maven repository clone. Specify your preferred delivery method, such as a secure third-party file-sharing service or an HTTPS download link for transfer to an offline machine.

    info

    The repository clone is a large ZIP file containing JAR and POM files. If its size is a concern, use local mode instead.

  3. Copy the ZIP contents into the root of your ALFA Git project. If prompted, overwrite gradle-wrapper.properties.

  4. Verify the following:

    • ALFA_PROJECT_ROOT/lib/ exists and contains the local Maven repository and its subfolders.
    • ALFA_PROJECT_ROOT/gradle/wrapper/gradle-<version>-bin.zip exists.
    • In ALFA_PROJECT_ROOT/gradle/wrapper/gradle-wrapper.properties the key distributionUrl no longer points to a HTTPS URL but to the local file gradle-<version>-bin.zip.
  5. Make sure APD runs in offline mode by executing a task, such as:

    gradlew test

    If the installation is successful, you should see:

    Running in offline mode using local repository at <project directory>/lib

Committing offline mode changes​

Committing offline mode changes will add a large amount of binaries to your ALFA Git repository. This practice violates Git best practices and can negatively impact the performance of your central build server, as this data must be checked out for every build.

Therefore, it is recommended to avoid committing these changes. Add lib/ and gradle/wrapper/gradle-*-bin.zip to the .gitignore file, and do not commit the changed gradle/wrapper/gradle-wrapper.properties.

Local mode​

Local mode eliminates the need for internet access but requires intranet (corporate) network access. In this mode, your software/artifacts server (Artifactory, Nexus, etc.) hosts and provides the JAR files.

  1. Import the Axiomatics Maven clone you received to your software/artifacts server.

  2. Reconfigure the APD Gradle project by adding your corporate repositories. Add your corporate repository first within each repositories { block in the repository sections of the following files:

    • settings.gradle, in pluginManagement { repositories { } }: the Gradle plugins
    • buildSrc/build.gradle
    • buildSrc/src/main/groovy/axiomatics-policy-devops.gradle
    note

    The specific method for adding your repository depends on your organization's setup. Consult your support team for guidance.

    warning

    When you update APD, the buildSrc/ directory is replaced, and settings.gradle is taken from the new version except for your rootProject.name. After each update, add your corporate repositories to the three files again. See Update.

You can also host the Gradle distribution on a local software server. Upload the distribution to your server and update distributionUrl in gradle/wrapper/gradle-wrapper.properties to reference it.