How to install and configure the Moderne plugin
Moderne offers an IntelliJ IDEA plugin that can not only help you create and debug recipes, but can also assist with your general development experience by allowing you to easily search for code across all of your repositories at once. In this short guide, we'll show you how to install and configure the Moderne plugin.
Installation
Install the Moderne IntelliJ IDEA plugin by either:
- Going to https://plugins.jetbrains.com/plugin/17565-moderne and downloading the plugin OR
- Navigating to
Settings
→Plugins
inside of IntelliJ IDEA, searching forModerne
, and installing it
Prerequisites
Before you can use the Moderne IDE plugin, you'll need to:
Configuring the Moderne plugin
With the Moderne CLI configured and the plugin downloaded and installed, you're ready to begin configuring it.
The first thing you'll need to do is tell the Moderne plugin where the CLI is located. To do this, go to Settings
--> Tools
--> Moderne
.
If the CLI is installed on the system PATH (e.g., with Homebrew or Chocalatey), you'll want to select the top radio button, and the plugin should automatically find the CLI. If you have downloaded the CLI via Maven Central or an internal artifact repository as a JAR, you'll want to pick the second radio button and specify the path where it has been downloaded on disk:
The next thing you'll want to configure is the list of multi-repos that you want to interact with. In the multi-repos section, you have two options to pick from:
- You can point the plugin to a local folder that contains a set of repositories that you've already performed a mod build on.
- You can select a Moderne Organization from the Moderne DX or SaaS instance that the CLI has been configured with.
Once you've added the multi-repos you'd like the plugin to have access to, press Apply
.
When you apply these settings, any Moderne Organization that you have selected will be cloned using --metadata-only. Its LSTs will also be downloaded from your artifact repository. This process resembles dependency resolution of binary dependencies.
After configuring the plugin, you will see the repositories belonging to the multi-repo(s) that you configured listed in the Moderne tool window (on the right side of the IDE). Click the refresh
Multi-repos
"Multi-repo" refers to a named set of repositories that you want to operate on as a unit for either code search or transformation. The set of repositories in a multi-repo need only share a common ancestor root directory somewhere on disk. Common examples of what multi-repos represent are:
- The set of repositories that your team is responsible for.
- A set of repositories that uses a core platform library or component that you are developing whose developers belong to product teams other than your own.
- A set of repositories all using a certain technology (e.g., all Gradle projects or all Cassandra projects) that you would like to study together, though the responsibility for this set of repositories is spread across several or many distinct product teams.
Moderne Organizations are directly configurable as a multi-repo. In some cases, though, individual engineers may assemble their own multi-repos based on what they have on their local machines.