Everything is in the memory ready to execute the build request. Each following build is much faster: the second takes just 0.32 sec (18xspeedup), because the daemon is running already, no JARs need to be read from the disk, no Maven core and plugin classes have to be loaded. The first build with mvnd that starts the daemon in the background takes roughly the same time. Building that single module with stock Maven (mvn install -DskipTests, having all dependencies cached in the local Maven repository) takes 5.8 sec on my machine. It has ~4060 lines of Java code, so it is not big at all. When building one or two modules, the speedup can be seven, 10 or more times compared to stock Maven. ![]() Palaga: Saving time is the most compelling reason to use it. InfoQ: Why would one use the daemon? What are the speed gains when using it? I think we are on a good way to build a healthy community. There are around 10 people watching our GitHub repository, some of them being active in discussing issues and new features. We had a few code contributions from the community - the Homebrew package by Michael Simons being the most prominent one. Palaga: Guillaume and I are the main contributors at the moment. InfoQ: How many contributors currently work on mvnd? How sustainable is the project? How do you expect the community to grow? ![]() The idea came out of this work to use a client/server architecture to benefit from caching and JIT. At some point, I had to start digging into Maven itself to improve its speed. Guillaume Nodet: Over the past months, I’ve been working at reducing the build time of the Apache Camel project. I got excited immediately when I heard that Guillaume had a working prototype of mvnd. Palaga: Building of large source trees (Camel Quarkus has 1200+ Maven modules) is a part of my daily routine. InfoQ: What was the reasoning behind the creation of mvnd? Peter Palaga: I am a part of the Red Hat Integration team and I am mostly porting Camel components to Quarkus in the project called Camel Quarkus. Can we start by asking you to introduce yourself and describe your day-to-day job and your role in developing mvnd? InfoQ: Thank you for taking the time to answer some questions for our readers. In order to get a better understanding of what Maven Daemon is and how we can benefit from it, InfoQ reached out to Guillaume Nodet, mvnd’s initiator, and Peter Palaga, one of the main contributors, for a round of questions. A study conducted by Gradle shows Maven as being in some cases 100 times slower than builds run with Gradle. ![]() Nevertheless, the increasing complexity and size of today’s software projects, together with the need to deploy faster, more often and with minimal or even no service disruption, have made build speed a priority. Also, it shifted towards a more conventional way of organising a project, ensuring that the plugins can be reused multiple times.Īlmost two decades later, Apache Maven is the leader of JVM’s build tools based on Snyk’s JVM Ecosystem report with a 64% share. Maven brought a paradigm change in the Java ecosystem build tools it shifted from the procedural approach used by Apache Ant to a declarative model. The oldest version of Maven that Maven’s history page records is 1.0-beta-2 on, almost 19 years ago. Its designers focused on optimization and state-of-the-art technologies and methods: GraalVM is used instead of a JVM process, JIT compiled classes are cached, and spawning multiple processes if needed. The Maven Daemon project intends to increase the speed of the Maven builds by using techniques known from Takari and Gradle.
0 Comments
Leave a Reply. |