Although in the IDE in real projects, I'm skipping more plugin
executions than that.
> What are you memory settings? How is your JDK configured ? Which command
> line options ? (MAVEN_OPTS?):??
I'm both running it from the command line and from the IDE. My point
was that 16 seconds for a command line build is tolerable (although
still pretty damn high for a project that only compiles one Java file
and doesn't do anything else), but running the same build from within
an IDE is painful (because in the IDE, I'm hoping for instant gratification
when I click "Run..." and I don't care about producing a full build
that someone else will use).
$ env | grep MAVEN
My JDK is essentially unconfigured. Whatever the default settings are
for Linux AMD64, OpenJDK 9.
> Depending on your JVM and the configuration that can be quite large
> different time on startup...there are several configurations which can
> be used to improve that...
I'm open to suggestions. I'm fairly confident that it's not JVM startup
time that's the issue. For example, if I add the -X flag to Maven, you
can see that control reaches whatever passes for Maven's main() function
in roughly one second:
You can see that it takes roughly a second to get as far as
printing the "Apache Maven 3.5.2..." message, and then takes
about four seconds to get to "Created new class realm...".
It's up to seven seconds before it even starts scanning for
projects. The build then takes a good 5-7 seconds on top of
that. That equates to about twelve seconds minimum when I
click "Run..." in an IDE, for a single-module build with
next to no plugins executing.
Are there options that can improve Maven's startup time?
The maven-buildtime-profiler plugin will definitely be useful
for larger builds, but right now I'm concerned about this
bit of overhead that appears to be present for even the most
trivial of builds. I'm not sure the profiler will even see that
overhead as it happens before the profiler would have a chance
to capture data.
With absolutely impeccable timing, I've had a couple of hardware
failures. It is theoretically possible that this was the cause of the
performance issues - although there were no error messages logged
I'm waiting for replacement parts, so it'll be a week or so before I
can continue pulling on this thread.