Installing MADS V5
To develop with MADS V5 you need four pieces: the mads command line tool, a JDK, Maven and, for a comfortable workflow, the VS Code extension.
Did you install
madsby cloning its Git repository? Remove that install first (the/usr/local/bin/madslink or itsbinfolder inPATH) so it does not take precedence over the new one.
1. The mads tool
macOS and Linux (Homebrew)
With Homebrew installed:
brew tap sivicomeng/mads
brew trust --formula sivicomeng/mads/mads
brew install mads
mads --version
Recent Homebrew versions only load formulae from third-party taps once you trust them; that is what brew trust does. Homebrew also installs the Java runtime mads needs.
Windows (Scoop)
From a regular PowerShell window (not "Run as administrator"), install Scoop if you don't have it:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
Then install mads:
scoop install git
scoop bucket add java
scoop install java/temurin-lts-jdk
scoop bucket add mads https://github.com/sivicomeng/homebrew-mads
scoop install mads/mads
mads --version
Scoop needs Git to add buckets. If you already have a JDK 8 or later, skip the two Java lines.
2. Maven
The module commands (mads module build, test, deploy...) run Maven, which mads finds through the M2_HOME environment variable or the M2_HOME preference in mads --edit.
| System | Install Maven | M2_HOME value |
|---|---|---|
| macOS / Linux | brew install maven |
$(brew --prefix maven)/libexec |
| Windows | scoop install maven |
$(scoop prefix maven) |
For example, on macOS add this line to ~/.zshrc:
export M2_HOME="$(brew --prefix maven)/libexec"
3. VS Code extension
Install MADS V5 for Visual Studio Code from the Marketplace, or from the VS Code command palette:
ext install sivicom.mads-extension
The extension adds the Mads view to the Explorer and the Mads: … commands to the palette. Continue with Development in VS Code.
4. Check the installation
mads --version
It shows the platform and tool versions, the latest published version and the install kind. If something is wrong, mads -v --version adds the installed Java versions and the environment variables.
Updating
mads checks for new versions at most every 12 hours and, when one is available, tells you the command:
| Installed with | Update with |
|---|---|
| Homebrew | brew upgrade mads (or mads --update) |
| Scoop | scoop update mads |
To turn the check off, for example on continuous integration servers, set MADS_NO_UPDATE_CHECK=1.
Choosing the Java version
mads uses the first Java it finds in this order: JAVA_HOME_MADS, java in PATH and JAVA_HOME. To pin a specific JDK, set JAVA_HOME_MADS:
export JAVA_HOME_MADS="$(/usr/libexec/java_home -v 21)"