After Maven 2, the Apache Maven rolled out the enhanced version of Maven .i.e. Maven 3.0 with improved features to make it more convenient for the users. Maven 3.0 was released in order to overcome all the difficulties related with Maven 2 integrated with several bug fixes and improvements, making it a better choice for the users. Let us find out, the top 10 Features of Maven 3.0 that makes it more recommendable:
Backward Compatibility:
Maven 3 has been developed to make it more users friendly as it allows smooth transition from Maven 2.x to Maven 3.0 for the developers and immediately issues alerts if a duplicate dependency or plugin declarations or plugin version numbers are not specified. Moreover, Maven 3 backward compatibility feature helps the developers with its improved usability, increase performance, safe embedding, and ability to implement many highly demanded features.
Performance Improvement
One of the most sought after feature of new Maven 3 is its speed. As far as performance speed is concerned, Maven 3 is 50-400% faster than its earlier version Maven 2.x and thus increases the developer productivity significantly. Performance improvement in maven 3 allows easy download and quick build of project and hence makes it worth to adapt.
Project Dependencies and Plugin Dependencies
When we talk about Project Dependencies and Plugin Dependencies in Maven 3, it is quite different from Maven 2 as project dependencies are retrieved from "repositories" and plugin dependencies are retrieved from "Plugin Repositories" in Maven 3. Moreover, in Maven 3 you can retrieve your own project dependencies from the declared "repositories", however, any plugin's dependencies are retrieved from the declared "pluginRepositories".
Easy Embedding
As Maven 2 was lacking the embedding property due to its architecture design, Maven 3 was released with this added feature, which allows Maven to be embedded in other tools. Using Maven 3 to execute command line is much more authentic as it aligns the version of Maven in your tools and adds consistency between CLI and your IDE.
Parent Version
Maven 2 has a restriction of specifying the parent version in the sub-modules which led to a problem in its maintenance while initiating the shifting to a new version. To overcome this limitation Maven 3 was released which removed the need to specify the parent version in sub modules.
Enhanced Error and Integrity Reporting
Maven 3 has been developed with improved error reporting, which is a great feature. Moreover, this feature provides you with a link to the Maven wiki page that helps you to get complete error description and other possible reasons of the error.
Parallel Builds
In Maven 3, an interesting and new feature has been added, which is called ‘Parallel Builds' that analyses the project dependency graph and allows you to build a schedule modules in parallel. You need to write down a command in order to run a project with parallel build Moreover, with parallel builds; you can attain significant performance improvements of 20-50%.
Improved Logging
In Maven 3, the logging output has been enhanced with a little change to the earlier version to make it easier to read and comprehend. The improvements in the logging includes separating output from every plugin with an empty line, version of the plugin being executed and specifying the artifactId of the project being build.
Plugin Extension Points
Unlike Maven 2, where you needed extend the plugin in order modify plugin behavior, Maven 3 allows you to hook up different extension points.
Polyglot Builds
Polyglot Maven is quite interesting feature added in Maven 3 which allows the users write POM file in a non-XML format. Moreover, the Maven core provides DSL to access the Maven internals and write POM files in the language of your choice. However, the formats currently supported are Groovy, Ruby, Scala, Clojure, YAML and others and thus it makes easier for the Maven users who are not so familiar with XML. Though, Polyglot Maven is not integrated with Maven 3 but it can be downloaded separately.