Further changes based on feedback

This commit is contained in:
Sam Snyder
2021-10-05 16:47:35 -07:00
committed by GitHub
parent 46ec044f86
commit 396c02d413

View File

@@ -3,7 +3,7 @@
Having your build publish AST files to an artifact repository under your control is part of setting up the Moderne SaaS in your company's environment. This guide will show you how to set up your Maven and Gradle builds accordingly.
{% hint style="info" %}
Moderne build plugins include all the functionality of [OpenRewrite plugins](https://docs.openrewrite.org/getting-started/getting-started) plus integration with the Moderne SaaS. There is no benefit in using Moderne build plugins over OpenRewrite plugins locally because ASTs need to be imported into memory for the build tools to use them and ASTs need to be rebuilt whenever the code is changed.
Connecting your private code to the Moderne SaaS is the only reason to use these plugins instead of the [OpenRewrite plugins](https://docs.openrewrite.org/getting-started/getting-started). If you are not connecting private code to the Moderne SaaS you should use the OpenRewrite plugins instead.
{% endhint %}
## Step 1: Apply moderne-maven-plugin or moderne-gradle-plugin
@@ -64,11 +64,13 @@ rewrite {
{% endtabs %}
{% hint style="success" %}
The Moderne build plugins offer all of the functionality and configuration options of their OpenRewrite counterparts. If you were previously applying the OpenRewrite plugins, you can remove those declarations from your build files after applying the Moderne plugins.
The Moderne build plugins offer all of the functionality and configuration options of their OpenRewrite counterparts. If you were previously applying the OpenRewrite plugins, you can remove those declarations from your build files.
{% endhint %}
{% hint style="warning" %}
If you're a Maven user used to command line invocations such as `mvn rewrite:dryRun` or `mvn rewrite:run`, note that these invocations become `mvn moderne:dryRun` and `mvn moderne:run`. Gradle users can continue invoking `gradlew rewriteDryRun` and `gradlew rewriteRun` as the names of those tasks do not change in this plugin.
If you're a Maven user used to command line invocations such as `mvn rewrite:dryRun` or `mvn rewrite:run`, note that these invocations become `mvn moderne:dryRun` and `mvn moderne:run`. If you wish to continue invoking these commands with the "rewrite" prefix, such as to avoid having to alter CI workflows invoking `mvn rewrite:dryRun`, you can apply both plugins without conflict.
Gradle users can continue invoking `gradlew rewriteDryRun` and `gradlew rewriteRun` as the names of those tasks remain the same in the moderne-gradle-plugin.
{% endhint %}
## Step 2: Build and publish the next version of your project