When a maven build is slow, it is hard to figure out what is causing this and whether you can “fix” it by tweaking your build. With recent builds of maven, there is a good solution, use the maven buildtime extension.
The use is pretty simple, add a .mvn/extensions.xml file with following content
<?xml version="1.0" encoding="UTF-8"?> <extensions> <extension> <groupId>co.leantechniques</groupId> <artifactId>maven-buildtime-extension</artifactId> <version>3.0.0</version> </extension> </extensions>
The run your build with the “-Dbuildtime.output.log=true” parameter, e.g.
mvn clean install -Dbuildtime.output.log=true
You will now get a summary of timings for each build step just before mavens own summary.
Leave a Reply