Maven 2.0.9

2.0.9 Release Notes

The full list of changes can be found in our issue management system, and is reproduced below.

Changes that may affect existing builds.

This release was extensively screened for regressions with Release Candidates but several things are worth noting.

  • MNG-3395 - Starting in 2.0.9, we have provided defaults in the super pom for the plugins bound by default to the lifecycle and a few other often used plugins. This will introduce a bit of stability to your builds because core plugins will not change magically on you when they are released. We still recommend taking control of your plugin versions via pluginManagement declarations as this is the most robust way to future proof your builds. Defaulting the plugins in the superpom was a step towards introducing stability for small builds and new users. A full table of the versions used is shown in the next section.
  • MNG-1412 / MNG-3111 introduced deterministic ordering of dependencies on the classpath. In the past, natural set ordering was used and this lead to odd results. The ordering is now preserved from your pom, with dependencies added by inheritence added last. In builds that had conflicting or duplicate dependencies, this may introduce a change to the output. In short, if you have weird issues with 2.0.9, take a look at the dependencies to see if you have conflicts somewhere.

Noteworthy Changes and improvements

  • MNG-2234 - In the past, settings.xml was ignored if there was no pom present (like in archetype:generate). Now all settings will be interpreted correctly.
  • MNG-2664 - The webdav wagon is now included in the core bundle by default. This means deploying 3rd party jars without a pom is a bit easier. The version of the wagon may still be overriden with an extension declaration within your pom.
  • MNG-2972 The plugin.dependency section can now override the dependencies specified by a plugin itself. This is useful for example to upgrade the version of checkstyle used by the checkstyle plugin (and many more).
  • MNG-3286 - The inherited field in a plugin execution block is now functioning correctly. Previously you could only dis-inherit an entire plugin configuration.
  • MNG-3220 - There is now a new scope for importing managed dependencies. See here and here for details. Please note that the use of this scope will break backwards compatibility with older Maven versions. If you use this, you should use the maven-enforcer-plugin to require a minimum maven version of 2.0.9
  • MNG-3394 - plugin versions specified in pluginManagement are now properly overriden by build.plugin.version specification.
  • MNG-3415 - Transmission errors when downloading artifacts should not corrupt the local repository metadata. Hopefully this means the end of "delete your local repo" as a debug step.
  • MNG-3461 - There is a new, more flexible way to define mirror settings. See the settings specification for more information.

Plugin Versions defined in the 2.0.9 super pom:

See the raw super pom for 2.0.9 here.

Default Plugin Versions
Antrun 1.1
Assembly 2.2-beta-2
Clean 2.2
Compiler-plugin 2.0.2
Dependency 2.0
Deploy 2.3
Ear 2.3.1
Ejb 2.1
Install 2.2
Jar 2.2
Javadoc 2.4
Plugin 2.4.1
Rar 2.2
Release 2.0-beta-7
Resources 2.2
Site 2.0-beta-6
Source 2.0.4
Surefire 2.4.2
War 2.1-alpha-1

Complete list of issues fixed in 2.0.9

Bug

  • [MNG-1412] - dependency sorting in classpath
  • [MNG-1914] - Wrong url in error message when using a mirror
  • [MNG-2123] - NullPointerException when a dependency uses version range and another uses an actual version incompatible with that range
  • [MNG-2145] - Plugins' dependencies are not always checked
  • [MNG-2178] - incorrect M2_HOME guess in mvn.bat
  • [MNG-2234] - activeProfile in ~/.m2/settings.xml is ignored when profiles section is missing or empty
  • [MNG-2339] - ${project.*} are interpreted in the wrong place
  • [MNG-2744] - checksum comparison should be case-insensitive
  • [MNG-2809] - Can't activate a profile by checking for the presence of a file in $user.home
  • [MNG-2848] - Environment variables in profile activation not working
  • [MNG-2861] - NullPointerException in DefaultArtifactCollector for relocated resolvedArtifacts with different version ranges and available versions.
  • [MNG-2925] - NullPointerException in PluginDescriptor.getMojo() if there's no mojo in pom.xml
  • [MNG-2928] - Null pointer exeception when introducing version range [major.minor.build-SNAPSHOT,)
  • [MNG-2972] - Ignores version of plugin dependency specified in my pom
  • [MNG-3086] - NullPointerException in ResolutionNode.getTrail(ResolutionNode.java:136)
  • [MNG-3099] - Profiles ignored when working with non-projects (such as archetype:create)
  • [MNG-3111] - Classpath order incorrect
  • [MNG-3156] - NullPointerException with mvn dependency:sources
  • [MNG-3221] - Infinite loop in DefaultLifecycleExecutor
  • [MNG-3259] - Regression: Maven drops dependencies in multi-module build
  • [MNG-3286] - execution.inherited field is ignored
  • [MNG-3288] - Invalid systemPath allows build to continue--failing in later phase.
  • [MNG-3296] - mvn.bat looses error code on windows NT type platforms
  • [MNG-3310] - JAVACMD set incorrectly when JAVA_HOME is not set
  • [MNG-3316] - Barfs at attribues named .*encoding
  • [MNG-3354] - mvn.bat incorrectly detects OS on Windows NT or XP with Novell login
  • [MNG-3355] - CLONE -$pom.build.sourceDirectory and $pom.build.testSourceDirectory no longer recognized
  • [MNG-3365] - Remove trailing-backslashes from M2_HOME in mvn.bat
  • [MNG-3394] - Plugin versions inherited via pluginManagement cannot be overriden by build.plugins sect ion of sub modules
  • [MNG-3396] - Managed versions dont affect over constrained ranges
  • [MNG-3400] - MavenProject is not extensible
  • [MNG-3405] - "Checking for updates from repository" logging should not display if WagonManager is offline
  • [MNG-3410] - Managed versions in plugins are not considered when using them
  • [MNG-3415] - Transfer errors cause junk metadata in the local repo
  • [MNG-3426] - regression : dependency in plugin configuration doesn't override plugin classpath
  • [MNG-3430] - Toolchain doesn't match Toolchain extensions
  • [MNG-3431] - Pom Extensions not supported for Toolchains
  • [MNG-3439] - incorrect child dependency selected when parent is not selected
  • [MNG-3441] - Maven should always retrieve metadata to be updated from the deployment repository
  • [MNG-3460] - org.apache.maven.profiles.DefaultProfileManagerTest fails if you use a different local repo
  • [MNG-3464] - maven-toolchains missing from final binary.. need to update the assembly
  • [MNG-3473] - site generation with 2.0.9 and plugin:report (2.4 ONLY) is broken
  • [MNG-3484] - INT_MAVEN_OPTS are not quoted in mvnDebug which causes issues on some shells
  • [MNG-3485] - unable to override wagons that are bundled with a different version via extensions
  • [MNG-3494] - local pom dependencies should get injected before inherited dependencies
  • [MNG-3495] - NPE at org.apache.maven.wagon.repository.Repository.hashCode(Repository.java:241)

Improvement

  • [MNG-428] - Japanese message resource
  • [MNG-2881] - Improve logging when downloading snapshots in offline mode
  • [MNG-3279] - Support Exception Chaining for MojoFailureException
  • [MNG-3318] - ActiveProjectArtifact should have appropriate equals and hashCode methods
  • [MNG-3331] - Normalize paths to sub modules
  • [MNG-3388] - DefaultPluginManager needs to catch LinkageError
  • [MNG-3395] - Default core plugin versions in the superpom.
  • [MNG-3442] - Add explicit resource bundle for English
  • [MNG-3461] - Enhance Mirror definition syntax
  • [MNG-3467] - PatternSet needs a toString() method to properly print in debug mode
  • [MNG-3468] - FileSet needs a toString() method to properly print in debug mode
  • [MNG-3469] - Resource needs a toString() method to properly print in debug mode

New Feature

  • [MNG-2664] - Add native support for webdav
  • [MNG-3220] - Allow managed dependencies to be imported into other projects

Task

  • [MNG-2883] - Make sure that the network isn't used for snapshots in offline mode when legacy repositories are used

Wish

  • [MNG-1491] - Reactor should print out a message if it detects a collision of artifact ids