Skip to main content

How to configure the Moderne CLI to work with internal tools

This guide covers configuring the Moderne CLI to integrate with internal tooling at your organization. It assumes you already have the CLI installed.

If you're starting from scratch in an environment that installs the CLI from an internal artifact repository (typical for DX and many Enterprise deployments), first install the CLI by following the deploying the CLI from an internal artifact repository guide. Once installed, return here to wire up the other internal integrations you need.

Pointing the CLI at a custom Maven settings file

If your Maven settings file is not in the default location (~/.m2/settings.xml), tell the CLI where it lives:

mod config build maven settings edit /path/to/maven/settings/file

The CLI uses this settings file to download dependencies and look up versions as needed. A custom settings file commonly exists on developer machines for redirecting Maven Central requests to an internal artifact instance.

Pointing the CLI at an internal Artifactory for recipes

If you have an internal Artifactory instance where you store recipes, direct the CLI to it:

mod config recipes artifacts artifactory edit

The command will prompt you for the connection details interactively.

Pointing the CLI at the Code Genome Project for recipes

New recipe releases are published to the Code Genome Project rather than Maven Central. Because the CLI resolves recipes from Maven Central by default, if you don't have an internal mirror in front of it you'll resolve stale releases. To pull the latest recipes directly, add the Code Genome Project as a recipe artifact repository, authenticating with your credentials (the token is the password):

mod config recipes artifacts maven add https://artifacts.codegenomeproject.org/maven --user <username> --password <token>

See Accessing the Code Genome Project for how to get credentials. If your organization already mirrors the Code Genome Project in an internal Artifactory or Nexus, you don't need this command; keep resolving through your internal repository.