maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <>
Subject Re: Speeding up Maven
Date Fri, 13 Apr 2018 20:29:27 GMT

Assuming a pre-filled Maven local cache, I've a 16 second build that's only
longer when I run a screen recorder in order to make the video show here -

That one runs three WebDriver tests too after the unit and service tests -
meaning (implicitly) it's testing JavaScript as well as Java in that time.

In order to make it fast I've abandoned the fail-safe plugin and do all
parts of the test-pyramid in surefire (see the pom).

- Paul

On Fri, Apr 13, 2018 at 3:20 PM, Mark Raynsford <> wrote:

> Hello.
> Is there any way I might speed up Maven? I've been using it for years
> and, for the first time, I'm actually executing it from an IDE rather
> than using the IDE's built-in compiler. It seems like there's a rather
> large and apparently fixed amount of overhead per invocation. Take the
> following "could not be simpler" project:
> I piped the output through tai64n [1] to give a better indication of
> exactly how long everything is taking. That's a project that compiles a
> single Java file and produces a jar. It doesn't run any tests, it
> doesn't include any resources. 16 seconds total execution [2]!
> Now for an infrequent command-line build, that's not *too* obnoxious.
> For a "click a button in the IDE because I want to try this bit of code
> now" build, that's a world of suffering.
> It seems like Maven first spends ten entire seconds doing not very
> much. That cannot be attributed to JVM startup time (Hello World on my
> system takes about 100ms to reach user code, and even the largest Java
> application I still takes less than a second to reach user code after
> all the classes have loaded).
> Is there anything I can do to cut this down? If not, is this something
> that's intended to be addressed in the near future?
> [1]
> [2] The Maven output claims 6 seconds, but that doesn't include the
>     time it took for the build to start.
> --
> Mark Raynsford |

Paul Hammant DevOps <> Let me give your
enterprise a step by step plan to get out of the hell of crazy branching
models (ClearCase maybe?) and into the world of high-throughput CD on
DevOps foundations.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message