Tuesday, January 22, 2013

maven-compiler-plugin 3.0


I took a large multi-module build and used it to test out the reported build speed increases of the 3.0 release of the maven compiler plugin.



Here are my results:



mvn -Prelease -amd -fae clean org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:01.792s
[INFO] Finished at: Mon Dec 17 13:07:28 CST 2012
[INFO] Final Memory: 566M/1758M



mvn -Prelease -amd -fae clean org.apache.maven.plugins:maven-compiler-plugin:3.0:compile
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 59.787s
[INFO] Finished at: Mon Dec 17 12:56:53 CST 2012
[INFO] Final Memory: 90M/1964M


And to really knock your socks off:

mvn -Prelease -amd -fae clean org.apache.maven.plugins:maven-compiler-plugin:3.0:compile -T 1.5C
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.296s (Wall Clock)
[INFO] Finished at: Mon Dec 17 13:08:49 CST 2012
[INFO] Final Memory: 120M/1952M



You may also benefit with concurrency with your tests... since that is the bulk of your build times in Bamboo (or whatever CI server you use).

http://olafsblog.sysbsb.de/concurrent-execution-of-integration-and-unit-tests-with-maven/

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <configuration>
        <parallel>classes</parallel>
    </configuration>
</plugin>

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <parallel>classes</parallel>
    </configuration>
</plugin>

No comments: