Boost Maven Builds 3× Faster with mvnd: What It Is and How to Use It
mvnd, an Apache Maven subproject built on Gradle and Takari, extends Maven to dramatically speed up builds—up to 300% faster in multi‑module projects—while offering simple installation, environment configuration, and seamless migration from existing Maven settings, making it a powerful tool for developers seeking faster builds.
What is mvnd
mvnd is an Apache Maven subproject (maven-mvnd) that serves as an extension rather than a completely new build tool.
It is built on Gradle and Takari with the goal of making Maven builds faster.
Gradle is a project automation tool based on Apache Ant and Maven concepts, using Groovy or Kotlin DSL instead of traditional XML.
Takari is the core of the Maven wrapper, allowing projects to build without a pre‑installed Maven.
Performance Improvement
Based on a multi‑module Maven project (pig), the author observed a 300% performance boost when using mvnd.
<code>芯片:Apple M1
核总数:8(4性能和4效率)
内存:16 GB
</code> <code>mvnd clean install
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.334 s (Wall Clock)
[INFO] Finished at: 2021-12-24T09:08:57+08:00
[INFO] ------------------------------------------------------------------------
</code> <code>mvn clean install
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.119 s
[INFO] Finished at: 2021-12-24T08:41:10+08:00
[INFO] ------------------------------------------------------------------------
</code>How to Use
Download and unzip the release from GitHub .
Configure the
mvndenvironment variable.
These two steps complete the mvnd installation; it includes a built‑in Maven, so no separate Maven download is required.
Migrating Maven Configuration
Edit
conf/mvnd.propertiesto point to your existing Maven settings.
Set
maven.settingsto the location of your original
settings.xmlfile.
<code>#
# The location of the maven settings file. The client normally uses default settings in {@code ~/.m2/settings.xml}.
maven.settings=/Users/lengleng/env/apache-maven-3.8.1/conf/settings.xml
</code>References
https://github.com/apache/maven-mvnd
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.