This is interesting discussion and so I decided to build your project with
Java 9 and Maven 3.5.3.
Completed within 1.5 sec.
I have noticed that Maven 3.3.9 was slower, cca 2.5 sec.

mvn -V test
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297;
2018-02-24T20:49:05+01:00)
Maven home: D:\apache-maven-3.5.3
Java version: 9.0.1, vendor: Oracle Corporation
Java home: e:\Program Files\Java\jdk-9.0.1
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.io7m.minimal:com.io7m.minimal
>------------------
[INFO] Building com.io7m.minimal 0.0.1
[INFO] --------------------------------[ jar
]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
com.io7m.minimal ---
[WARNING] Using platform encoding (Cp1250 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
d:\vcs\github\maven-minimal-20180413\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @
com.io7m.minimal ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
@ com.io7m.minimal ---
[WARNING] Using platform encoding (Cp1250 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
d:\vcs\github\maven-minimal-20180413\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @
com.io7m.minimal ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @
com.io7m.minimal ---
[INFO] No tests to run.
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.450 s
[INFO] Finished at: 2018-04-14T11:36:37+02:00
[INFO]
------------------------------------------------------------------------

On Fri, Apr 13, 2018 at 9:20 PM, Mark Raynsford <
org.apache.maven.u...@io7m.com> 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:
>
>   https://github.com/io7m/maven-minimal-20180413
>
> 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] http://cr.yp.to/daemontools/tai64n.html
> [2] The Maven output claims 6 seconds, but that doesn't include the
>     time it took for the build to start.
>
> --
> Mark Raynsford | http://www.io7m.com
>
>

Reply via email to