Update air-gapped-cli-install.md

This commit is contained in:
Jonathan Schnéider
2025-02-24 19:18:42 -05:00
committed by GitHub
parent 693b89018f
commit f11939edff

View File

@@ -126,14 +126,14 @@ _For more information on the Moderne CLI license, please see our [license docume
### Step 4: Configure the CLI to point to your internal artifact repository
In order for the CLI to download recipes and dependencies/lookup versions as needed, it will need to be provided with the path to your Maven settings file. This likely exists on developer machines for the sake of redirecting requests from Maven Central to an internal artifact instance.
**If your Maven settings file is not in the default location**, please run the following command to point the CLI to your Maven settings file. If it is in the default location, skip to step 5.
```bash
mod config build maven settings edit /path/to/maven/settings/file
```
In order for the CLI to download recipes and dependencies/lookup versions as needed, it will need to be provided with the path to your Maven settings file. This likely exists on developer machines for the sake of redirecting requests from Maven Central to an internal artifact instance.
### Step 5: Install recipe JARs
The next thing you need to do is ensure your internal artifact repository has all of the recipe JARS (assuming that your artifact repository is not a pure remote proxy to Maven Central already or that there isn't some automatic procurement step at dependency resolution time).
@@ -142,23 +142,6 @@ With that done, you'll need to run the `mod config recipes jar install` command
The latest version of every JAR and the CLI command to install those latest versions can be found at the bottom of the [latest versions of every OpenRewrite module doc](https://docs.openrewrite.org/reference/latest-versions-of-every-openrewrite-module#cli-installation). This is automatically updated whenever we do a new release.
:::tip
We've created a `moderne-recipe-bom` that aligns version numbers for all Moderne maintainced recipe modules. This can be useful for users who create their own recipe libraries that depend on proprietary recipe modules. See below for how to add this to your project.
<Tabs groupId="project-type">
<TabItem value="gradle" label="Gradle">
Gradle uses the [platform](https://docs.gradle.org/current/userguide/platforms.html#sub:using-platform-to-control-transitive-deps) function for aligning dependency versions.
```groovy
dependencies {
implementation(platform("io.moderne.recipe:moderne-recipe-bom:<version>"))
// No need to specify version numbers
implementation("io.moderne.recipe:rewrite-spring")
implementation("org.openrewrite.recipe:rewrite-sql")
}
```
</TabItem>
<TabItem value="maven" label="Maven">
@@ -540,4 +523,4 @@ With all of the repositories cloned to your machine, you can then build LSTs for
mod build .
```
With the LSTs built, you're ready to run recipes against them! Consider checking out the [using the CLI section in the getting started guide](../getting-started/cli-intro.md#using-the-cli) to see some ways you can use the CLI.
With the LSTs built, you're ready to run recipes against them! Consider checking out the [using the CLI section in the getting started guide](../getting-started/cli-intro.md#using-the-cli) to see some ways you can use the CLI.