A new version of Maven (3.5.0-alpha-1) is currently in Apache [VOTE].

This is the result of my tests with this version.

Configurations

MacOsX Dev

mvn -v
Apache Maven 3.5.0-alpha-1 (8e6bbc4d4aa7cdc837625a05358c98ca15f72698; 2017-02-23T16:04:43+01:00)
Maven home: /Applications/apache-maven-3.5.0-alpha-1
Java version: 1.8.0_51, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.3", arch: "x86_64", family: "mac"

Jenkins Continous Integration (2.19.X) On RHEL7

mvn -v
Apache Maven 3.5.0-alpha-1 (8e6bbc4d4aa7cdc837625a05358c98ca15f72698; 2017-02-23T16:04:43+01:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_112, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_112/jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "linux", version: "3.10.0-327.28.2.el7.x86_64", arch: "amd64", family: "unix"

1st project : Takari way

In this little multi-module project, I have the following plugins :

  • takari-lifecycle-plugin:1.12.1

  • maven-surefire-plugin:2.18.1

  • maven-compiler-plugin:3.1

  • maven-resources-plugin:2.6

  • maven-enforcer-plugin:1.3.1

  • maven-war-plugin:2.3

In addition, I have the following extensions (describe in a .mvn folder) :

  • takari-local-repository:0.11.2

  • takari-filemanager:0.8.3

  • aether-connector-okhttp:0.16.0

I run mvn commands with takari smart builder and 6 threads.

Compile and Tests

mvn clean install

Build is SUCCESS with both version 3.3.9 and 3.5.0-alpha-1.

This is the performance test :

Maven 3.3.9 (MacOs) Maven 3.5.0-alpha-1 (MacOs)

1st run

Total time: 44.581 s (Wall Clock)

Total time: 43.968 s (Wall Clock)

2nd run

Total time: 47.276 s (Wall Clock)

Total time: 43.678 s (Wall Clock)

3rd run

Total time: 44.256 s (Wall Clock)

Total time: 43.660 s (Wall Clock)

NOTE: in Maven 3.3.9 I have not warning parallel execution, but I have in Maven 3.5.0-alpha-1

[WARNING] *****************************************************************
[WARNING] * Your build is requesting parallel execution, but project      *
[WARNING] * contains the following plugin(s) that have goals not marked   *
[WARNING] * as @threadSafe to support parallel building.                  *
[WARNING] * While this /may/ work fine, please look for plugin updates    *
[WARNING] * and/or request plugins be made thread-safe.                   *
[WARNING] * If reporting an issue, report it against the plugin in        *
[WARNING] * question, not against maven-core                              *
[WARNING] *****************************************************************
[WARNING] The following plugins are not marked @threadSafe in neo routeur:
[WARNING] io.takari.maven.plugins:takari-lifecycle-plugin:1.12.1
[WARNING] Enable debug to see more precisely which goals are not marked @threadSafe.
[WARNING] *****************************************************************

Compile ONLY (no Tests)

mvn clean install -DskipTests

Build is SUCCESS with both version 3.3.9 and 3.5.0-alpha-1.

This is the performance test :

Maven 3.3.9 (MacOs) Maven 3.5.0-alpha-1 (MacOs)

1st run

Total time: 8.453 s (Wall Clock)

Total time: 8.057 s (Wall Clock)

2nd run

Total time: 8.764 s (Wall Clock)

Total time: 8.292 s (Wall Clock)

3rd run

Total time: 8.293 s (Wall Clock)

Total time: 8.326 s (Wall Clock)

In Eclipse IDE

I have Eclipse NEON standard edition with m2e. I have switch Maven settings to take my 3.5.0-alpha-1 local installation. Everything works good, maven update/compilation/tests/Tomcat launch.

2nd project : Classic way

In this bigger multi-module project (10 000 classes), I have the following plugins :

  • maven-surefire-plugin:2.16

  • maven-compiler-plugin:3.3

  • maven-resources-plugin:3.0.1

  • maven-war-plugin:3.0.0

  • maven-jar-plugin:2.4

  • maven-install-plugin:2.5.1

I have no takari.

Compile and Tests, no Threading

mvn clean install

Build is SUCCESS with both version 3.3.9 and 3.5.0-alpha-1.

This is the performance test :

Maven 3.3.9 (Jenkins) Maven 3.5.0-alpha-1 (Jenkins)

1st run

28min

27min

NOTE: in Jenkins by default the console output is ugly with maven 3.5.0-alpha-1 (see next). To fix this the Ansi Color Plugin is necessary !

[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;32mBUILD SUCCESS[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m

EDIT : After reading this, @rfscholte said it’s weird because Jenkins use -B option (Maven batch mode) by default, and in this case ANSI color is not enable, so the output console should be good.

So I have test another cases :

  • Jenkins Maven Job

Output command is :

<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f /data/blabla/pom.xml -s /opt/apache-maven-3.5.0-alpha-1/conf/settings.xml -gs /opt/apache-maven-3.5.0-alpha-1/conf/settings.xml clean install -Dmaven.test.failure.ignore=true -T 4

And I have ugly output

[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Build Order:[m
[[1;34mINF[m]
  • Jenkins Freestyle Job with maven step

Output command is :

$ /opt/apache-maven-3.5.0-alpha-1/bin/mvn -f pom.xml -s /opt/apache-maven-3.5.0-alpha-1/conf/settings.xml -gs /opt/apache-maven-3.5.0-alpha-1/conf/settings.xml clean install -Dmaven.test.failure.ignore=true -T 4

And in this case output is ok

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
  • Jenkins Pipeline

    node {
      checkout(blabla)
      env.MAVEN_HOME=tool name: 'Maven 3.5.0-alpha-1', type: 'maven'
      sh 'mvn clean install -B -Dmaven.test.failure.ignore=true -T 4'
    }

And in this case output is ok too

Conclusion : do not use Jenkins Maven project, or using with Ansi Color Plugin

Compile ONLY (no tests), no Threading

mvn clean install -DskipTests

Build is SUCCESS with both version 3.3.9 and 3.5.0-alpha-1.

This is the performance test :

Maven 3.3.9 (Jenkins) Maven 3.5.0-alpha-1 (Jenkins)

1st run

6min29s

6min27s

Compile ONLY (no tests) and 4 Threads

mvn clean install -T 4

Build is SUCCESS with both version 3.3.9 and 3.5.0-alpha-1.

This is the performance test :

Maven 3.3.9 (Jenkins) Maven 3.5.0-alpha-1 (Jenkins)

1st run

4min10s

4min13s

Conclusion

For now I haven’t see any blocker to this new version of Apache Maven!

The performance are almost the same as 3.3.9.

New color output console of Maven is nice.

Good job Apache Maven Team

comments powered by Disqus