[maven] 01/16: Imported Upstream version 3.1.1

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Jul 8 00:09:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository maven.

commit 57de30f0222dcb811e7b2d0fa1486524d74c4a65
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Feb 14 10:44:08 2014 +0100

    Imported Upstream version 3.1.1
---
 .gitattributes                                     |  10 +-
 .gitignore                                         |   4 +-
 apache-maven/LICENSE.txt => LICENSE                |   0
 NOTICE                                             |   7 +
 README.bootstrap.txt                               |   4 +-
 apache-maven/NOTICE.txt                            |  23 --
 apache-maven/README.txt                            |  14 +-
 apache-maven/pom.xml                               |  53 ++-
 apache-maven/src/bin/m2.conf                       |   1 +
 apache-maven/src/bin/mvn                           |  30 +-
 apache-maven/src/bin/mvn.bat                       |   2 +-
 apache-maven/src/bin/mvnDebug                      |  30 +-
 apache-maven/src/bin/mvnDebug.bat                  |   4 +-
 apache-maven/src/bin/mvnyjp                        |  34 +-
 .../src/conf/logging/simplelogger.properties       |  25 ++
 apache-maven/src/conf/settings.xml                 |   2 +-
 .../main/appended-resources/META-INF/LICENSE.vm    |  49 +++
 apache-maven/src/main/assembly/bin.xml             |  40 +-
 apache-maven/src/main/assembly/src.xml             |  11 +-
 build.xml                                          |   6 +-
 doap_Maven.rdf                                     |  11 +
 maven-aether-provider/pom.xml                      |  55 ++-
 .../internal/ArtifactDescriptorUtils.java          |  18 +-
 .../internal/DefaultArtifactDescriptorReader.java  | 170 +++++---
 .../repository/internal/DefaultModelCache.java     |   4 +-
 .../repository/internal/DefaultModelResolver.java  |  20 +-
 .../repository/internal/DefaultServiceLocator.java |  52 ---
 .../internal/DefaultVersionRangeResolver.java      | 106 +++--
 .../internal/DefaultVersionResolver.java           | 108 +++--
 .../repository/internal/LocalSnapshotMetadata.java |   4 +-
 .../internal/LocalSnapshotMetadataGenerator.java   |  14 +-
 .../repository/internal/MavenAetherModule.java     |  74 ++++
 .../maven/repository/internal/MavenMetadata.java   |  37 +-
 .../internal/MavenRepositorySystemSession.java     | 106 -----
 .../internal/MavenRepositorySystemUtils.java       | 136 +++++++
 .../repository/internal/MavenServiceLocator.java   |  52 ---
 .../repository/internal/MavenSnapshotMetadata.java | 100 +++++
 .../repository/internal/RelocatedArtifact.java     |  14 +-
 .../internal/RemoteSnapshotMetadata.java           |  74 +---
 .../internal/RemoteSnapshotMetadataGenerator.java  |  14 +-
 .../internal/SnapshotMetadataGeneratorFactory.java |  12 +-
 .../repository/internal/VersionsMetadata.java      |  17 +-
 .../internal/VersionsMetadataGenerator.java        |  12 +-
 .../internal/VersionsMetadataGeneratorFactory.java |  12 +-
 .../maven/repository/internal/package-info.java    |  14 +-
 .../apache/maven/repository/internal/package.html  |   3 -
 maven-aether-provider/src/site/apt/index.apt       |  33 ++
 .../internal/AbstractRepositoryTestCase.java       |  85 ++++
 .../DefaultArtifactDescriptorReaderTest.java       |  77 ++++
 .../internal/DefaultVersionResolverTest.java       |  96 +++++
 ...st.java => MavenRepositorySystemUtilsTest.java} |  12 +-
 .../repository/internal/RepositorySystemTest.java  | 220 +++++++++++
 .../internal/util/ConsoleRepositoryListener.java   | 132 +++++++
 .../internal/util/ConsoleTransferListener.java     | 186 +++++++++
 .../07.20.3-SNAPSHOT/maven-metadata.xml            |  49 +++
 .../dep-mng5459/0.4.0-SNAPSHOT/maven-metadata.xml  |  47 +++
 .../artifact/1.0/artifact-1.0-classifier.zip       |   0
 .../repo/ut/simple/artifact/1.0/artifact-1.0.pom   |  48 +++
 .../repo/ut/simple/artifact/1.0/artifact-1.0.zip   |   0
 .../repo/ut/simple/artifact/maven-metadata.xml     |  34 ++
 .../ut/simple/dependency/1.0/dependency-1.0.pom    |  31 ++
 .../repo/ut/simple/dependency/maven-metadata.xml   |  34 ++
 .../repo/ut/simple/parent/1.0/parent-1.0.pom       |  43 ++
 .../repo/ut/simple/parent/maven-metadata.xml       |  34 ++
 maven-artifact/pom.xml                             |   8 +-
 .../java/org/apache/maven/artifact/Artifact.java   |   4 +
 .../artifact/repository/ArtifactRepository.java    |  34 +-
 .../repository/ArtifactRepositoryPolicy.java       |   1 -
 .../artifact/versioning/ComparableVersion.java     |  20 +-
 .../versioning/DefaultArtifactVersion.java         |   6 +-
 .../maven/artifact/versioning/Restriction.java     |   6 +-
 maven-artifact/src/site/apt/index.apt              |  35 ++
 .../artifact/versioning/VersionRangeTest.java      | 103 ++---
 maven-compat/compatibility.cfl                     |  79 ----
 maven-compat/pom.xml                               |  16 +-
 .../apache/maven/artifact/ArtifactScopeEnum.java   |   2 +-
 .../artifact/deployer/DefaultArtifactDeployer.java |  30 +-
 .../installer/DefaultArtifactInstaller.java        |  18 +-
 .../DefaultArtifactRepositoryFactory.java          |   2 +-
 .../metadata/DefaultRepositoryMetadataManager.java | 108 +++--
 .../repository/metadata/MetadataBridge.java        |  21 +-
 .../maven/artifact/resolver/ArtifactResolver.java  |   6 +-
 .../artifact/resolver/DefaultArtifactResolver.java | 124 +++---
 .../maven/profiles/DefaultProfileManager.java      |  24 +-
 .../maven/profiles/ProfilesConversionUtils.java    |  13 +-
 .../activation/SystemPropertyProfileActivator.java |   2 +-
 .../apache/maven/project/MavenProjectBuilder.java  |   3 +
 .../java/org/apache/maven/project/ModelUtils.java  | 100 ++---
 .../maven/project/ProjectBuilderConfiguration.java |   3 +
 .../org/apache/maven/project/ProjectUtils.java     |   2 +-
 .../DefaultModelInheritanceAssembler.java          |  15 +-
 .../AbstractStringBasedModelInterpolator.java      |  12 +-
 .../StringSearchModelInterpolator.java             |  53 +--
 .../maven/project/path/DefaultPathTranslator.java  |   4 +-
 .../project/validation/DefaultModelValidator.java  |  11 +-
 .../project/validation/ModelValidationResult.java  |   2 +-
 .../apache/maven/repository/MetadataGraphNode.java |   6 +-
 .../repository/legacy/DefaultWagonManager.java     |  34 +-
 .../repository/legacy/LegacyRepositorySystem.java  |  38 +-
 .../repository/legacy/TransferListenerAdapter.java |   6 +-
 .../DefaultArtifactRepositoryFactory.java          |   2 +-
 .../resolver/DefaultLegacyArtifactCollector.java   |  10 +-
 .../resolver/transform/ArtifactTransformation.java |  11 +-
 .../transform/ArtifactTransformationManager.java   |   1 -
 .../repository/metadata/ArtifactMetadata.java      |  16 +-
 .../maven/repository/metadata/MetadataGraph.java   |   2 +-
 .../repository/metadata/MetadataGraphEdge.java     |  10 +-
 .../repository/metadata/MetadataResolution.java    |   2 +-
 .../metadata/MetadataResolutionResult.java         |   4 +-
 .../usability/plugin/ExpressionDocumenter.java     |  24 +-
 .../src/main/resources/META-INF/maven/plugin.xml   |  21 +
 .../AbstractArtifactComponentTestCase.java         |  63 +--
 .../resolver/DefaultArtifactResolverTest.java      |   2 +-
 .../maven/artifact/testutils/MockManager.java      |  12 +-
 .../transform/TransformationManagerTest.java       |  17 +-
 .../project/AbstractMavenProjectTestCase.java      |  15 +-
 .../maven/project/ClasspathArtifactResolver.java   |  14 +-
 .../project/LegacyLocalRepositoryManager.java      | 147 ++++++-
 .../org/apache/maven/project/ModelUtilsTest.java   |   6 +-
 .../apache/maven/project/ProjectClasspathTest.java |   7 +-
 .../apache/maven/project/TestArtifactResolver.java |  15 +
 .../maven/project/TestMavenRepositorySystem.java   |  15 +
 .../apache/maven/project/TestProjectBuilder.java   |  18 +-
 .../inheritance/t00/ProjectInheritanceTest.java    |   2 +-
 .../inheritance/t02/ProjectInheritanceTest.java    |  12 +-
 .../inheritance/t04/ProjectInheritanceTest.java    |  12 +-
 .../inheritance/t05/ProjectInheritanceTest.java    |  13 +-
 .../inheritance/t07/ProjectInheritanceTest.java    |  15 +-
 .../repository/LegacyRepositorySystemTest.java     |  18 +-
 .../legacy/LegacyRepositorySystemTest.java         |   8 +
 .../resolver/DefaultArtifactCollectorTest.java     |  18 +-
 .../DefaultClasspathTransformationTest.java        |  15 +
 .../DefaultGraphConflictResolutionPolicyTest.java  |  15 +
 .../metadata/DefaultGraphConflictResolverTest.java |  15 +
 .../artifact/resolver/ArtifactResolverTest.xml     |   2 +-
 maven-core/pom.xml                                 |  63 ++-
 .../apache/maven/DefaultArtifactFilterManager.java |  11 +-
 .../main/java/org/apache/maven/DefaultMaven.java   | 189 ++++-----
 .../maven/DefaultProjectDependenciesResolver.java  |   6 +-
 .../apache/maven/LoggingRepositoryListener.java    |   6 +-
 .../apache/maven/ProjectBuildFailureException.java |  22 +-
 .../apache/maven/ProjectDependenciesResolver.java  |   1 -
 .../main/java/org/apache/maven/ReactorReader.java  | 200 +++++-----
 .../java/org/apache/maven/RepositoryUtils.java     |  64 +--
 .../ArtifactMetadataRetrievalException.java        |  23 ++
 .../repository/LegacyLocalRepositoryManager.java   |  38 +-
 .../repository/MavenArtifactRepository.java        |   3 +-
 .../maven/artifact/repository/RepositoryCache.java |   4 +
 .../repository/metadata/io/MetadataReader.java     |   2 +-
 .../resolver/ArtifactResolutionRequest.java        |  24 +-
 .../resolver/filter/ExclusionSetFilter.java        |   6 +-
 .../classrealm/ArtifactClassRealmConstituent.java  |   2 +-
 .../apache/maven/classrealm/ClassRealmManager.java |   4 +-
 .../maven/classrealm/DefaultClassRealmManager.java |  60 ++-
 .../configuration/BeanConfigurationRequest.java    |   2 +-
 .../apache/maven/eventspy/AbstractEventSpy.java    |   1 +
 .../java/org/apache/maven/eventspy/EventSpy.java   |   7 +-
 .../eventspy/internal/EventSpyDispatcher.java      |   3 +-
 .../internal/EventSpyExecutionListener.java        |   1 +
 .../internal/EventSpyRepositoryListener.java       |   7 +-
 .../maven/exception/DefaultExceptionHandler.java   |  31 +-
 .../apache/maven/exception/ExceptionHandler.java   |   5 +
 .../apache/maven/exception/ExceptionSummary.java   |  17 +-
 .../execution/DefaultMavenExecutionRequest.java    |  20 +-
 .../execution/DefaultMavenExecutionResult.java     |   3 +-
 .../maven/execution/MavenExecutionRequest.java     |  46 ++-
 .../org/apache/maven/execution/MavenSession.java   |  23 +-
 .../org/apache/maven/execution/ReactorManager.java |   8 +-
 .../apache/maven/lifecycle/MavenExecutionPlan.java |  26 +-
 .../maven/lifecycle/internal/BuilderCommon.java    |  35 +-
 .../lifecycle/internal/CurrentPhaseForThread.java  |   7 +-
 .../DefaultLifecycleExecutionPlanCalculator.java   |  40 +-
 .../internal/DefaultLifecyclePluginAnalyzer.java   |   4 +-
 .../lifecycle/internal/DependencyContext.java      |   9 +-
 .../lifecycle/internal/ExecutionPlanItem.java      |   4 +-
 .../lifecycle/internal/LifecycleDebugLogger.java   |   1 -
 .../internal/LifecycleDependencyResolver.java      |  52 ++-
 .../lifecycle/internal/LifecycleModuleBuilder.java |   6 +-
 .../internal/LifecyclePluginResolver.java          |   1 -
 .../internal/LifecycleThreadedBuilder.java         |  22 +-
 .../lifecycle/internal/LifecycleWeaveBuilder.java  |  19 +-
 .../lifecycle/internal/MojoDescriptorCreator.java  |   2 -
 .../maven/lifecycle/internal/MojoExecutor.java     |   1 -
 .../internal/ThreadConfigurationService.java       |   1 -
 .../lifecycle/internal/ThreadLockedArtifact.java   |  10 +-
 .../plugin/DefaultLifecycleBindingsInjector.java   |  18 +-
 .../apache/maven/plugin/BuildPluginManager.java    |  32 +-
 .../java/org/apache/maven/plugin/CacheUtils.java   |  10 +-
 .../maven/plugin/DefaultBuildPluginManager.java    |  37 +-
 .../maven/plugin/DefaultExtensionRealmCache.java   |   2 +-
 .../maven/plugin/DefaultPluginArtifactsCache.java  |  12 +-
 .../maven/plugin/DefaultPluginDescriptorCache.java |  10 +-
 .../maven/plugin/DefaultPluginRealmCache.java      |  31 +-
 .../apache/maven/plugin/ExtensionRealmCache.java   |   2 +-
 .../org/apache/maven/plugin/LegacySupport.java     |   2 +-
 .../apache/maven/plugin/MavenPluginManager.java    |   6 +-
 .../apache/maven/plugin/PluginArtifactsCache.java  |   8 +-
 .../apache/maven/plugin/PluginDescriptorCache.java |   4 +-
 .../maven/plugin/PluginParameterException.java     |  67 +++-
 .../plugin/PluginParameterExpressionEvaluator.java |  29 +-
 .../org/apache/maven/plugin/PluginRealmCache.java  |   6 +-
 .../plugin/internal/DefaultLegacySupport.java      |  26 +-
 .../plugin/internal/DefaultMavenPluginManager.java |  23 +-
 .../DefaultPluginDependenciesResolver.java         |  91 ++---
 .../plugin/internal/DefaultPluginManager.java      |   1 -
 .../maven/plugin/internal/PlexusUtilsInjector.java |  18 +-
 .../internal/PluginDependenciesResolver.java       |  12 +-
 .../maven/plugin/internal/WagonExcluder.java       |   8 +-
 .../plugin/prefix/DefaultPluginPrefixRequest.java  |   4 +-
 .../prefix/NoPluginFoundForPrefixException.java    |   4 +-
 .../maven/plugin/prefix/PluginPrefixRequest.java   |   4 +-
 .../maven/plugin/prefix/PluginPrefixResult.java    |   6 +-
 .../internal/DefaultPluginPrefixResolver.java      |  42 +-
 .../prefix/internal/DefaultPluginPrefixResult.java |   2 +-
 .../version/DefaultPluginVersionRequest.java       |   6 +-
 .../maven/plugin/version/PluginVersionRequest.java |   4 +-
 .../version/PluginVersionResolutionException.java  |   4 +-
 .../maven/plugin/version/PluginVersionResult.java  |   2 +-
 .../internal/DefaultPluginVersionResolver.java     |  45 ++-
 .../internal/DefaultPluginVersionResult.java       |   2 +-
 .../DefaultDependencyResolutionRequest.java        |   4 +-
 .../project/DefaultDependencyResolutionResult.java |   4 +-
 .../maven/project/DefaultMavenProjectHelper.java   |  29 +-
 .../project/DefaultModelBuildingListener.java      |  18 +-
 .../maven/project/DefaultProjectBuilder.java       |  78 ++--
 .../project/DefaultProjectBuildingHelper.java      |  12 +-
 .../project/DefaultProjectBuildingRequest.java     |   2 +-
 .../DefaultProjectDependenciesResolver.java        |  71 ++--
 .../maven/project/DefaultProjectRealmCache.java    |   2 +-
 .../maven/project/DependencyResolutionRequest.java |   6 +-
 .../maven/project/DependencyResolutionResult.java  |   4 +-
 .../org/apache/maven/project/MavenProject.java     | 153 +++++---
 .../apache/maven/project/MavenProjectHelper.java   |  40 +-
 .../org/apache/maven/project/ProjectBuilder.java   |   3 +
 .../maven/project/ProjectBuildingRequest.java      |  10 +-
 .../apache/maven/project/ProjectModelResolver.java |  18 +-
 .../apache/maven/project/ProjectRealmCache.java    |   2 +-
 .../maven/project/artifact/AttachedArtifact.java   |   9 +-
 .../project/artifact/MavenMetadataSource.java      |  23 +-
 .../apache/maven/repository/RepositorySystem.java  |  15 +-
 .../legacy/metadata/ArtifactMetadataSource.java    |   2 +-
 .../rtinfo/internal/DefaultRuntimeInformation.java |  12 +-
 .../org/apache/maven/settings/SettingsUtils.java   |   2 +-
 .../apache/maven/toolchain/DefaultToolchain.java   |  10 +-
 .../apache/maven/toolchain/ToolchainPrivate.java   |   4 +-
 .../java/DefaultJavaToolchainFactory.java          |  15 +-
 .../META-INF/plexus/artifact-handlers.xml          | 345 +---------------
 .../main/resources/META-INF/plexus/components.xml  |  10 +-
 ...{artifact-handlers.xml => default-bindings.xml} | 267 +++----------
 .../org/apache/maven/messages/build.properties     |  17 +
 maven-core/src/site/apt/artifact-handlers.apt      |  59 +++
 .../src/site/apt/configuration-management.apt      |  17 +
 maven-core/src/site/apt/default-bindings.apt.vm    |  63 +--
 .../apt/getting-to-container-configured-mojos.apt  |  17 +
 maven-core/src/site/apt/index.apt                  |  61 +++
 maven-core/src/site/apt/inheritance.apt            |  17 +
 maven-core/src/site/apt/lifecycles.apt.vm          |  37 +-
 maven-core/src/site/apt/offline-mode.apt           |  17 +
 .../src/site/apt/plugin-execution-isolation.apt    |  17 +
 .../apt/scripting-support/marmalade-support.apt    |  17 +
 maven-core/src/site/site.xml                       |   3 +-
 .../maven/AbstractCoreMavenComponentTestCase.java  |  21 +-
 .../maven/MavenLifecycleParticipantTest.java       |   5 +-
 .../src/test/java/org/apache/maven/MavenTest.java  |  19 +-
 .../maven/ProjectDependenciesResolverTest.java     |  17 +-
 .../artifact/handler/ArtifactHandlerTest.java      |  89 +++++
 .../exception/DefaultExceptionHandlerTest.java     |  60 +++
 .../lifecycle/MojoExecutionXPathContainer.java     |   3 -
 .../internal/BuildListCalculatorTest.java          |   4 +-
 .../lifecycle/internal/BuilderCommonTest.java      |   4 +-
 .../internal/ConcurrencyDependencyGraphTest.java   |   3 +-
 .../internal/ConcurrentBuildLoggerTest.java        |   3 +-
 .../lifecycle/internal/ExecutionPlanItemTest.java  |   3 +-
 .../LifecycleExecutionPlanCalculatorTest.java      |   6 +-
 .../internal/LifecycleWeaveBuilderTest.java        |   7 +-
 .../lifecycle/internal/PhaseRecorderTest.java      |   2 +
 .../lifecycle/internal/ProjectBuildListTest.java   |   3 +-
 .../lifecycle/internal/ThreadOutputMuxerTest.java  |   4 +-
 .../lifecycle/internal/stub/AboutTheStubs.html     |  19 +
 .../internal/stub/BuildPluginManagerStub.java      |   4 +-
 .../internal/stub/DefaultLifecyclesStub.java       |   1 +
 .../internal/stub/PluginPrefixResolverStub.java    |   2 +-
 .../internal/stub/PluginVersionResolverStub.java   |   2 +-
 .../stub/ProjectDependenciesResolverStub.java      |   6 +-
 .../org/apache/maven/plugin/PluginManagerTest.java |   4 +
 .../maven/plugin/PluginParameterExceptionTest.java | 164 ++++++++
 .../PluginParameterExpressionEvaluatorTest.java    |  20 +-
 .../plugin/internal/DefaultLegacySupportTest.java  |  74 ++++
 .../project/AbstractMavenProjectTestCase.java      |  15 +-
 .../project/DefaultMavenProjectBuilderTest.java    |   4 +-
 .../project/LegacyLocalRepositoryManager.java      | 147 ++++++-
 .../org/apache/maven/project/MavenProjectTest.java |  30 +-
 .../apache/maven/project/PomConstructionTest.java  |  49 ++-
 .../apache/maven/project/ProjectBuilderTest.java   |  19 +-
 .../apache/maven/project/TestMetadataSource.java   |   4 +-
 .../artifact/DefaultMavenMetadataCacheTest.java    |   2 +
 .../canonical/CanonicalProjectBuilderTest.java     |  13 +-
 .../maven/project/harness/Xpp3DomNodePointer.java  |   4 +-
 .../maven/repository/TestRepositoryConnector.java  |  18 +-
 .../repository/TestRepositoryConnectorFactory.java |  12 +-
 .../maven/repository/TestRepositorySystem.java     |   2 +-
 .../settings/PomConstructionWithSettingsTest.java  |  22 +-
 .../apache/maven/settings/SettingsUtilsTest.java   |  82 +++-
 .../reporting-plugin-config/sub/pom.xml            |   5 +-
 .../projects/modelsource/module01/pom.xml          |  12 +
 .../test/resources/projects/modelsource/pom.xml    |  13 +
 maven-embedder/pom.xml                             |  44 ++-
 .../main/java/org/apache/maven/embedder/App.java   |  15 +
 .../java/org/apache/maven/embedder/AppTest.java    |  15 +
 .../main/java/org/apache/maven/cli/CLIManager.java |  13 +-
 .../org/apache/maven/cli/CLIReportingUtils.java    | 111 +-----
 .../main/java/org/apache/maven/cli/MavenCli.java   | 328 +++++++++-------
 .../org/apache/maven/cli/MavenLoggerManager.java   | 162 --------
 .../org/apache/maven/cli/PrintStreamLogger.java    | 187 ---------
 .../cli/{ => event}/DefaultEventSpyContext.java    |   2 +-
 .../cli/{ => event}/ExecutionEventLogger.java      |  13 +-
 .../maven/cli/logging/BaseSlf4jConfiguration.java  |  29 +-
 .../maven/cli/logging/Slf4jConfiguration.java      |  35 +-
 .../cli/logging/Slf4jConfigurationFactory.java     |  83 ++++
 .../org/apache/maven/cli/logging/Slf4jLogger.java  | 145 +++++++
 .../maven/cli/logging/Slf4jLoggerManager.java      | 110 ++++++
 .../maven/cli/logging/Slf4jStdoutLogger.java       | 306 +++++++++++++++
 .../cli/logging/impl/Log4j2Configuration.java      |  43 +-
 .../cli/logging/impl/LogbackConfiguration.java     |  61 +++
 .../cli/logging/impl/Slf4jSimpleConfiguration.java |  63 +++
 .../AbstractMavenTransferListener.java             |  12 +-
 .../BatchModeMavenTransferListener.java            |   2 +-
 .../ConsoleMavenTransferListener.java              |  14 +-
 .../{ => transfer}/QuietMavenTransferListener.java |   4 +-
 .../Slf4jMavenTransferListener.java}               |  34 +-
 .../MavenSlf4jFriend.java}                         |  25 +-
 .../org/slf4j/impl/MavenSlf4jSimpleFriend.java     |  32 +-
 .../META-INF/maven/slf4j-configuration.properties  |  22 ++
 maven-embedder/src/site/apt/cli.apt.vm             |  28 ++
 maven-embedder/src/site/apt/index.apt.vm           |  34 ++
 maven-embedder/src/site/apt/logging.apt            | 112 ++++++
 maven-embedder/src/site/site.xml                   |   4 +
 .../java/org/apache/maven/cli/CLIManagerTest.java  | 108 +++++
 .../maven/cli/event/ExecutionEventLoggerTest.java  |  61 +++
 maven-model-builder/pom.xml                        |  12 +-
 .../maven/model/building/DefaultModelBuilder.java  | 168 +++++---
 .../building/DefaultModelBuildingRequest.java      |   6 +-
 .../maven/model/building/DefaultModelProblem.java  |  19 +-
 .../building/DefaultModelProblemCollector.java     |  26 +-
 .../maven/model/building/FileModelSource.java      |  30 +-
 .../apache/maven/model/building/ModelCacheTag.java |   6 +-
 .../org/apache/maven/model/building/ModelData.java |  12 +-
 .../apache/maven/model/building/ModelProblem.java  |  17 +-
 .../model/building/ModelProblemCollector.java      |   9 +-
 .../model/building/ModelProblemCollectorExt.java   |  31 +-
 .../building/ModelProblemCollectorRequest.java     | 101 +++++
 .../apache/maven/model/building/ModelSource.java   |   4 +
 .../apache/maven/model/building/ModelSource2.java  |  56 +++
 .../inheritance/DefaultInheritanceAssembler.java   |  19 +-
 .../AbstractStringBasedModelInterpolator.java      |   9 +-
 .../interpolation/ProblemDetectingValueSource.java |   4 +-
 .../StringSearchModelInterpolator.java             | 435 +++++++++++++--------
 .../DefaultDependencyManagementInjector.java       |   2 +-
 .../DefaultPluginManagementInjector.java           |   3 +-
 .../apache/maven/model/merge/MavenModelMerger.java |  75 +++-
 .../normalization/DefaultModelNormalizer.java      |   2 +-
 .../model/plugin/DefaultReportingConverter.java    |  10 +-
 .../profile/DefaultProfileActivationContext.java   |  57 ++-
 .../model/profile/DefaultProfileInjector.java      |   2 +-
 .../model/profile/DefaultProfileSelector.java      |   8 +-
 .../model/profile/ProfileActivationContext.java    |   7 +
 .../profile/activation/FileProfileActivator.java   |  13 +-
 .../activation/JdkVersionProfileActivator.java     |  62 +--
 .../OperatingSystemProfileActivator.java           |  91 ++---
 .../activation/PropertyProfileActivator.java       | 116 +++---
 .../model/validation/DefaultModelValidator.java    | 244 ++++++------
 .../resources/org/apache/maven/model/pom-4.0.0.xml |   6 +-
 maven-model-builder/src/site/apt/index.apt         |  74 +++-
 maven-model-builder/src/site/apt/super-pom.apt.vm  |  17 +
 .../building/DefaultModelBuilderFactoryTest.java   |   5 +
 .../model/building/SimpleProblemCollector.java     |  30 +-
 .../validation/DefaultModelValidatorTest.java      |  39 +-
 .../src/test/resources/poms/factory/simple.xml     |   4 +-
 .../poms/validation/missing-report-version-pom.xml |  57 +++
 maven-model/pom.xml                                |   8 +-
 .../apache/maven/model/io/xpp3/package-info.java   |  37 +-
 .../org/apache/maven/model/io/xpp3/package.html    |   9 -
 .../org/apache/maven/model/merge/ModelMerger.java  |  71 ++--
 .../org/apache/maven/model/merge/package-info.java |  12 +-
 .../java/org/apache/maven/model/merge/package.html |   3 -
 .../java/org/apache/maven/model/package-info.java  |  15 +-
 .../main/java/org/apache/maven/model/package.html  |   4 -
 maven-model/src/main/mdo/maven.mdo                 | 382 +++++++++---------
 maven-model/src/site/apt/index.apt                 |  17 +
 maven-plugin-api/pom.xml                           |  22 +-
 .../maven/plugin/descriptor/MojoDescriptor.java    |  62 ++-
 .../maven/plugin/descriptor/PluginDescriptor.java  |   6 +
 maven-plugin-api/src/main/mdo/plugin.mdo           |  40 +-
 maven-plugin-api/src/site/apt/index.apt            |  27 +-
 maven-plugin-api/src/test/resources/plugin.xml     |  20 +
 maven-repository-metadata/pom.xml                  |   8 +-
 .../src/main/mdo/metadata.mdo                      |  40 +-
 maven-repository-metadata/src/site/apt/index.apt   |  35 ++
 maven-settings-builder/pom.xml                     |   8 +-
 .../maven/settings/building/SettingsProblem.java   |   2 +-
 maven-settings/pom.xml                             |   8 +-
 maven-settings/src/main/mdo/settings.mdo           |   5 +-
 maven-settings/src/site/apt/index.apt              |  17 +
 pom.xml                                            | 279 ++++++-------
 src/site/resources/images/maven-deps.png           | Bin 57486 -> 58951 bytes
 src/site/site.xml                                  |  10 +-
 src/site/xdoc/index.xml                            |   9 +-
 407 files changed, 9112 insertions(+), 4704 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index 225f8f1..3bb3b5e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,8 @@
-*.jar              -text -crlf
-*.graffle          -text -crlf
+# Auto detect text files and perform LF normalization
+*        text=auto
+
+*.java   text diff=java
+*.html   text diff=html
+*.css    text
+*.js     text
+*.sql    text
diff --git a/.gitignore b/.gitignore
index adc6c00..f8ca4f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,5 +8,7 @@ bin/
 *.ipr
 *.iml
 .idea
-
+out/
 .DS_Store
+/bootstrap
+/dependencies.xml
diff --git a/apache-maven/LICENSE.txt b/LICENSE
similarity index 100%
rename from apache-maven/LICENSE.txt
rename to LICENSE
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..bb189f8
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,7 @@
+Apache Maven
+Copyright 2001-2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
diff --git a/README.bootstrap.txt b/README.bootstrap.txt
index 76a42a0..f3a0449 100644
--- a/README.bootstrap.txt
+++ b/README.bootstrap.txt
@@ -4,7 +4,7 @@ BOOTSTRAPPING BASICS
 You'll need:
 
 - Java 1.5
-- Ant 1.6.5 or later
+- Ant 1.8 or later
 
 First, give Ant a location into which the completed Maven distro should be installed:
 
@@ -16,4 +16,4 @@ Then, run Ant:
 
 Once the build completes, you should have a new Maven distro ready to roll in your $M2_HOME directory!
 
-Enjoy.
\ No newline at end of file
+Enjoy.
diff --git a/apache-maven/NOTICE.txt b/apache-maven/NOTICE.txt
deleted file mode 100644
index 62abffb..0000000
--- a/apache-maven/NOTICE.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-   =========================================================================
-   ==  NOTICE file corresponding to the section 4 d of                    ==
-   ==  the Apache License, Version 2.0,                                   ==
-   ==  in this case for the Apache Maven distribution.                    ==
-   =========================================================================
-
-Apache Maven
-Copyright 2001-2011 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes software (Plexus and Classworlds) developed by
-The Codehaus Foundation (http://www.codehaus.org/).
-
-This product includes software (Aether, Sisu, Spice, Plexus Ciper and Sec Dispatcher) developed by
-Sonatype Inc. (http://www.sonatype.org/).
-
-This product includes software (NekoHTML) developed by
-SourceForge (http://www.sourceforge.net/).
-
-This product includes software (Guice) developed by
-Google Code (http://code.google.com/).
diff --git a/apache-maven/README.txt b/apache-maven/README.txt
index c337ce8..dc55c01 100644
--- a/apache-maven/README.txt
+++ b/apache-maven/README.txt
@@ -40,18 +40,18 @@
   1) Unpack the archive where you would like to store the binaries, eg:
 
     Unix-based Operating Systems (Linux, Solaris and Mac OS X)
-      tar zxvf apache-maven-3.0.x.tar.gz
+      tar zxvf apache-maven-3.x.y.tar.gz
     Windows 2000/XP
-      unzip apache-maven-3.0.x.zip
+      unzip apache-maven-3.x.y.zip
 
-  2) A directory called "apache-maven-3.0.x" will be created.
+  2) A directory called "apache-maven-3.x.y" will be created.
 
   3) Add the bin directory to your PATH, eg:
 
     Unix-based Operating Systems (Linux, Solaris and Mac OS X)
-      export PATH=/usr/local/apache-maven-3.0.x/bin:$PATH
+      export PATH=/usr/local/apache-maven-3.x.y/bin:$PATH
     Windows 2000/XP
-      set PATH="c:\program files\apache-maven-3.0.x\bin";%PATH%
+      set PATH="c:\program files\apache-maven-3.x.y\bin";%PATH%
 
   4) Make sure JAVA_HOME is set to the location of your JDK
 
@@ -71,7 +71,7 @@
   Downloads:          http://maven.apache.org/download.html
   Release Notes:      http://maven.apache.org/release-notes.html
   Mailing Lists:      http://maven.apache.org/mail-lists.html
-  Source Code:        http://svn.apache.org/repos/asf/maven/
+  Source Code:        https://git-wip-us.apache.org/repos/asf/maven.git/apache-maven
   Issue Tracking:     http://jira.codehaus.org/browse/MNG
-  Wiki:               http://docs.codehaus.org/display/MAVENUSER/
+  Wiki:               https://cwiki.apache.org/confluence/display/MAVEN/
   Available Plugins:  http://maven.apache.org/plugins/index.html
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index b002e3f..4a53643 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -21,19 +21,25 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>apache-maven</artifactId>
   <packaging>pom</packaging>
 
-  <name>Maven Distribution</name>
-  <description>Module to build the Maven distribution, source and binary, in zip and tar.gz formats.</description>
+  <name>Apache Maven Distribution</name>
+  <description>The Apache Maven distribution, source and binary, in zip and tar.gz formats.</description>
 
   <properties>
     <distributionFileName>${distributionId}-${project.version}</distributionFileName>
   </properties>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -48,8 +54,8 @@
       <artifactId>maven-compat</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-inject-plexus</artifactId>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
     <!-- CLI -->
     <dependency>
@@ -80,13 +86,35 @@
       <artifactId>wagon-file</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-connector-wagon</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+    </dependency>
   </dependencies>
 
   <build>
     <finalName>${distributionFileName}</finalName>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-remote-resources-plugin</artifactId>
+          <version>1.5</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <excludes combine.children="append">
+              <exclude>src/bin/m2.conf</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -141,6 +169,19 @@
     </plugins>
   </build>
 
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <url>http://repository.apache.org/snapshots/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </pluginRepository>
+  </pluginRepositories>
+
   <profiles>
     <profile>
       <id>apache-release</id>
diff --git a/apache-maven/src/bin/m2.conf b/apache-maven/src/bin/m2.conf
index bb04a3c..2991e0b 100644
--- a/apache-maven/src/bin/m2.conf
+++ b/apache-maven/src/bin/m2.conf
@@ -5,3 +5,4 @@ set maven.home default ${user.home}/m2
 [plexus.core]
 optionally ${maven.home}/lib/ext/*.jar
 load       ${maven.home}/lib/*.jar
+load       ${maven.home}/conf/logging
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 4a336c9..f535d38 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -30,7 +30,7 @@
 #   M2_HOME - location of maven2's installed home dir
 #   MAVEN_OPTS - parameters passed to the Java VM when running Maven
 #     e.g. to debug Maven itself, use
-#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 #   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
 # ----------------------------------------------------------------------------
 
@@ -53,13 +53,31 @@ mingw=false
 case "`uname`" in
   CYGWIN*) cygwin=true ;;
   MINGW*) mingw=true;;
-  Darwin*) darwin=true 
-           if [ -z "$JAVA_VERSION" ] ; then
-             JAVA_VERSION="CurrentJDK"
+  Darwin*) darwin=true            
+           #
+           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
+           # for the new JDKs provided by Oracle.
+           # 
+           if [[ -z "$JAVA_HOME" && -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ]] ; then
+             #
+             # Apple JDKs
+             #
+             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
            fi
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           
+           if [[ -z "$JAVA_HOME" && -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ]] ; then
+             #
+             # Apple JDKs
+             #
+             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
            fi
+             
+           if [[ -z "$JAVA_HOME" && -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ]] ; then
+             #
+             # Oracle JDKs
+             #
+             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
+           fi           
            ;;
 esac
 
diff --git a/apache-maven/src/bin/mvn.bat b/apache-maven/src/bin/mvn.bat
index b4609be..42bd570 100644
--- a/apache-maven/src/bin/mvn.bat
+++ b/apache-maven/src/bin/mvn.bat
@@ -29,7 +29,7 @@
 @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
 @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
 @REM     e.g. to debug Maven itself, use
- at REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+ at REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
 @REM ----------------------------------------------------------------------------
 
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index 7a686ee..43a09cc 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -30,11 +30,11 @@
 #   M2_HOME - location of maven2's installed home dir
 #   MAVEN_OPTS - parameters passed to the Java VM when running Maven
 #     e.g. to debug Maven itself, use
-#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 #   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
 # ----------------------------------------------------------------------------
 
-MAVEN_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
 
 echo Preparing to Execute Maven in Debug Mode
 
@@ -58,12 +58,30 @@ case "`uname`" in
   CYGWIN*) cygwin=true ;;
   MINGW*) mingw=true;;
   Darwin*) darwin=true 
-           if [ -z "$JAVA_VERSION" ] ; then
-             JAVA_VERSION="CurrentJDK"
+           #
+           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
+           # for the new JDKs provided by Oracle.
+           # 
+           if [[ -z "$JAVA_HOME" && -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ]] ; then
+             #
+             # Apple JDKs
+             #
+             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
            fi
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           
+           if [[ -z "$JAVA_HOME" && -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ]] ; then
+             #
+             # Apple JDKs
+             #
+             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
            fi
+             
+           if [[ -z "$JAVA_HOME" && -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ]] ; then
+             #
+             # Oracle JDKs
+             #
+             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
+           fi           
            ;;
 esac
 
diff --git a/apache-maven/src/bin/mvnDebug.bat b/apache-maven/src/bin/mvnDebug.bat
index d50f535..446afb2 100644
--- a/apache-maven/src/bin/mvnDebug.bat
+++ b/apache-maven/src/bin/mvnDebug.bat
@@ -29,7 +29,7 @@
 @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
 @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
 @REM     e.g. to debug Maven itself, use
- at REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+ at REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
 @REM ----------------------------------------------------------------------------
 
@@ -54,7 +54,7 @@ set ERROR_CODE=0
 if "%OS%"=="Windows_NT" @setlocal
 if "%OS%"=="WINNT" @setlocal
 
-set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 
 @REM ==== START VALIDATION ====
 if not "%JAVA_HOME%" == "" goto OkJHome
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index aa970ee..ec2f7e0 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -30,7 +30,7 @@
 #   M2_HOME - location of maven2's installed home dir
 #   MAVEN_OPTS - parameters passed to the Java VM when running Maven
 #     e.g. to debug Maven itself, use
-#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 #   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
 # ----------------------------------------------------------------------------
 
@@ -61,17 +61,31 @@ mingw=false
 case "`uname`" in
   CYGWIN*) cygwin=true ;;
   MINGW*) mingw=true;;
-  Darwin*) darwin=true 
-           if [ -z "$JAVA_VERSION" ] ; then
-             JAVA_VERSION="CurrentJDK"
+  Darwin*) darwin=true
+           #
+           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
+           # for the new JDKs provided by Oracle.
+           # 
+           if [[ -z "$JAVA_HOME" && -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ]] ; then
+             #
+             # Apple JDKs
+             #
+             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
            fi
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           
+           if [[ -z "$JAVA_HOME" && -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ]] ; then
+             #
+             # Apple JDKs
+             #
+             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
            fi
-           if [ -z "$YJP_HOME" ]; then
-             YJP_HOME=/Applications/YourKit.app
-           fi
-           YJPLIB=$YJP_HOME/bin/mac/libyjpagent.jnilib
+             
+           if [[ -z "$JAVA_HOME" && -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ]] ; then
+             #
+             # Oracle JDKs
+             #
+             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
+           fi           
            ;;
 esac
 
diff --git a/apache-maven/src/conf/logging/simplelogger.properties b/apache-maven/src/conf/logging/simplelogger.properties
new file mode 100644
index 0000000..859ff72
--- /dev/null
+++ b/apache-maven/src/conf/logging/simplelogger.properties
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.slf4j.simpleLogger.defaultLogLevel=info
+org.slf4j.simpleLogger.showDateTime=false
+org.slf4j.simpleLogger.showThreadName=false
+org.slf4j.simpleLogger.showLogName=false
+org.slf4j.simpleLogger.logFile=System.out
+org.slf4j.simpleLogger.levelInBrackets=true
+org.slf4j.simpleLogger.log.Sisu=info
+org.slf4j.simpleLogger.warnLevelString=WARNING
\ No newline at end of file
diff --git a/apache-maven/src/conf/settings.xml b/apache-maven/src/conf/settings.xml
index 45a878a..204e334 100644
--- a/apache-maven/src/conf/settings.xml
+++ b/apache-maven/src/conf/settings.xml
@@ -49,7 +49,7 @@ under the License.
   <!-- localRepository
    | The path to the local repository maven will use to store artifacts.
    |
-   | Default: ~/.m2/repository
+   | Default: ${user.home}/.m2/repository
   <localRepository>/path/to/local/repo</localRepository>
   -->
 
diff --git a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
new file mode 100644
index 0000000..1a46225
--- /dev/null
+++ b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
@@ -0,0 +1,49 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+## $Date: 2008-03-09 23:17:06 -0700 (Sun, 09 Mar 2008) $ $Rev: 635446 $
+##
+
+Apache Maven includes a number of components and libraries with separate 
+copyright notices and license terms. Your use of those components are 
+subject to the terms and conditions of the following licenses. 
+
+#set ( $apacheTxt = "The Apache Software License, Version 2.0" )
+
+#foreach ( $project in $projects )
+#foreach ( $license in $project.licenses)
+#if ( ! ($apacheTxt == $license.name) ) 
+#set ( $artId = $project.artifact.artifactId)
+#set ( $lf = $locator )
+#set ( $url = $license.url )
+## glass fish URL is now invalid, use a fixed one
+#if ($url == "https://glassfish.dev.java.net/public/CDDLv1.0.html")
+#set ( $url = 'https://glassfish.java.net/public/CDDLv1.0.html' )
+#end
+#if ($url) 
+#set ( $licFile = 'lib/' + $artId + '.license' )
+#set ( $downloaded = $lf.getResourceAsFile($url, "licenses/${licFile}") )
+#end
+
+$project.name #if ($project.url)($project.url)#end $project.artifact
+    License: $license.name #if ($url) $url ($licFile)#end
+
+#end
+#end
+#end
+
diff --git a/apache-maven/src/main/assembly/bin.xml b/apache-maven/src/main/assembly/bin.xml
index dcd6647..9167b54 100644
--- a/apache-maven/src/main/assembly/bin.xml
+++ b/apache-maven/src/main/assembly/bin.xml
@@ -37,30 +37,7 @@ under the License.
       <excludes>
         <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
         <exclude>junit:junit</exclude>
-        <exclude>log4j:log4j</exclude>
         <exclude>commons-logging:commons-logging-api</exclude>
-      
-        <!--exclude>org.codehaus.plexus:plexus-classworlds</exclude>
-        <exclude>org.codehaus.plexus:plexus-component-api</exclude>
-        <exclude>classworlds:classworlds</exclude>
-        <exclude>junit:junit</exclude>
-        <exclude>jmock:jmock</exclude>
-        <exclude>xml-apis:xml-apis</exclude>
-        <exclude>org.apache.maven:apache-maven</exclude>
-        <exclude>org.apache.maven:maven-artifact</exclude>
-        <exclude>org.apache.maven:maven-monitor</exclude>
-        <exclude>org.apache.maven:maven-plugin-descriptor</exclude>
-        <exclude>jdom:jdom</exclude>
-        <exclude>org.apache.maven:apache-maven</exclude>
-        <exclude>bouncycastle:bcprov-jdk15</exclude>
-        <exclude>bouncycastle:bcpg-jdk15</exclude>
-        <exclude>log4j:log4j</exclude>
-        <exclude>org.sonatype.mercury:mercury-mp3-cli</exclude>
-        <exclude>commons-logging:commons-logging-api</exclude>
-        <exclude>org.slf4j:slf4j-api</exclude>
-        <exclude>org.slf4j:slf4j-jdk14</exclude>
-        <exclude>org.apache.maven.mercury:mercury-crypto-api</exclude>
-        <exclude>org.apache.maven.mercury:mercury-crypto-basic</exclude-->        
       </excludes>
     </dependencySet>
   </dependencySets>
@@ -68,8 +45,21 @@ under the License.
     <fileSet>
       <includes>
         <include>README*</include>
-        <include>LICENSE*</include>
-        <include>NOTICE*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/maven-shared-archive-resources/META-INF</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>LICENSE</include>
+        <include>NOTICE</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/licenses/lib</directory>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>**</include>
       </includes>
     </fileSet>
     <fileSet>
diff --git a/apache-maven/src/main/assembly/src.xml b/apache-maven/src/main/assembly/src.xml
index 634e922..a9f50bb 100644
--- a/apache-maven/src/main/assembly/src.xml
+++ b/apache-maven/src/main/assembly/src.xml
@@ -32,6 +32,7 @@ under the License.
         <exclude>**/*.log</exclude>
         <exclude>**/.gitignore</exclude>
         <exclude>**/.gitattributes</exclude>
+        <exclude>init-git-svn.sh</exclude>
       </excludes>
     </fileSet>
     <fileSet>
@@ -39,15 +40,7 @@ under the License.
       <outputDirectory>/</outputDirectory>
       <includes>
         <include>DEPENDENCIES</include>
-        <!-- exclude the license and notice as they are not as accurate as the ones below -->
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>LICENSE.txt</include>
-        <include>NOTICE.txt</include>
+        <!-- exclude the license and notice as they are not as accurate as the ones from above -->
       </includes>
     </fileSet>
   </fileSets>
diff --git a/build.xml b/build.xml
index 2322be3..6b93808 100644
--- a/build.xml
+++ b/build.xml
@@ -36,6 +36,9 @@ END SNIPPET: ant-bootstrap -->
   <property name="distributionShortName" value="Maven"/>
   <property name="distributionName" value="Apache Maven"/>
   <property name="it.workdir.version" value="3.0.x" />
+  <property name="maven-compile.jvmargs" value="-Xmx512m -Xms512m"/>
+  <property name="maven-compile.fork" value="true"/>
+  <property name="maven-compile.maxmemory" value="512m"/>
 
   <target name="initTaskDefs">
     <echo>Building ${distributionName} ...</echo>
@@ -247,8 +250,9 @@ Do you want to continue?</input>
   </target>
 
   <target name="maven-compile" depends="compile-boot,process-classes" description="compiles Maven using the bootstrap Maven, skipping automated tests">
-    <java fork="true" classname="org.apache.maven.cli.MavenCli" failonerror="true">
+    <java fork="${maven-compile.fork}" classname="org.apache.maven.cli.MavenCli" failonerror="true" timeout="600000"  maxmemory="${maven-compile.maxmemory}">
       <!--jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/-->
+      <!--jvmarg value="${maven-compile.jvmargs}"/-->
       <classpath refid="maven.classpath" />
       <arg value="${maven.debug}" />
       <arg value="-B" />
diff --git a/doap_Maven.rdf b/doap_Maven.rdf
index 2cc959d..d9820bb 100644
--- a/doap_Maven.rdf
+++ b/doap_Maven.rdf
@@ -33,6 +33,17 @@ under the License.
     <release>
       <Version>
         <name>Latest stable release</name>
+        <created>2012-01-20</created>
+        <revision>3.0.4</revision>
+        <file-release>http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.zip</file-release>
+        <file-release>http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.tar.gz</file-release>
+        <file-release>http://archive.apache.org/dist/maven/source/apache-maven-3.0.4-src.zip</file-release>
+        <file-release>http://archive.apache.org/dist/maven/source/apache-maven-3.0.4-src.tar.gz</file-release>
+      </Version>
+    </release>
+    <release>
+      <Version>
+        <name>Apache Maven 3.0.3</name>
         <created>2011-03-03</created>
         <revision>3.0.3</revision>
         <file-release>http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.3-bin.zip</file-release>
diff --git a/maven-aether-provider/pom.xml b/maven-aether-provider/pom.xml
index 068b626..a5c460a 100644
--- a/maven-aether-provider/pom.xml
+++ b/maven-aether-provider/pom.xml
@@ -25,16 +25,19 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-aether-provider</artifactId>
 
   <name>Maven Aether Provider</name>
-  <description>
-    This module provides extensions to Aether for utilizing the Maven POM and Maven repository metadata for artifacts resolution
-    and download.
-  </description>
+  <description>Extensions to Aether for utilizing Maven POM and repository metadata.</description>
+
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
 
   <dependencies>
     <dependency>
@@ -50,19 +53,19 @@ under the License.
       <artifactId>maven-repository-metadata</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-api</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-spi</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-util</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-impl</artifactId>
     </dependency>
     <dependency>
@@ -73,6 +76,40 @@ under the License.
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.sonatype.sisu</groupId>
+      <artifactId>sisu-guice</artifactId>
+      <classifier>no_aop</classifier>
+      <optional>true</optional>
+      <exclusions>
+        <exclusion>
+          <groupId>aopalliance</groupId>
+          <artifactId>aopalliance</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <!-- Testing -->
+    <dependency>
+      <groupId>org.eclipse.aether</groupId>
+      <artifactId>aether-connector-wagon</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-file</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <version>1.9.5</version>
+      <scope>test</scope>
+    </dependency>    
   </dependencies>
 
   <build>
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorUtils.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorUtils.java
index b7da0d1..8515803 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorUtils.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorUtils.java
@@ -20,10 +20,10 @@ package org.apache.maven.repository.internal;
  */
 
 import org.apache.maven.model.Repository;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.RepositoryPolicy;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.RepositoryPolicy;
 
 /**
  * <strong>Warning:</strong> This is an internal utility class that is only public for technical reasons, it is not part
@@ -49,11 +49,11 @@ public class ArtifactDescriptorUtils
 
     public static RemoteRepository toRemoteRepository( Repository repository )
     {
-        RemoteRepository result =
-            new RemoteRepository( repository.getId(), repository.getLayout(), repository.getUrl() );
-        result.setPolicy( true, toRepositoryPolicy( repository.getSnapshots() ) );
-        result.setPolicy( false, toRepositoryPolicy( repository.getReleases() ) );
-        return result;
+        RemoteRepository.Builder builder =
+            new RemoteRepository.Builder( repository.getId(), repository.getLayout(), repository.getUrl() );
+        builder.setSnapshotPolicy( toRepositoryPolicy( repository.getSnapshots() ) );
+        builder.setReleasePolicy( toRepositoryPolicy( repository.getReleases() ) );
+        return builder.build();
     }
 
     public static RepositoryPolicy toRepositoryPolicy( org.apache.maven.model.RepositoryPolicy policy )
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
index 1faee29..59a955d 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
@@ -21,6 +21,7 @@ package org.apache.maven.repository.internal;
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -28,6 +29,9 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.model.DistributionManagement;
 import org.apache.maven.model.License;
@@ -45,52 +49,55 @@ import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.model.resolution.UnresolvableModelException;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.sonatype.aether.RepositoryEvent.EventType;
-import org.sonatype.aether.RepositoryException;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.artifact.ArtifactType;
-import org.sonatype.aether.artifact.ArtifactTypeRegistry;
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.Exclusion;
-import org.sonatype.aether.impl.ArtifactDescriptorReader;
-import org.sonatype.aether.impl.ArtifactResolver;
-import org.sonatype.aether.impl.RemoteRepositoryManager;
-import org.sonatype.aether.impl.RepositoryEventDispatcher;
-import org.sonatype.aether.impl.VersionResolver;
-import org.sonatype.aether.transfer.ArtifactNotFoundException;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.artifact.ArtifactProperties;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
-import org.sonatype.aether.util.artifact.DefaultArtifactType;
-import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
-import org.sonatype.aether.repository.WorkspaceRepository;
-import org.sonatype.aether.resolution.ArtifactDescriptorException;
-import org.sonatype.aether.resolution.ArtifactDescriptorRequest;
-import org.sonatype.aether.resolution.ArtifactDescriptorResult;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResolutionException;
-import org.sonatype.aether.resolution.ArtifactResult;
-import org.sonatype.aether.resolution.VersionRequest;
-import org.sonatype.aether.resolution.VersionResolutionException;
-import org.sonatype.aether.resolution.VersionResult;
-import org.sonatype.aether.spi.locator.Service;
-import org.sonatype.aether.spi.locator.ServiceLocator;
-import org.sonatype.aether.spi.log.Logger;
-import org.sonatype.aether.spi.log.NullLogger;
+import org.eclipse.aether.RepositoryException;
+import org.eclipse.aether.RepositoryEvent.EventType;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.ArtifactProperties;
+import org.eclipse.aether.artifact.ArtifactType;
+import org.eclipse.aether.artifact.ArtifactTypeRegistry;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.artifact.DefaultArtifactType;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.Exclusion;
+import org.eclipse.aether.impl.ArtifactDescriptorReader;
+import org.eclipse.aether.impl.ArtifactResolver;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.impl.RepositoryEventDispatcher;
+import org.eclipse.aether.impl.VersionResolver;
+import org.eclipse.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.resolution.ArtifactDescriptorException;
+import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
+import org.eclipse.aether.resolution.ArtifactDescriptorPolicyRequest;
+import org.eclipse.aether.resolution.ArtifactDescriptorRequest;
+import org.eclipse.aether.resolution.ArtifactDescriptorResult;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.resolution.VersionRequest;
+import org.eclipse.aether.resolution.VersionResolutionException;
+import org.eclipse.aether.resolution.VersionResult;
+import org.eclipse.aether.spi.locator.Service;
+import org.eclipse.aether.spi.locator.ServiceLocator;
+import org.eclipse.aether.spi.log.Logger;
+import org.eclipse.aether.spi.log.LoggerFactory;
+import org.eclipse.aether.spi.log.NullLoggerFactory;
+import org.eclipse.aether.transfer.ArtifactNotFoundException;
 
 /**
  * @author Benjamin Bentmann
  */
+ at Named
 @Component( role = ArtifactDescriptorReader.class )
 public class DefaultArtifactDescriptorReader
     implements ArtifactDescriptorReader, Service
 {
 
     @SuppressWarnings( "unused" )
-    @Requirement
-    private Logger logger = NullLogger.INSTANCE;
+    @Requirement( role = LoggerFactory.class )
+    private Logger logger = NullLoggerFactory.LOGGER;
 
     @Requirement
     private RemoteRepositoryManager remoteRepositoryManager;
@@ -107,9 +114,27 @@ public class DefaultArtifactDescriptorReader
     @Requirement
     private ModelBuilder modelBuilder;
 
+    public DefaultArtifactDescriptorReader()
+    {
+        // enable no-arg constructor
+    }
+
+    @Inject
+    DefaultArtifactDescriptorReader( RemoteRepositoryManager remoteRepositoryManager, VersionResolver versionResolver,
+                                     ArtifactResolver artifactResolver, ModelBuilder modelBuilder,
+                                     RepositoryEventDispatcher repositoryEventDispatcher, LoggerFactory loggerFactory )
+    {
+        setRemoteRepositoryManager( remoteRepositoryManager );
+        setVersionResolver( versionResolver );
+        setArtifactResolver( artifactResolver );
+        setModelBuilder( modelBuilder );
+        setLoggerFactory( loggerFactory );
+        setRepositoryEventDispatcher( repositoryEventDispatcher );
+    }
+
     public void initService( ServiceLocator locator )
     {
-        setLogger( locator.getService( Logger.class ) );
+        setLoggerFactory( locator.getService( LoggerFactory.class ) );
         setRemoteRepositoryManager( locator.getService( RemoteRepositoryManager.class ) );
         setVersionResolver( locator.getService( VersionResolver.class ) );
         setArtifactResolver( locator.getService( ArtifactResolver.class ) );
@@ -121,12 +146,18 @@ public class DefaultArtifactDescriptorReader
         }
     }
 
-    public DefaultArtifactDescriptorReader setLogger( Logger logger )
+    public DefaultArtifactDescriptorReader setLoggerFactory( LoggerFactory loggerFactory )
     {
-        this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE;
+        this.logger = NullLoggerFactory.getSafeLogger( loggerFactory, getClass() );
         return this;
     }
 
+    void setLogger( LoggerFactory loggerFactory )
+    {
+        // plexus support
+        setLoggerFactory( loggerFactory );
+    }
+
     public DefaultArtifactDescriptorReader setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager )
     {
         if ( remoteRepositoryManager == null )
@@ -217,7 +248,7 @@ public class DefaultArtifactDescriptorReader
             }
 
             List<License> licenses = model.getLicenses();
-            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
+            properties.put( "license.count", licenses.size() );
             for ( int i = 0; i < licenses.size(); i++ )
             {
                 License license = licenses.get( i );
@@ -228,6 +259,8 @@ public class DefaultArtifactDescriptorReader
             }
 
             result.setProperties( properties );
+
+            setArtifactProperties( result, model );
         }
 
         return result;
@@ -237,11 +270,12 @@ public class DefaultArtifactDescriptorReader
                            ArtifactDescriptorResult result )
         throws ArtifactDescriptorException
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request );
+        RequestTrace trace = RequestTrace.newChild( request.getTrace(), request );
 
         Set<String> visited = new LinkedHashSet<String>();
         for ( Artifact artifact = request.getArtifact();; )
         {
+            Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
             try
             {
                 VersionRequest versionRequest =
@@ -250,6 +284,13 @@ public class DefaultArtifactDescriptorReader
                 VersionResult versionResult = versionResolver.resolveVersion( session, versionRequest );
 
                 artifact = artifact.setVersion( versionResult.getVersion() );
+
+                versionRequest =
+                    new VersionRequest( pomArtifact, request.getRepositories(), request.getRequestContext() );
+                versionRequest.setTrace( trace );
+                versionResult = versionResolver.resolveVersion( session, versionRequest );
+
+                pomArtifact = pomArtifact.setVersion( versionResult.getVersion() );
             }
             catch ( VersionResolutionException e )
             {
@@ -262,7 +303,7 @@ public class DefaultArtifactDescriptorReader
                 RepositoryException exception =
                     new RepositoryException( "Artifact relocations form a cycle: " + visited );
                 invalidDescriptor( session, trace, artifact, exception );
-                if ( session.isIgnoreInvalidArtifactDescriptor() )
+                if ( ( getPolicy( session, artifact, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 )
                 {
                     return null;
                 }
@@ -270,8 +311,6 @@ public class DefaultArtifactDescriptorReader
                 throw new ArtifactDescriptorException( result );
             }
 
-            Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
-
             ArtifactResult resolveResult;
             try
             {
@@ -287,7 +326,7 @@ public class DefaultArtifactDescriptorReader
                 if ( e.getCause() instanceof ArtifactNotFoundException )
                 {
                     missingDescriptor( session, trace, artifact, (Exception) e.getCause() );
-                    if ( session.isIgnoreMissingArtifactDescriptor() )
+                    if ( ( getPolicy( session, artifact, request ) & ArtifactDescriptorPolicy.IGNORE_MISSING ) != 0 )
                     {
                         return null;
                     }
@@ -332,7 +371,7 @@ public class DefaultArtifactDescriptorReader
                     }
                 }
                 invalidDescriptor( session, trace, artifact, e );
-                if ( session.isIgnoreInvalidArtifactDescriptor() )
+                if ( ( getPolicy( session, artifact, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 )
                 {
                     return null;
                 }
@@ -382,6 +421,23 @@ public class DefaultArtifactDescriptorReader
         return relocation;
     }
 
+    private void setArtifactProperties( ArtifactDescriptorResult result, Model model )
+    {
+        String downloadUrl = null;
+        DistributionManagement distMngt = model.getDistributionManagement();
+        if ( distMngt != null )
+        {
+            downloadUrl = distMngt.getDownloadUrl();
+        }
+        if ( downloadUrl != null && downloadUrl.length() > 0 )
+        {
+            Artifact artifact = result.getArtifact();
+            Map<String, String> props = new HashMap<String, String>( artifact.getProperties() );
+            props.put( ArtifactProperties.DOWNLOAD_URL, downloadUrl );
+            result.setArtifact( artifact.setProperties( props ) );
+        }
+    }
+
     private Dependency convert( org.apache.maven.model.Dependency dependency, ArtifactTypeRegistry stereotypes )
     {
         ArtifactType stereotype = stereotypes.get( dependency.getType() );
@@ -421,23 +477,33 @@ public class DefaultArtifactDescriptorReader
     private void missingDescriptor( RepositorySystemSession session, RequestTrace trace, Artifact artifact,
                                     Exception exception )
     {
-        DefaultRepositoryEvent event =
-            new DefaultRepositoryEvent( EventType.ARTIFACT_DESCRIPTOR_MISSING, session, trace );
+        RepositoryEvent.Builder event = new RepositoryEvent.Builder( session, EventType.ARTIFACT_DESCRIPTOR_MISSING );
+        event.setTrace( trace );
         event.setArtifact( artifact );
         event.setException( exception );
 
-        repositoryEventDispatcher.dispatch( event );
+        repositoryEventDispatcher.dispatch( event.build() );
     }
 
     private void invalidDescriptor( RepositorySystemSession session, RequestTrace trace, Artifact artifact,
                                     Exception exception )
     {
-        DefaultRepositoryEvent event =
-            new DefaultRepositoryEvent( EventType.ARTIFACT_DESCRIPTOR_INVALID, session, trace );
+        RepositoryEvent.Builder event = new RepositoryEvent.Builder( session, EventType.ARTIFACT_DESCRIPTOR_INVALID );
+        event.setTrace( trace );
         event.setArtifact( artifact );
         event.setException( exception );
 
-        repositoryEventDispatcher.dispatch( event );
+        repositoryEventDispatcher.dispatch( event.build() );
+    }
+
+    private int getPolicy( RepositorySystemSession session, Artifact artifact, ArtifactDescriptorRequest request )
+    {
+        ArtifactDescriptorPolicy policy = session.getArtifactDescriptorPolicy();
+        if ( policy == null )
+        {
+            return ArtifactDescriptorPolicy.STRICT;
+        }
+        return policy.getPolicy( session, new ArtifactDescriptorPolicyRequest( artifact, request.getRequestContext() ) );
     }
 
 }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java
index 25b24c2..2d4fa7d 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java
@@ -20,8 +20,8 @@ package org.apache.maven.repository.internal;
  */
 
 import org.apache.maven.model.building.ModelCache;
-import org.sonatype.aether.RepositoryCache;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositoryCache;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * A model builder cache backed by the repository system cache.
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
index 96b9fc3..08ad432 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
@@ -31,15 +31,15 @@ import org.apache.maven.model.building.ModelSource;
 import org.apache.maven.model.resolution.InvalidRepositoryException;
 import org.apache.maven.model.resolution.ModelResolver;
 import org.apache.maven.model.resolution.UnresolvableModelException;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.ArtifactResolver;
-import org.sonatype.aether.impl.RemoteRepositoryManager;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResolutionException;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.impl.ArtifactResolver;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
 
 /**
  * A model resolver to assist building of dependency POMs. This resolver gives priority to those repositories that have
@@ -93,7 +93,7 @@ class DefaultModelResolver
     public void addRepository( Repository repository )
         throws InvalidRepositoryException
     {
-        if ( !repositoryIds.add( repository.getId() ) )
+        if ( session.isIgnoreArtifactDescriptorRepositories() || !repositoryIds.add( repository.getId() ) )
         {
             return;
         }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultServiceLocator.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultServiceLocator.java
deleted file mode 100644
index 032f546..0000000
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultServiceLocator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.repository.internal;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.sonatype.aether.impl.ArtifactDescriptorReader;
-import org.sonatype.aether.impl.MetadataGeneratorFactory;
-import org.sonatype.aether.impl.VersionRangeResolver;
-import org.sonatype.aether.impl.VersionResolver;
-
-/**
- * A simple service locator that is already setup with all components from this library. To acquire a complete
- * repository system, clients need to add some repository connectors for remote transfers. <em>Note:</em> This component
- * is meant to assists those clients that employ the repository systems outside of an IoC container, Maven plugins
- * should instead always use regular dependency injection to acquire the repository system.
- * 
- * @author Benjamin Bentmann
- * @deprecated use {@link MavenServiceLocator} instead, which is more explicit.
- */
-public class DefaultServiceLocator
-    extends org.sonatype.aether.impl.internal.DefaultServiceLocator
-{
-
-    /**
-     * Creates a new service locator that already knows about all service implementations included this library.
-     */
-    public DefaultServiceLocator()
-    {
-        addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
-        addService( VersionResolver.class, DefaultVersionResolver.class );
-        addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
-        addService( MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class );
-        addService( MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class );
-    }
-
-}
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
index c5b85f7..a7ff573 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
@@ -26,44 +26,48 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.IOUtil;
-import org.sonatype.aether.RepositoryEvent.EventType;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.SyncContext;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
-import org.sonatype.aether.util.metadata.DefaultMetadata;
-import org.sonatype.aether.util.version.GenericVersionScheme;
-import org.sonatype.aether.version.InvalidVersionSpecificationException;
-import org.sonatype.aether.version.Version;
-import org.sonatype.aether.version.VersionConstraint;
-import org.sonatype.aether.version.VersionScheme;
-import org.sonatype.aether.impl.MetadataResolver;
-import org.sonatype.aether.impl.RepositoryEventDispatcher;
-import org.sonatype.aether.impl.SyncContextFactory;
-import org.sonatype.aether.impl.VersionRangeResolver;
-import org.sonatype.aether.metadata.Metadata;
-import org.sonatype.aether.repository.ArtifactRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.resolution.MetadataRequest;
-import org.sonatype.aether.resolution.MetadataResult;
-import org.sonatype.aether.resolution.VersionRangeRequest;
-import org.sonatype.aether.resolution.VersionRangeResolutionException;
-import org.sonatype.aether.resolution.VersionRangeResult;
-import org.sonatype.aether.spi.locator.Service;
-import org.sonatype.aether.spi.locator.ServiceLocator;
-import org.sonatype.aether.spi.log.Logger;
-import org.sonatype.aether.spi.log.NullLogger;
+import org.eclipse.aether.RepositoryEvent.EventType;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.SyncContext;
+import org.eclipse.aether.impl.MetadataResolver;
+import org.eclipse.aether.impl.RepositoryEventDispatcher;
+import org.eclipse.aether.impl.SyncContextFactory;
+import org.eclipse.aether.impl.VersionRangeResolver;
+import org.eclipse.aether.metadata.DefaultMetadata;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.resolution.MetadataRequest;
+import org.eclipse.aether.resolution.MetadataResult;
+import org.eclipse.aether.resolution.VersionRangeRequest;
+import org.eclipse.aether.resolution.VersionRangeResolutionException;
+import org.eclipse.aether.resolution.VersionRangeResult;
+import org.eclipse.aether.spi.locator.Service;
+import org.eclipse.aether.spi.locator.ServiceLocator;
+import org.eclipse.aether.spi.log.Logger;
+import org.eclipse.aether.spi.log.LoggerFactory;
+import org.eclipse.aether.spi.log.NullLoggerFactory;
+import org.eclipse.aether.util.version.GenericVersionScheme;
+import org.eclipse.aether.version.InvalidVersionSpecificationException;
+import org.eclipse.aether.version.Version;
+import org.eclipse.aether.version.VersionConstraint;
+import org.eclipse.aether.version.VersionScheme;
 
 /**
  * @author Benjamin Bentmann
  */
+ at Named
 @Component( role = VersionRangeResolver.class )
 public class DefaultVersionRangeResolver
     implements VersionRangeResolver, Service
@@ -72,8 +76,8 @@ public class DefaultVersionRangeResolver
     private static final String MAVEN_METADATA_XML = "maven-metadata.xml";
 
     @SuppressWarnings( "unused" )
-    @Requirement
-    private Logger logger = NullLogger.INSTANCE;
+    @Requirement( role = LoggerFactory.class )
+    private Logger logger = NullLoggerFactory.LOGGER;
 
     @Requirement
     private MetadataResolver metadataResolver;
@@ -84,20 +88,41 @@ public class DefaultVersionRangeResolver
     @Requirement
     private RepositoryEventDispatcher repositoryEventDispatcher;
 
+    public DefaultVersionRangeResolver()
+    {
+        // enable default constructor
+    }
+
+    @Inject
+    DefaultVersionRangeResolver( MetadataResolver metadataResolver, SyncContextFactory syncContextFactory,
+                                 RepositoryEventDispatcher repositoryEventDispatcher, LoggerFactory loggerFactory )
+    {
+        setMetadataResolver( metadataResolver );
+        setSyncContextFactory( syncContextFactory );
+        setLoggerFactory( loggerFactory );
+        setRepositoryEventDispatcher( repositoryEventDispatcher );
+    }
+
     public void initService( ServiceLocator locator )
     {
-        setLogger( locator.getService( Logger.class ) );
+        setLoggerFactory( locator.getService( LoggerFactory.class ) );
         setMetadataResolver( locator.getService( MetadataResolver.class ) );
         setSyncContextFactory( locator.getService( SyncContextFactory.class ) );
         setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) );
     }
 
-    public DefaultVersionRangeResolver setLogger( Logger logger )
+    public DefaultVersionRangeResolver setLoggerFactory( LoggerFactory loggerFactory )
     {
-        this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE;
+        this.logger = NullLoggerFactory.getSafeLogger( loggerFactory, getClass() );
         return this;
     }
 
+    void setLogger( LoggerFactory loggerFactory )
+    {
+        // plexus support
+        setLoggerFactory( loggerFactory );
+    }
+
     public DefaultVersionRangeResolver setMetadataResolver( MetadataResolver metadataResolver )
     {
         if ( metadataResolver == null )
@@ -148,7 +173,7 @@ public class DefaultVersionRangeResolver
 
         result.setVersionConstraint( versionConstraint );
 
-        if ( versionConstraint.getRanges().isEmpty() )
+        if ( versionConstraint.getRange() == null )
         {
             result.addVersion( versionConstraint.getVersion() );
         }
@@ -184,7 +209,7 @@ public class DefaultVersionRangeResolver
     private Map<String, ArtifactRepository> getVersions( RepositorySystemSession session, VersionRangeResult result,
                                                          VersionRangeRequest request )
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request );
+        RequestTrace trace = RequestTrace.newChild( request.getTrace(), request );
 
         Map<String, ArtifactRepository> versionIndex = new HashMap<String, ArtifactRepository>();
 
@@ -265,7 +290,7 @@ public class DefaultVersionRangeResolver
                 }
                 finally
                 {
-                    syncContext.release();
+                    syncContext.close();
                 }
             }
         }
@@ -285,12 +310,13 @@ public class DefaultVersionRangeResolver
     private void invalidMetadata( RepositorySystemSession session, RequestTrace trace, Metadata metadata,
                                   ArtifactRepository repository, Exception exception )
     {
-        DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID, session, trace );
+        RepositoryEvent.Builder event = new RepositoryEvent.Builder( session, EventType.METADATA_INVALID );
+        event.setTrace( trace );
         event.setMetadata( metadata );
         event.setException( exception );
         event.setRepository( repository );
 
-        repositoryEventDispatcher.dispatch( event );
+        repositoryEventDispatcher.dispatch( event.build() );
     }
 
-}
+}
\ No newline at end of file
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
index 7c0f85f..9fcfc99 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
@@ -28,6 +28,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+
 import org.apache.maven.artifact.repository.metadata.Snapshot;
 import org.apache.maven.artifact.repository.metadata.SnapshotVersion;
 import org.apache.maven.artifact.repository.metadata.Versioning;
@@ -36,40 +39,41 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.ConfigurationProperties;
-import org.sonatype.aether.RepositoryCache;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.RepositoryEvent.EventType;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.SyncContext;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
-import org.sonatype.aether.util.metadata.DefaultMetadata;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.MetadataResolver;
-import org.sonatype.aether.impl.RepositoryEventDispatcher;
-import org.sonatype.aether.impl.SyncContextFactory;
-import org.sonatype.aether.impl.VersionResolver;
-import org.sonatype.aether.impl.internal.CacheUtils;
-import org.sonatype.aether.metadata.Metadata;
-import org.sonatype.aether.repository.ArtifactRepository;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.repository.WorkspaceRepository;
-import org.sonatype.aether.resolution.MetadataRequest;
-import org.sonatype.aether.resolution.MetadataResult;
-import org.sonatype.aether.resolution.VersionRequest;
-import org.sonatype.aether.resolution.VersionResolutionException;
-import org.sonatype.aether.resolution.VersionResult;
-import org.sonatype.aether.spi.locator.Service;
-import org.sonatype.aether.spi.locator.ServiceLocator;
-import org.sonatype.aether.spi.log.Logger;
-import org.sonatype.aether.spi.log.NullLogger;
+import org.eclipse.aether.RepositoryCache;
+import org.eclipse.aether.RepositoryEvent.EventType;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.SyncContext;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.impl.MetadataResolver;
+import org.eclipse.aether.impl.RepositoryEventDispatcher;
+import org.eclipse.aether.impl.SyncContextFactory;
+import org.eclipse.aether.impl.VersionResolver;
+import org.eclipse.aether.internal.impl.CacheUtils;
+import org.eclipse.aether.metadata.DefaultMetadata;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.resolution.MetadataRequest;
+import org.eclipse.aether.resolution.MetadataResult;
+import org.eclipse.aether.resolution.VersionRequest;
+import org.eclipse.aether.resolution.VersionResolutionException;
+import org.eclipse.aether.resolution.VersionResult;
+import org.eclipse.aether.spi.locator.Service;
+import org.eclipse.aether.spi.locator.ServiceLocator;
+import org.eclipse.aether.spi.log.Logger;
+import org.eclipse.aether.spi.log.LoggerFactory;
+import org.eclipse.aether.spi.log.NullLoggerFactory;
+import org.eclipse.aether.util.ConfigUtils;
 
 /**
  * @author Benjamin Bentmann
  */
+ at Named
 @Component( role = VersionResolver.class )
 public class DefaultVersionResolver
     implements VersionResolver, Service
@@ -84,8 +88,8 @@ public class DefaultVersionResolver
     private static final String SNAPSHOT = "SNAPSHOT";
 
     @SuppressWarnings( "unused" )
-    @Requirement
-    private Logger logger = NullLogger.INSTANCE;
+    @Requirement( role = LoggerFactory.class )
+    private Logger logger = NullLoggerFactory.LOGGER;
 
     @Requirement
     private MetadataResolver metadataResolver;
@@ -96,20 +100,41 @@ public class DefaultVersionResolver
     @Requirement
     private RepositoryEventDispatcher repositoryEventDispatcher;
 
+    public DefaultVersionResolver()
+    {
+        // enable no-arg constructor
+    }
+
+    @Inject
+    DefaultVersionResolver( MetadataResolver metadataResolver, SyncContextFactory syncContextFactory,
+                            RepositoryEventDispatcher repositoryEventDispatcher, LoggerFactory loggerFactory )
+    {
+        setMetadataResolver( metadataResolver );
+        setSyncContextFactory( syncContextFactory );
+        setLoggerFactory( loggerFactory );
+        setRepositoryEventDispatcher( repositoryEventDispatcher );
+    }
+
     public void initService( ServiceLocator locator )
     {
-        setLogger( locator.getService( Logger.class ) );
+        setLoggerFactory( locator.getService( LoggerFactory.class ) );
         setMetadataResolver( locator.getService( MetadataResolver.class ) );
         setSyncContextFactory( locator.getService( SyncContextFactory.class ) );
         setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) );
     }
 
-    public DefaultVersionResolver setLogger( Logger logger )
+    public DefaultVersionResolver setLoggerFactory( LoggerFactory loggerFactory )
     {
-        this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE;
+        this.logger = NullLoggerFactory.getSafeLogger( loggerFactory, getClass() );
         return this;
     }
 
+    void setLogger( LoggerFactory loggerFactory )
+    {
+        // plexus support
+        setLoggerFactory( loggerFactory );
+    }
+
     public DefaultVersionResolver setMetadataResolver( MetadataResolver metadataResolver )
     {
         if ( metadataResolver == null )
@@ -143,7 +168,7 @@ public class DefaultVersionResolver
     public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request )
         throws VersionResolutionException
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request );
+        RequestTrace trace = RequestTrace.newChild( request.getTrace(), request );
 
         Artifact artifact = request.getArtifact();
 
@@ -153,7 +178,7 @@ public class DefaultVersionResolver
 
         Key cacheKey = null;
         RepositoryCache cache = session.getCache();
-        if ( cache != null && !ConfigurationProperties.get( session, "aether.versionResolver.noCache", false ) )
+        if ( cache != null && !ConfigUtils.getBoolean( session, false, "aether.versionResolver.noCache" ) )
         {
             cacheKey = new Key( session, request );
 
@@ -355,7 +380,7 @@ public class DefaultVersionResolver
                 }
                 finally
                 {
-                    syncContext.release();
+                    syncContext.close();
                 }
             }
         }
@@ -375,12 +400,13 @@ public class DefaultVersionResolver
     private void invalidMetadata( RepositorySystemSession session, RequestTrace trace, Metadata metadata,
                                   ArtifactRepository repository, Exception exception )
     {
-        DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID, session, trace );
+        RepositoryEvent.Builder event = new RepositoryEvent.Builder( session, EventType.METADATA_INVALID );
+        event.setTrace( trace );
         event.setMetadata( metadata );
         event.setException( exception );
         event.setRepository( repository );
 
-        repositoryEventDispatcher.dispatch( event );
+        repositoryEventDispatcher.dispatch( event.build() );
     }
 
     private void merge( Artifact artifact, Map<String, VersionInfo> infos, Versioning versioning,
@@ -605,4 +631,4 @@ public class DefaultVersionResolver
         }
     }
 
-}
+}
\ No newline at end of file
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java
index a084977..a22d07d 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java
@@ -29,7 +29,7 @@ import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.artifact.repository.metadata.Snapshot;
 import org.apache.maven.artifact.repository.metadata.SnapshotVersion;
 import org.apache.maven.artifact.repository.metadata.Versioning;
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * @author Benjamin Bentmann
@@ -160,4 +160,4 @@ final class LocalSnapshotMetadata
         return Nature.SNAPSHOT;
     }
 
-}
+}
\ No newline at end of file
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java
index 1d318cd..ee7c10b 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java
@@ -24,12 +24,12 @@ import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.sonatype.aether.ConfigurationProperties;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.MetadataGenerator;
-import org.sonatype.aether.installation.InstallRequest;
-import org.sonatype.aether.metadata.Metadata;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.impl.MetadataGenerator;
+import org.eclipse.aether.installation.InstallRequest;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.util.ConfigUtils;
 
 /**
  * @author Benjamin Bentmann
@@ -44,7 +44,7 @@ class LocalSnapshotMetadataGenerator
 
     public LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request )
     {
-        legacyFormat = ConfigurationProperties.get( session.getConfigProperties(), "maven.metadata.legacy", false );
+        legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" );
 
         snapshots = new LinkedHashMap<Object, LocalSnapshotMetadata>();
     }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenAetherModule.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenAetherModule.java
new file mode 100644
index 0000000..6f391fd
--- /dev/null
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenAetherModule.java
@@ -0,0 +1,74 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.apache.maven.model.building.DefaultModelBuilderFactory;
+import org.apache.maven.model.building.ModelBuilder;
+import org.eclipse.aether.impl.AetherModule;
+import org.eclipse.aether.impl.ArtifactDescriptorReader;
+import org.eclipse.aether.impl.MetadataGeneratorFactory;
+import org.eclipse.aether.impl.VersionRangeResolver;
+import org.eclipse.aether.impl.VersionResolver;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Provides;
+import com.google.inject.name.Names;
+
+public final class MavenAetherModule
+    extends AbstractModule
+{
+
+    @Override
+    protected void configure()
+    {
+        install( new AetherModule() );
+        bind( ArtifactDescriptorReader.class ) //
+        .to( DefaultArtifactDescriptorReader.class ).in( Singleton.class );
+        bind( VersionResolver.class ) //
+        .to( DefaultVersionResolver.class ).in( Singleton.class );
+        bind( VersionRangeResolver.class ) //
+        .to( DefaultVersionRangeResolver.class ).in( Singleton.class );
+        bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "snapshot" ) ) //
+        .to( SnapshotMetadataGeneratorFactory.class ).in( Singleton.class );
+        bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "versions" ) ) //
+        .to( VersionsMetadataGeneratorFactory.class ).in( Singleton.class );
+        bind( ModelBuilder.class ) //
+        .toInstance( new DefaultModelBuilderFactory().newInstance() );
+    }
+
+    @Provides
+    @Singleton
+    Set<MetadataGeneratorFactory> provideMetadataGeneratorFactories( @Named( "snapshot" ) MetadataGeneratorFactory snapshot,
+                                                                     @Named( "versions" ) MetadataGeneratorFactory versions )
+    {
+        Set<MetadataGeneratorFactory> factories = new HashSet<MetadataGeneratorFactory>();
+        factories.add( snapshot );
+        factories.add( versions );
+        return Collections.unmodifiableSet( factories );
+    }
+
+}
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
index 3db90e9..bdf2878 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
@@ -23,6 +23,8 @@ import java.io.File;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.Writer;
+import java.util.Collections;
+import java.util.Map;
 
 import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
@@ -31,16 +33,20 @@ import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.WriterFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import org.sonatype.aether.RepositoryException;
-import org.sonatype.aether.metadata.MergeableMetadata;
+import org.eclipse.aether.RepositoryException;
+import org.eclipse.aether.metadata.AbstractMetadata;
+import org.eclipse.aether.metadata.MergeableMetadata;
 
 /**
  * @author Benjamin Bentmann
  */
 abstract class MavenMetadata
+    extends AbstractMetadata
     implements MergeableMetadata
 {
 
+    static final String MAVEN_METADATA_XML = "maven-metadata.xml";
+
     private final File file;
 
     protected Metadata metadata;
@@ -55,7 +61,7 @@ abstract class MavenMetadata
 
     public String getType()
     {
-        return "maven-metadata.xml";
+        return MAVEN_METADATA_XML;
     }
 
     public File getFile()
@@ -82,7 +88,7 @@ abstract class MavenMetadata
 
     protected abstract void merge( Metadata recessive );
 
-    private Metadata read( File metadataFile )
+    static Metadata read( File metadataFile )
         throws RepositoryException
     {
         if ( metadataFile.length() <= 0 )
@@ -130,24 +136,15 @@ abstract class MavenMetadata
         }
     }
 
+    public Map<String, String> getProperties()
+    {
+        return Collections.emptyMap();
+    }
+
     @Override
-    public String toString()
+    public org.eclipse.aether.metadata.Metadata setProperties( Map<String, String> properties )
     {
-        StringBuilder buffer = new StringBuilder( 128 );
-        if ( getGroupId().length() > 0 )
-        {
-            buffer.append( getGroupId() );
-        }
-        if ( getArtifactId().length() > 0 )
-        {
-            buffer.append( ':' ).append( getArtifactId() );
-        }
-        if ( getVersion().length() > 0 )
-        {
-            buffer.append( ':' ).append( getVersion() );
-        }
-        buffer.append( '/' ).append( getType() );
-        return buffer.toString();
+        return this;
     }
 
 }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemSession.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemSession.java
deleted file mode 100644
index ffd2415..0000000
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemSession.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.apache.maven.repository.internal;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.sonatype.aether.collection.DependencyGraphTransformer;
-import org.sonatype.aether.collection.DependencyManager;
-import org.sonatype.aether.collection.DependencySelector;
-import org.sonatype.aether.collection.DependencyTraverser;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.artifact.DefaultArtifactType;
-import org.sonatype.aether.util.artifact.DefaultArtifactTypeRegistry;
-import org.sonatype.aether.util.graph.manager.ClassicDependencyManager;
-import org.sonatype.aether.util.graph.selector.AndDependencySelector;
-import org.sonatype.aether.util.graph.selector.ExclusionDependencySelector;
-import org.sonatype.aether.util.graph.selector.OptionalDependencySelector;
-import org.sonatype.aether.util.graph.selector.ScopeDependencySelector;
-import org.sonatype.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
-import org.sonatype.aether.util.graph.transformer.ConflictMarker;
-import org.sonatype.aether.util.graph.transformer.JavaDependencyContextRefiner;
-import org.sonatype.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
-import org.sonatype.aether.util.graph.transformer.NearestVersionConflictResolver;
-import org.sonatype.aether.util.graph.traverser.FatArtifactTraverser;
-import org.sonatype.aether.util.repository.DefaultAuthenticationSelector;
-import org.sonatype.aether.util.repository.DefaultMirrorSelector;
-import org.sonatype.aether.util.repository.DefaultProxySelector;
-
-/**
- * A simplistic repository system session that mimics Maven's behavior to help third-party developers that want to embed
- * Maven's dependency resolution into their own applications. <strong>Warning:</strong> This class is not intended for
- * usage by Maven plugins, those should always acquire the current repository system session via parameter injection.
- * 
- * @author Benjamin Bentmann
- */
-public class MavenRepositorySystemSession
-    extends DefaultRepositorySystemSession
-{
-
-    /**
-     * Creates a new Maven-like repository system session by initializing the session with values typical for
-     * Maven-based resolution. In more detail, this constructor configures settings relevant for the processing of
-     * dependency graphs, most other settings remain at their generic default value. Use the various setters to further
-     * configure the session with authentication, mirror, proxy and other information required for your environment.
-     */
-    public MavenRepositorySystemSession()
-    {
-        setMirrorSelector( new DefaultMirrorSelector() );
-        setAuthenticationSelector( new DefaultAuthenticationSelector() );
-        setProxySelector( new DefaultProxySelector() );
-
-        DependencyTraverser depTraverser = new FatArtifactTraverser();
-        setDependencyTraverser( depTraverser );
-
-        DependencyManager depManager = new ClassicDependencyManager();
-        setDependencyManager( depManager );
-
-        DependencySelector depFilter =
-            new AndDependencySelector( new ScopeDependencySelector( "test", "provided" ),
-                                       new OptionalDependencySelector(), new ExclusionDependencySelector() );
-        setDependencySelector( depFilter );
-
-        DependencyGraphTransformer transformer =
-            new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
-                                                   new NearestVersionConflictResolver(),
-                                                   new JavaDependencyContextRefiner() );
-        setDependencyGraphTransformer( transformer );
-
-        DefaultArtifactTypeRegistry stereotypes = new DefaultArtifactTypeRegistry();
-        stereotypes.add( new DefaultArtifactType( "pom" ) );
-        stereotypes.add( new DefaultArtifactType( "maven-plugin", "jar", "", "java" ) );
-        stereotypes.add( new DefaultArtifactType( "jar", "jar", "", "java" ) );
-        stereotypes.add( new DefaultArtifactType( "ejb", "jar", "", "java" ) );
-        stereotypes.add( new DefaultArtifactType( "ejb-client", "jar", "client", "java" ) );
-        stereotypes.add( new DefaultArtifactType( "test-jar", "jar", "tests", "java" ) );
-        stereotypes.add( new DefaultArtifactType( "javadoc", "jar", "javadoc", "java" ) );
-        stereotypes.add( new DefaultArtifactType( "java-source", "jar", "sources", "java", false, false ) );
-        stereotypes.add( new DefaultArtifactType( "war", "war", "", "java", false, true ) );
-        stereotypes.add( new DefaultArtifactType( "ear", "ear", "", "java", false, true ) );
-        stereotypes.add( new DefaultArtifactType( "rar", "rar", "", "java", false, true ) );
-        stereotypes.add( new DefaultArtifactType( "par", "par", "", "java", false, true ) );
-        setArtifactTypeRegistry( stereotypes );
-
-        setIgnoreInvalidArtifactDescriptor( true );
-        setIgnoreMissingArtifactDescriptor( true );
-
-        setSystemProps( System.getProperties() );
-        setConfigProps( System.getProperties() );
-    }
-
-}
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
new file mode 100644
index 0000000..b7ed320
--- /dev/null
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
@@ -0,0 +1,136 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Properties;
+
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.artifact.DefaultArtifactType;
+import org.eclipse.aether.collection.DependencyGraphTransformer;
+import org.eclipse.aether.collection.DependencyManager;
+import org.eclipse.aether.collection.DependencySelector;
+import org.eclipse.aether.collection.DependencyTraverser;
+import org.eclipse.aether.impl.ArtifactDescriptorReader;
+import org.eclipse.aether.impl.DefaultServiceLocator;
+import org.eclipse.aether.impl.MetadataGeneratorFactory;
+import org.eclipse.aether.impl.VersionRangeResolver;
+import org.eclipse.aether.impl.VersionResolver;
+import org.eclipse.aether.util.artifact.DefaultArtifactTypeRegistry;
+import org.eclipse.aether.util.graph.manager.ClassicDependencyManager;
+import org.eclipse.aether.util.graph.selector.AndDependencySelector;
+import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
+import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
+import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
+import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
+import org.eclipse.aether.util.graph.transformer.ConflictResolver;
+import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
+import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver;
+import org.eclipse.aether.util.graph.transformer.JavaScopeSelector;
+import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
+import org.eclipse.aether.util.graph.transformer.SimpleOptionalitySelector;
+import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
+import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
+
+/**
+ * A utility class to assist in setting up a Maven-like repository system. <em>Note:</em> This component is meant to
+ * assist those clients that employ the repository system outside of an IoC container, Maven plugins should instead
+ * always use regular dependency injection to acquire the repository system.
+ * 
+ * @author Benjamin Bentmann
+ */
+public final class MavenRepositorySystemUtils
+{
+
+    private MavenRepositorySystemUtils()
+    {
+        // hide constructor
+    }
+
+    /**
+     * Creates a new service locator that already knows about all service implementations included in this library. To
+     * acquire a complete repository system, clients need to add some repository connectors for remote transfers.
+     * 
+     * @return The new service locator, never {@code null}.
+     */
+    public static DefaultServiceLocator newServiceLocator()
+    {
+        DefaultServiceLocator locator = new DefaultServiceLocator();
+        locator.addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
+        locator.addService( VersionResolver.class, DefaultVersionResolver.class );
+        locator.addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
+        locator.addService( MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class );
+        locator.addService( MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class );
+        return locator;
+    }
+
+    /**
+     * Creates a new Maven-like repository system session by initializing the session with values typical for
+     * Maven-based resolution. In more detail, this method configures settings relevant for the processing of dependency
+     * graphs, most other settings remain at their generic default value. Use the various setters to further configure
+     * the session with authentication, mirror, proxy and other information required for your environment.
+     * 
+     * @return The new repository system session, never {@code null}.
+     */
+    public static DefaultRepositorySystemSession newSession()
+    {
+        DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
+
+        DependencyTraverser depTraverser = new FatArtifactTraverser();
+        session.setDependencyTraverser( depTraverser );
+
+        DependencyManager depManager = new ClassicDependencyManager();
+        session.setDependencyManager( depManager );
+
+        DependencySelector depFilter =
+            new AndDependencySelector( new ScopeDependencySelector( "test", "provided" ),
+                                       new OptionalDependencySelector(), new ExclusionDependencySelector() );
+        session.setDependencySelector( depFilter );
+
+        DependencyGraphTransformer transformer =
+            new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(),
+                                  new SimpleOptionalitySelector(), new JavaScopeDeriver() );
+        new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() );
+        session.setDependencyGraphTransformer( transformer );
+
+        DefaultArtifactTypeRegistry stereotypes = new DefaultArtifactTypeRegistry();
+        stereotypes.add( new DefaultArtifactType( "pom" ) );
+        stereotypes.add( new DefaultArtifactType( "maven-plugin", "jar", "", "java" ) );
+        stereotypes.add( new DefaultArtifactType( "jar", "jar", "", "java" ) );
+        stereotypes.add( new DefaultArtifactType( "ejb", "jar", "", "java" ) );
+        stereotypes.add( new DefaultArtifactType( "ejb-client", "jar", "client", "java" ) );
+        stereotypes.add( new DefaultArtifactType( "test-jar", "jar", "tests", "java" ) );
+        stereotypes.add( new DefaultArtifactType( "javadoc", "jar", "javadoc", "java" ) );
+        stereotypes.add( new DefaultArtifactType( "java-source", "jar", "sources", "java", false, false ) );
+        stereotypes.add( new DefaultArtifactType( "war", "war", "", "java", false, true ) );
+        stereotypes.add( new DefaultArtifactType( "ear", "ear", "", "java", false, true ) );
+        stereotypes.add( new DefaultArtifactType( "rar", "rar", "", "java", false, true ) );
+        stereotypes.add( new DefaultArtifactType( "par", "par", "", "java", false, true ) );
+        session.setArtifactTypeRegistry( stereotypes );
+
+        session.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, true ) );
+
+        Properties sysProps = System.getProperties();
+        session.setSystemProperties( sysProps );
+        session.setConfigProperties( sysProps );
+
+        return session;
+    }
+
+}
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenServiceLocator.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenServiceLocator.java
deleted file mode 100644
index db55665..0000000
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenServiceLocator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.repository.internal;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.sonatype.aether.impl.ArtifactDescriptorReader;
-import org.sonatype.aether.impl.internal.DefaultServiceLocator;
-import org.sonatype.aether.impl.MetadataGeneratorFactory;
-import org.sonatype.aether.impl.VersionRangeResolver;
-import org.sonatype.aether.impl.VersionResolver;
-
-/**
- * A simple service locator that is already setup with all components from this library. To acquire a complete
- * repository system, clients need to add some repository connectors for remote transfers. <em>Note:</em> This component
- * is meant to assist those clients that employ the repository systems outside of an IoC container, Maven plugins
- * should instead always use regular dependency injection to acquire the repository system.
- * 
- * @author Benjamin Bentmann
- */
-public class MavenServiceLocator
-    extends DefaultServiceLocator
-{
-
-    /**
-     * Creates a new service locator that already knows about all service implementations included in this library.
-     */
-    public MavenServiceLocator()
-    {
-        addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
-        addService( VersionResolver.class, DefaultVersionResolver.class );
-        addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
-        addService( MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class );
-        addService( MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class );
-    }
-
-}
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java
new file mode 100644
index 0000000..1e6f909
--- /dev/null
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java
@@ -0,0 +1,100 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.maven.artifact.repository.metadata.Metadata;
+import org.eclipse.aether.artifact.Artifact;
+
+/**
+ * @author Hervé Boutemy
+ */
+abstract class MavenSnapshotMetadata
+    extends MavenMetadata
+{
+    static final String SNAPSHOT = "SNAPSHOT";
+
+    protected final Collection<Artifact> artifacts = new ArrayList<Artifact>();
+
+    protected final boolean legacyFormat;
+
+    protected MavenSnapshotMetadata( Metadata metadata, File file, boolean legacyFormat )
+    {
+        super( metadata, file );
+        this.legacyFormat = legacyFormat;
+    }
+
+    protected static Metadata createRepositoryMetadata( Artifact artifact, boolean legacyFormat )
+    {
+        Metadata metadata = new Metadata();
+        if ( !legacyFormat )
+        {
+            metadata.setModelVersion( "1.1.0" );
+        }
+        metadata.setGroupId( artifact.getGroupId() );
+        metadata.setArtifactId( artifact.getArtifactId() );
+        metadata.setVersion( artifact.getBaseVersion() );
+
+        return metadata;
+    }
+
+    public void bind( Artifact artifact )
+    {
+        artifacts.add( artifact );
+    }
+
+    public Object getKey()
+    {
+        return getGroupId() + ':' + getArtifactId() + ':' + getVersion();
+    }
+
+    public static Object getKey( Artifact artifact )
+    {
+        return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getBaseVersion();
+    }
+
+    protected String getKey( String classifier, String extension )
+    {
+        return classifier + ':' + extension;
+    }
+
+    public String getGroupId()
+    {
+        return metadata.getGroupId();
+    }
+
+    public String getArtifactId()
+    {
+        return metadata.getArtifactId();
+    }
+
+    public String getVersion()
+    {
+        return metadata.getVersion();
+    }
+
+    public Nature getNature()
+    {
+        return Nature.SNAPSHOT;
+    }
+}
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
index 3acc3cb..958eb38 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
@@ -22,8 +22,8 @@ package org.apache.maven.repository.internal;
 import java.io.File;
 import java.util.Map;
 
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.util.artifact.AbstractArtifact;
+import org.eclipse.aether.artifact.AbstractArtifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * @author Benjamin Bentmann
@@ -88,16 +88,6 @@ final class RelocatedArtifact
         }
     }
 
-    public String getBaseVersion()
-    {
-        return toBaseVersion( getVersion() );
-    }
-
-    public boolean isSnapshot()
-    {
-        return isSnapshot( getVersion() );
-    }
-
     public String getClassifier()
     {
         return artifact.getClassifier();
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java
index 4ce4393..60b8749 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java
@@ -23,7 +23,6 @@ import java.io.File;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Date;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -33,52 +32,25 @@ import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.artifact.repository.metadata.Snapshot;
 import org.apache.maven.artifact.repository.metadata.SnapshotVersion;
 import org.apache.maven.artifact.repository.metadata.Versioning;
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * @author Benjamin Bentmann
  */
 final class RemoteSnapshotMetadata
-    extends MavenMetadata
+    extends MavenSnapshotMetadata
 {
 
-    private static final String SNAPSHOT = "SNAPSHOT";
-
-    private final Collection<Artifact> artifacts = new ArrayList<Artifact>();
-
     private final Map<String, SnapshotVersion> versions = new LinkedHashMap<String, SnapshotVersion>();
 
-    private final boolean legacyFormat;
-
     public RemoteSnapshotMetadata( Artifact artifact, boolean legacyFormat )
     {
-        super( createMetadata( artifact, legacyFormat ), null );
-        this.legacyFormat = legacyFormat;
+        super( createRepositoryMetadata( artifact, legacyFormat ), null, legacyFormat );
     }
 
     private RemoteSnapshotMetadata( Metadata metadata, File file, boolean legacyFormat )
     {
-        super( metadata, file );
-        this.legacyFormat = legacyFormat;
-    }
-
-    private static Metadata createMetadata( Artifact artifact, boolean legacyFormat )
-    {
-        Metadata metadata = new Metadata();
-        if ( !legacyFormat )
-        {
-            metadata.setModelVersion( "1.1.0" );
-        }
-        metadata.setGroupId( artifact.getGroupId() );
-        metadata.setArtifactId( artifact.getArtifactId() );
-        metadata.setVersion( artifact.getBaseVersion() );
-
-        return metadata;
-    }
-
-    public void bind( Artifact artifact )
-    {
-        artifacts.add( artifact );
+        super( metadata, file, legacyFormat );
     }
 
     public MavenMetadata setFile( File file )
@@ -86,16 +58,6 @@ final class RemoteSnapshotMetadata
         return new RemoteSnapshotMetadata( metadata, file, legacyFormat );
     }
 
-    public Object getKey()
-    {
-        return getGroupId() + ':' + getArtifactId() + ':' + getVersion();
-    }
-
-    public static Object getKey( Artifact artifact )
-    {
-        return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getBaseVersion();
-    }
-
     public String getExpandedVersion( Artifact artifact )
     {
         String key = getKey( artifact.getClassifier(), artifact.getExtension() );
@@ -136,7 +98,7 @@ final class RemoteSnapshotMetadata
 
             if ( version.endsWith( SNAPSHOT ) )
             {
-                String qualifier = snapshot.getTimestamp() + "-" + snapshot.getBuildNumber();
+                String qualifier = snapshot.getTimestamp() + '-' + snapshot.getBuildNumber();
                 version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
             }
 
@@ -145,6 +107,7 @@ final class RemoteSnapshotMetadata
             sv.setExtension( artifact.getExtension() );
             sv.setVersion( version );
             sv.setUpdated( lastUpdated );
+
             versions.put( getKey( sv.getClassifier(), sv.getExtension() ), sv );
         }
 
@@ -169,11 +132,6 @@ final class RemoteSnapshotMetadata
         }
     }
 
-    private String getKey( String classifier, String extension )
-    {
-        return classifier + ':' + extension;
-    }
-
     private static int getBuildNumber( Metadata metadata )
     {
         int number = 0;
@@ -191,24 +149,4 @@ final class RemoteSnapshotMetadata
         return number;
     }
 
-    public String getGroupId()
-    {
-        return metadata.getGroupId();
-    }
-
-    public String getArtifactId()
-    {
-        return metadata.getArtifactId();
-    }
-
-    public String getVersion()
-    {
-        return metadata.getVersion();
-    }
-
-    public Nature getNature()
-    {
-        return Nature.SNAPSHOT;
-    }
-
 }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java
index d56eed8..6cbeec5 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java
@@ -24,12 +24,12 @@ import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.sonatype.aether.ConfigurationProperties;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.deployment.DeployRequest;
-import org.sonatype.aether.impl.MetadataGenerator;
-import org.sonatype.aether.metadata.Metadata;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.impl.MetadataGenerator;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.util.ConfigUtils;
 
 /**
  * @author Benjamin Bentmann
@@ -44,7 +44,7 @@ class RemoteSnapshotMetadataGenerator
 
     public RemoteSnapshotMetadataGenerator( RepositorySystemSession session, DeployRequest request )
     {
-        legacyFormat = ConfigurationProperties.get( session.getConfigProperties(), "maven.metadata.legacy", false );
+        legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" );
 
         snapshots = new LinkedHashMap<Object, RemoteSnapshotMetadata>();
 
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
index 60e9c3e..79ffaad 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
@@ -20,11 +20,11 @@ package org.apache.maven.repository.internal;
  */
 
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.deployment.DeployRequest;
-import org.sonatype.aether.impl.MetadataGenerator;
-import org.sonatype.aether.impl.MetadataGeneratorFactory;
-import org.sonatype.aether.installation.InstallRequest;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.impl.MetadataGenerator;
+import org.eclipse.aether.impl.MetadataGeneratorFactory;
+import org.eclipse.aether.installation.InstallRequest;
 
 /**
  * @author Benjamin Bentmann
@@ -44,7 +44,7 @@ public class SnapshotMetadataGeneratorFactory
         return new RemoteSnapshotMetadataGenerator( session, request );
     }
 
-    public int getPriority()
+    public float getPriority()
     {
         return 10;
     }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java
index 139e5f8..adaca9d 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java
@@ -26,8 +26,8 @@ import java.util.LinkedHashSet;
 
 import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.artifact.repository.metadata.Versioning;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.util.artifact.ArtifactProperties;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.ArtifactProperties;
 
 /**
  * @author Benjamin Bentmann
@@ -40,18 +40,22 @@ final class VersionsMetadata
 
     public VersionsMetadata( Artifact artifact )
     {
-        super( createMetadata( artifact ), null );
+        super( createRepositoryMetadata( artifact ), null );
         this.artifact = artifact;
     }
 
     public VersionsMetadata( Artifact artifact, File file )
     {
-        super( createMetadata( artifact ), file );
+        super( createRepositoryMetadata( artifact ), file );
         this.artifact = artifact;
     }
 
-    private static Metadata createMetadata( Artifact artifact )
+    private static Metadata createRepositoryMetadata( Artifact artifact )
     {
+        Metadata metadata = new Metadata();
+        metadata.setGroupId( artifact.getGroupId() );
+        metadata.setArtifactId( artifact.getArtifactId() );
+
         Versioning versioning = new Versioning();
         versioning.addVersion( artifact.getBaseVersion() );
         if ( !artifact.isSnapshot() )
@@ -63,10 +67,7 @@ final class VersionsMetadata
             versioning.setLatest( artifact.getBaseVersion() );
         }
 
-        Metadata metadata = new Metadata();
         metadata.setVersioning( versioning );
-        metadata.setGroupId( artifact.getGroupId() );
-        metadata.setArtifactId( artifact.getArtifactId() );
 
         return metadata;
     }
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java
index db1c412..e2f5e82 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java
@@ -25,12 +25,12 @@ import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.deployment.DeployRequest;
-import org.sonatype.aether.impl.MetadataGenerator;
-import org.sonatype.aether.installation.InstallRequest;
-import org.sonatype.aether.metadata.Metadata;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.impl.MetadataGenerator;
+import org.eclipse.aether.installation.InstallRequest;
+import org.eclipse.aether.metadata.Metadata;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
index a1e986f..47ef360 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
@@ -20,11 +20,11 @@ package org.apache.maven.repository.internal;
  */
 
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.deployment.DeployRequest;
-import org.sonatype.aether.impl.MetadataGenerator;
-import org.sonatype.aether.impl.MetadataGeneratorFactory;
-import org.sonatype.aether.installation.InstallRequest;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.impl.MetadataGenerator;
+import org.eclipse.aether.impl.MetadataGeneratorFactory;
+import org.eclipse.aether.installation.InstallRequest;
 
 /**
  * @author Benjamin Bentmann
@@ -44,7 +44,7 @@ public class VersionsMetadataGeneratorFactory
         return new VersionsMetadataGenerator( session, request );
     }
 
-    public int getPriority()
+    public float getPriority()
     {
         return 5;
     }
diff --git a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/package-info.java
similarity index 77%
copy from maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
copy to maven-aether-provider/src/main/java/org/apache/maven/repository/internal/package-info.java
index 4dec0ee..826a5c0 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/package-info.java
@@ -1,4 +1,7 @@
-package org.apache.maven.exception;
+/**
+ * <a href="http://www.eclipse.org/aether/">Aether</a> extensions for utilizing the Maven POM and Maven repository metadata.
+ */
+package org.apache.maven.repository.internal;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,7 +12,7 @@ package org.apache.maven.exception;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -17,9 +20,4 @@ package org.apache.maven.exception;
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
-
-public interface ExceptionHandler    
-{
-    ExceptionSummary handleException( Throwable e );
-}
+ */
\ No newline at end of file
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/package.html b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/package.html
deleted file mode 100644
index b36134b..0000000
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/package.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<body>
-  <p><a href="http://aether.sonatype.org/">Aether</a> extensions for utilizing the Maven POM and Maven repository metadata.</p>
-</body>
\ No newline at end of file
diff --git a/maven-aether-provider/src/site/apt/index.apt b/maven-aether-provider/src/site/apt/index.apt
new file mode 100644
index 0000000..600ec41
--- /dev/null
+++ b/maven-aether-provider/src/site/apt/index.apt
@@ -0,0 +1,33 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
+ Introduction
+ -----
+ Hervé Boutemy
+ -----
+ 2012-09-29
+ -----
+
+Maven Aether Provider
+
+ Maven Aether Provider is an {{{http://www.eclipse.org/aether/}Aether}} extension to support
+ Maven POMs and local+remote repositories.
+
+ Main component is <<<MavenRepositorySystemUtils>>>
+ ({{{./apidocs/org/apache/maven/repository/internal/MavenRepositorySystemUtils.html}javadoc}},
+ {{{./xref/org/apache/maven/repository/internal/MavenRepositorySystemUtils.html}source}}).
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java
new file mode 100644
index 0000000..eea3830
--- /dev/null
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java
@@ -0,0 +1,85 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.MalformedURLException;
+
+import org.apache.maven.repository.internal.util.ConsoleRepositoryListener;
+import org.apache.maven.repository.internal.util.ConsoleTransferListener;
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.PlexusTestCase;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+
+public abstract class AbstractRepositoryTestCase
+    extends PlexusTestCase
+{
+    protected RepositorySystem system;
+
+    protected RepositorySystemSession session;
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        system = lookup( RepositorySystem.class );
+        session = newMavenRepositorySystemSession( system );
+    }
+
+    @Override
+    protected void tearDown()
+        throws Exception
+    {
+        session = null;
+        system = null;
+        super.tearDown();
+    }
+
+    public static RepositorySystemSession newMavenRepositorySystemSession( RepositorySystem system )
+    {
+        DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
+
+        LocalRepository localRepo = new LocalRepository( "target/local-repo" );
+        session.setLocalRepositoryManager( system.newLocalRepositoryManager( session, localRepo ) );
+
+        session.setTransferListener( new ConsoleTransferListener() );
+        session.setRepositoryListener( new ConsoleRepositoryListener() );
+
+        return session;
+    }
+
+    public static RemoteRepository newTestRepository()
+        throws MalformedURLException
+    {
+        return new RemoteRepository.Builder( "repo", "default",
+                                             getTestFile( "target/test-classes/repo" ).toURI().toURL().toString() ).build();
+    }
+}
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java
new file mode 100644
index 0000000..a7b1db2
--- /dev/null
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java
@@ -0,0 +1,77 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositoryEvent.EventType;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.impl.ArtifactDescriptorReader;
+import org.eclipse.aether.impl.RepositoryEventDispatcher;
+import org.eclipse.aether.resolution.ArtifactDescriptorRequest;
+import org.mockito.ArgumentCaptor;
+
+public class DefaultArtifactDescriptorReaderTest
+    extends AbstractRepositoryTestCase
+{
+
+    public void testMng5459()
+        throws Exception
+    {
+        // prepare
+        DefaultArtifactDescriptorReader reader = (DefaultArtifactDescriptorReader) lookup( ArtifactDescriptorReader.class );
+        
+        RepositoryEventDispatcher eventDispatcher = mock( RepositoryEventDispatcher.class );
+        
+        ArgumentCaptor<RepositoryEvent> event = ArgumentCaptor.forClass( RepositoryEvent.class );
+        
+        reader.setRepositoryEventDispatcher( eventDispatcher );
+
+        ArtifactDescriptorRequest request = new ArtifactDescriptorRequest();
+        
+        request.addRepository( newTestRepository() );
+        
+        request.setArtifact( new DefaultArtifact( "org.apache.maven.its", "dep-mng5459", "jar", "0.4.0-SNAPSHOT" ) );
+        
+        // execute
+        reader.readArtifactDescriptor( session, request );
+
+        // verify
+        verify( eventDispatcher ).dispatch( event.capture() );
+
+        boolean missingArtifactDescriptor = false;
+        
+        for( RepositoryEvent evt : event.getAllValues() )
+        {
+            if ( EventType.ARTIFACT_DESCRIPTOR_MISSING.equals( evt.getType() ) )
+            {
+                assertEquals( "Could not find artifact org.apache.maven.its:dep-mng5459:pom:0.4.0-20130404.090532-2 in repo (" + newTestRepository().getUrl() + ")", evt.getException().getMessage() );
+                missingArtifactDescriptor = true;
+            }
+        }
+        
+        if( !missingArtifactDescriptor )
+        {
+            fail( "Expected missing artifact descriptor for org.apache.maven.its:dep-mng5459:pom:0.4.0-20130404.090532-2" );
+        }
+    }
+}
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java
new file mode 100644
index 0000000..90dd6a4
--- /dev/null
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java
@@ -0,0 +1,96 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.impl.VersionResolver;
+import org.eclipse.aether.resolution.VersionRequest;
+import org.eclipse.aether.resolution.VersionResult;
+import org.eclipse.aether.artifact.DefaultArtifact;
+
+public class DefaultVersionResolverTest
+    extends AbstractRepositoryTestCase
+{
+    private DefaultVersionResolver versionResolver;
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        // be sure we're testing the right class, i.e. DefaultVersionResolver.class
+        versionResolver = (DefaultVersionResolver) lookup( VersionResolver.class, "default" );
+    }
+
+    @Override
+    protected void tearDown()
+        throws Exception
+    {
+        versionResolver = null;
+        super.tearDown();
+    }
+
+    public void testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts()
+        throws Exception
+    {
+        VersionRequest requestB = new VersionRequest();
+        requestB.addRepository( newTestRepository() );
+        Artifact artifactB =
+            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierB", "jar", "07.20.3-SNAPSHOT" );
+        requestB.setArtifact( artifactB );
+
+        VersionResult resultB = versionResolver.resolveVersion( session, requestB );
+        assertEquals( "07.20.3-20120809.112920-97", resultB.getVersion() );
+
+        VersionRequest requestA = new VersionRequest();
+        requestA.addRepository( newTestRepository() );
+
+        Artifact artifactA =
+            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierA", "jar", "07.20.3-SNAPSHOT" );
+        requestA.setArtifact( artifactA );
+
+        VersionResult resultA = versionResolver.resolveVersion( session, requestA );
+        assertEquals( "07.20.3-20120809.112124-88", resultA.getVersion() );
+    }
+
+    public void testResolveSeparateInstalledClassifiedNonVersionedArtifacts()
+        throws Exception
+    {
+        VersionRequest requestA = new VersionRequest();
+        requestA.addRepository( newTestRepository() );
+        String versionA = "07.20.3-20120809.112124-88";
+        Artifact artifactA =
+            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierA", "jar", versionA );
+        requestA.setArtifact( artifactA );
+
+        VersionResult resultA = versionResolver.resolveVersion( session, requestA );
+        assertEquals( versionA, resultA.getVersion() );
+
+        VersionRequest requestB = new VersionRequest();
+        requestB.addRepository( newTestRepository() );
+        String versionB = "07.20.3-20120809.112920-97";
+        Artifact artifactB =
+            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierB", "jar", versionB );
+        requestB.setArtifact( artifactB );
+
+        VersionResult resultB = versionResolver.resolveVersion( session, requestB );
+        assertEquals( versionB, resultB.getVersion() );
+    }
+}
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultServiceLocatorTest.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java
similarity index 77%
rename from maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultServiceLocatorTest.java
rename to maven-aether-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java
index 064b675..768835a 100644
--- a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/DefaultServiceLocatorTest.java
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java
@@ -19,26 +19,26 @@ package org.apache.maven.repository.internal;
  * under the License.
  */
 
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.impl.MetadataGeneratorFactory;
-import org.sonatype.aether.spi.locator.ServiceLocator;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.impl.MetadataGeneratorFactory;
+import org.eclipse.aether.spi.locator.ServiceLocator;
 
 import junit.framework.TestCase;
 
-public class DefaultServiceLocatorTest
+public class MavenRepositorySystemUtilsTest
     extends TestCase
 {
 
     public void testGetRepositorySystem()
     {
-        ServiceLocator locator = new MavenServiceLocator();
+        ServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();
         RepositorySystem repoSys = locator.getService( RepositorySystem.class );
         assertNotNull( repoSys );
     }
 
     public void testGetMetadataGeneratorFactories()
     {
-        ServiceLocator locator = new MavenServiceLocator();
+        ServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();
         assertEquals( 2, locator.getServices( MetadataGeneratorFactory.class ).size() );
     }
 
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
new file mode 100644
index 0000000..36bb9c5
--- /dev/null
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
@@ -0,0 +1,220 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.collection.CollectRequest;
+import org.eclipse.aether.collection.CollectResult;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.resolution.ArtifactDescriptorRequest;
+import org.eclipse.aether.resolution.ArtifactDescriptorResult;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.artifact.DefaultArtifact;
+
+public class RepositorySystemTest
+    extends AbstractRepositoryTestCase
+{
+    public void testResolveVersionRange()
+        throws Exception
+    {
+        //VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request )
+        //                throws VersionRangeResolutionException;
+
+    }
+
+    public void testResolveVersion()
+        throws Exception
+    {
+        //VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request )
+        //                throws VersionResolutionException;
+    }
+
+    public void testReadArtifactDescriptor()
+        throws Exception
+    {
+        Artifact artifact = new DefaultArtifact( "ut.simple:artifact:extension:classifier:1.0" );
+
+        ArtifactDescriptorRequest request = new ArtifactDescriptorRequest();
+        request.setArtifact( artifact );
+        request.addRepository( newTestRepository() );
+        
+        ArtifactDescriptorResult result = system.readArtifactDescriptor( session, request );
+
+        List<Dependency> deps = result.getDependencies();
+        assertEquals( 2, deps.size() );
+        checkUtSimpleArtifactDependencies( deps.get( 0 ), deps.get( 1 ) );
+    }
+
+    /**
+     * check ut.simple:artifact:1.0 dependencies
+     */
+    private void checkUtSimpleArtifactDependencies( Dependency dep1, Dependency dep2 )
+    {
+        assertEquals( "compile", dep1.getScope() );
+        assertFalse( dep1.isOptional() );
+        assertEquals( 0, dep1.getExclusions().size() );
+        Artifact depArtifact = dep1.getArtifact();
+        assertEquals( "ut.simple", depArtifact.getGroupId() );
+        assertEquals( "dependency", depArtifact.getArtifactId() );
+        assertEquals( "1.0", depArtifact.getVersion() );
+        assertEquals( "1.0", depArtifact.getBaseVersion() );
+        assertNull( depArtifact.getFile() );
+        assertFalse( depArtifact.isSnapshot() );
+        assertEquals( "", depArtifact.getClassifier() );
+        assertEquals( "jar", depArtifact.getExtension() );
+        assertEquals( "java", depArtifact.getProperty( "language", null ) );
+        assertEquals( "jar", depArtifact.getProperty( "type", null ) );
+        assertEquals( "true", depArtifact.getProperty( "constitutesBuildPath", null ) );
+        assertEquals( "false", depArtifact.getProperty( "includesDependencies", null ) );
+        assertEquals( 4, depArtifact.getProperties().size() );
+
+        assertEquals( "compile", dep2.getScope() );
+        assertFalse( dep2.isOptional() );
+        assertEquals( 0, dep2.getExclusions().size() );
+        depArtifact = dep2.getArtifact();
+        assertEquals( "ut.simple", depArtifact.getGroupId() );
+        assertEquals( "dependency", depArtifact.getArtifactId() );
+        assertEquals( "1.0", depArtifact.getVersion() );
+        assertEquals( "1.0", depArtifact.getBaseVersion() );
+        assertNull( depArtifact.getFile() );
+        assertFalse( depArtifact.isSnapshot() );
+        assertEquals( "sources", depArtifact.getClassifier() );
+        assertEquals( "jar", depArtifact.getExtension() );
+        assertEquals( "java", depArtifact.getProperty( "language", null ) );
+        assertEquals( "jar", depArtifact.getProperty( "type", null ) ); // shouldn't it be java-sources given the classifier?
+        assertEquals( "true", depArtifact.getProperty( "constitutesBuildPath", null ) ); // shouldn't it be false given the classifier?
+        assertEquals( "false", depArtifact.getProperty( "includesDependencies", null ) );
+        assertEquals( 4, depArtifact.getProperties().size() );
+    }
+
+    public void testCollectDependencies()
+        throws Exception
+    {
+        Artifact artifact = new DefaultArtifact( "ut.simple:artifact:extension:classifier:1.0" );
+        // notice: extension and classifier not really used in this test...
+
+        CollectRequest collectRequest = new CollectRequest();
+        collectRequest.setRoot( new Dependency( artifact, null ) );
+        collectRequest.addRepository( newTestRepository() );
+
+        CollectResult collectResult = system.collectDependencies( session, collectRequest );
+
+        List<DependencyNode> nodes = collectResult.getRoot().getChildren();
+        assertEquals( 2, nodes.size() );
+        checkUtSimpleArtifactDependencies( nodes.get( 0 ).getDependency(), nodes.get( 1 ).getDependency() );
+    }
+
+    public void testResolveArtifact()
+        throws Exception
+    {
+        Artifact artifact = new DefaultArtifact( "ut.simple:artifact:1.0" );
+
+        ArtifactRequest artifactRequest = new ArtifactRequest();
+        artifactRequest.setArtifact( artifact );
+        artifactRequest.addRepository( newTestRepository() );
+
+        ArtifactResult artifactResult = system.resolveArtifact( session, artifactRequest );
+        checkArtifactResult( artifactResult, "artifact-1.0.jar" );
+
+        artifact = new DefaultArtifact( "ut.simple:artifact:zip:1.0" );
+        artifactRequest.setArtifact( artifact );
+        artifactResult = system.resolveArtifact( session, artifactRequest );
+        checkArtifactResult( artifactResult, "artifact-1.0.zip" );
+
+        artifact = new DefaultArtifact( "ut.simple:artifact:zip:classifier:1.0" );
+        artifactRequest.setArtifact( artifact );
+        artifactResult = system.resolveArtifact( session, artifactRequest );
+        checkArtifactResult( artifactResult, "artifact-1.0-classifier.zip" );
+    }
+
+    private void checkArtifactResult( ArtifactResult result, String filename )
+    {
+        assertFalse( result.isMissing() );
+        assertTrue( result.isResolved() );
+        Artifact artifact = result.getArtifact();
+        assertNotNull( artifact.getFile() );
+        assertEquals( filename, artifact.getFile().getName() );
+    }
+
+    public void testResolveArtifacts()
+        throws Exception
+    {
+        ArtifactRequest req1 = new ArtifactRequest();
+        req1.setArtifact( new DefaultArtifact( "ut.simple:artifact:1.0" ) );
+        req1.addRepository( newTestRepository() );
+
+        ArtifactRequest req2 = new ArtifactRequest();
+        req2.setArtifact( new DefaultArtifact( "ut.simple:artifact:zip:1.0" ) );
+        req2.addRepository( newTestRepository() );
+
+        ArtifactRequest req3 = new ArtifactRequest();
+        req3.setArtifact( new DefaultArtifact( "ut.simple:artifact:zip:classifier:1.0" ) );
+        req3.addRepository( newTestRepository() );
+
+        List<ArtifactRequest> requests = Arrays.asList( req1, req2, req3 );
+
+        List<ArtifactResult> results = system.resolveArtifacts( session, requests );
+
+        assertEquals( 3, results.size() );
+        checkArtifactResult( results.get( 0 ), "artifact-1.0.jar" );
+        checkArtifactResult( results.get( 1 ), "artifact-1.0.zip" );
+        checkArtifactResult( results.get( 2 ), "artifact-1.0-classifier.zip" );
+    }
+
+    public void testResolveMetadata()
+        throws Exception
+    {
+        //List<MetadataResult> resolveMetadata( RepositorySystemSession session,
+        //                                      Collection<? extends MetadataRequest> requests );
+    }
+
+    public void testInstall()
+        throws Exception
+    {
+        //InstallResult install( RepositorySystemSession session, InstallRequest request )
+        //                throws InstallationException;
+        // release, snapshot unique ou non unique, attachement
+    }
+
+    public void testDeploy()
+        throws Exception
+    {
+        //DeployResult deploy( RepositorySystemSession session, DeployRequest request )
+        //                throws DeploymentException;
+    }
+
+    public void testNewLocalRepositoryManager()
+        throws Exception
+    {
+        //LocalRepositoryManager newLocalRepositoryManager( LocalRepository localRepository );
+    }
+
+    public void testNewSyncContext()
+        throws Exception
+    {
+        //SyncContext newSyncContext( RepositorySystemSession session, boolean shared );
+    }
+
+}
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java
new file mode 100644
index 0000000..2879a9f
--- /dev/null
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java
@@ -0,0 +1,132 @@
+package org.apache.maven.repository.internal.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.PrintStream;
+
+import org.eclipse.aether.AbstractRepositoryListener;
+import org.eclipse.aether.RepositoryEvent;
+
+public class ConsoleRepositoryListener
+    extends AbstractRepositoryListener
+{
+
+    private PrintStream out;
+
+    public ConsoleRepositoryListener()
+    {
+        this( null );
+    }
+
+    public ConsoleRepositoryListener( PrintStream out )
+    {
+        this.out = ( out != null ) ? out : System.out;
+    }
+
+    public void artifactDeployed( RepositoryEvent event )
+    {
+        println( "artifactDeployed", event.getArtifact() + " to " + event.getRepository() );
+    }
+
+    public void artifactDeploying( RepositoryEvent event )
+    {
+        println( "artifactDeploying", event.getArtifact() + " to " + event.getRepository() );
+    }
+
+    public void artifactDescriptorInvalid( RepositoryEvent event )
+    {
+        println( "artifactDescriptorInvalid", "for " + event.getArtifact() + ": " + event.getException().getMessage() );
+    }
+
+    public void artifactDescriptorMissing( RepositoryEvent event )
+    {
+        println( "artifactDescriptorMissing", "for " + event.getArtifact() );
+    }
+
+    public void artifactInstalled( RepositoryEvent event )
+    {
+        println( "artifactInstalled", event.getArtifact() + " to " + event.getFile() );
+    }
+
+    public void artifactInstalling( RepositoryEvent event )
+    {
+        println( "artifactInstalling", event.getArtifact() + " to " + event.getFile() );
+    }
+
+    public void artifactResolved( RepositoryEvent event )
+    {
+        println( "artifactResolved", event.getArtifact() + " from " + event.getRepository() );
+    }
+
+    public void artifactDownloading( RepositoryEvent event )
+    {
+        println( "artifactDownloading", event.getArtifact() + " from " + event.getRepository() );
+    }
+
+    public void artifactDownloaded( RepositoryEvent event )
+    {
+        println( "artifactDownloaded", event.getArtifact() + " from " + event.getRepository() );
+    }
+
+    public void artifactResolving( RepositoryEvent event )
+    {
+        println( "artifactResolving", event.getArtifact().toString() );
+    }
+
+    public void metadataDeployed( RepositoryEvent event )
+    {
+        println( "metadataDeployed", event.getMetadata() + " to " + event.getRepository() );
+    }
+
+    public void metadataDeploying( RepositoryEvent event )
+    {
+        println( "metadataDeploying", event.getMetadata() + " to " + event.getRepository() );
+    }
+
+    public void metadataInstalled( RepositoryEvent event )
+    {
+        println( "metadataInstalled", event.getMetadata() + " to " + event.getFile() );
+    }
+
+    public void metadataInstalling( RepositoryEvent event )
+    {
+        println( "metadataInstalling", event.getMetadata() + " to " + event.getFile() );
+    }
+
+    public void metadataInvalid( RepositoryEvent event )
+    {
+        println( "metadataInvalid", event.getMetadata().toString() );
+    }
+
+    public void metadataResolved( RepositoryEvent event )
+    {
+        println( "metadataResolved", event.getMetadata() + " from " + event.getRepository() );
+    }
+
+    public void metadataResolving( RepositoryEvent event )
+    {
+        println( "metadataResolving", event.getMetadata() + " from " + event.getRepository() );
+    }
+
+    private void println( String event, String message )
+    {
+        out.println( "Aether Repository - " + event + ": " + message );
+    }
+}
diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java
new file mode 100644
index 0000000..fb44283
--- /dev/null
+++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java
@@ -0,0 +1,186 @@
+package org.apache.maven.repository.internal.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.PrintStream;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.eclipse.aether.transfer.AbstractTransferListener;
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transfer.TransferResource;
+
+public class ConsoleTransferListener
+    extends AbstractTransferListener
+{
+
+    private PrintStream out;
+
+    private Map<TransferResource, Long> downloads = new ConcurrentHashMap<TransferResource, Long>();
+
+    private int lastLength;
+
+    public ConsoleTransferListener()
+    {
+        this( null );
+    }
+
+    public ConsoleTransferListener( PrintStream out )
+    {
+        this.out = ( out != null ) ? out : System.out;
+    }
+
+    @Override
+    public void transferInitiated( TransferEvent event )
+    {
+        String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
+
+        println( "transferInitiated", message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
+    }
+
+    @Override
+    public void transferProgressed( TransferEvent event )
+    {
+        TransferResource resource = event.getResource();
+        downloads.put( resource, event.getTransferredBytes() );
+
+        StringBuilder buffer = new StringBuilder( 64 );
+
+        for ( Map.Entry<TransferResource, Long> entry : downloads.entrySet() )
+        {
+            long total = entry.getKey().getContentLength();
+            long complete = entry.getValue();
+
+            buffer.append( getStatus( complete, total ) ).append( "  " );
+        }
+
+        int pad = lastLength - buffer.length();
+        lastLength = buffer.length();
+        pad( buffer, pad );
+        buffer.append( '\r' );
+
+        print( "transferProgressed", buffer.toString() );
+    }
+
+    private String getStatus( long complete, long total )
+    {
+        if ( total >= 1024 )
+        {
+            return toKB( complete ) + "/" + toKB( total ) + " KB ";
+        }
+        else if ( total >= 0 )
+        {
+            return complete + "/" + total + " B ";
+        }
+        else if ( complete >= 1024 )
+        {
+            return toKB( complete ) + " KB ";
+        }
+        else
+        {
+            return complete + " B ";
+        }
+    }
+
+    private void pad( StringBuilder buffer, int spaces )
+    {
+        String block = "                                        ";
+        while ( spaces > 0 )
+        {
+            int n = Math.min( spaces, block.length() );
+            buffer.append( block, 0, n );
+            spaces -= n;
+        }
+    }
+
+    @Override
+    public void transferSucceeded( TransferEvent event )
+    {
+        transferCompleted( event );
+
+        TransferResource resource = event.getResource();
+        long contentLength = event.getTransferredBytes();
+        if ( contentLength >= 0 )
+        {
+            String type = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
+            String len = contentLength >= 1024 ? toKB( contentLength ) + " KB" : contentLength + " B";
+
+            String throughput = "";
+            long duration = System.currentTimeMillis() - resource.getTransferStartTime();
+            if ( duration > 0 )
+            {
+                DecimalFormat format = new DecimalFormat( "0.0", new DecimalFormatSymbols( Locale.ENGLISH ) );
+                double kbPerSec = ( contentLength / 1024.0 ) / ( duration / 1000.0 );
+                throughput = " at " + format.format( kbPerSec ) + " KB/sec";
+            }
+
+            println( "transferSucceeded", type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " ("
+                + len + throughput + ")" );
+        }
+    }
+
+    @Override
+    public void transferFailed( TransferEvent event )
+    {
+        transferCompleted( event );
+
+        println( "transferFailed", event.getException().getClass() + ": " + event.getException().getMessage()  );
+    }
+
+    private void transferCompleted( TransferEvent event )
+    {
+        downloads.remove( event.getResource() );
+
+        StringBuilder buffer = new StringBuilder( 64 );
+        pad( buffer, lastLength );
+        buffer.append( '\r' );
+        out.println( buffer );
+    }
+
+    @Override
+    public void transferCorrupted( TransferEvent event )
+    {
+        println( "transferCorrupted", event.getException().getClass() + ": " + event.getException().getMessage() );
+    }
+
+    protected long toKB( long bytes )
+    {
+        return ( bytes + 1023 ) / 1024;
+    }
+
+    private void println( String event, String message )
+    {
+        print( event, message );
+        out.println();
+    }
+
+    private void print( String event, String message )
+    {
+        out.print( "Aether Transfer - " + event );
+        if ( message != null )
+        {
+            out.print( ": " );
+            out.print( message );
+        }
+    }
+}
diff --git a/maven-aether-provider/src/test/resources/repo/org/apache/maven/its/dep-mng5324/07.20.3-SNAPSHOT/maven-metadata.xml b/maven-aether-provider/src/test/resources/repo/org/apache/maven/its/dep-mng5324/07.20.3-SNAPSHOT/maven-metadata.xml
new file mode 100644
index 0000000..9f0a7fe
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/org/apache/maven/its/dep-mng5324/07.20.3-SNAPSHOT/maven-metadata.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<metadata xmlns="http://maven.apache.org/METADATA/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/METADATA/1.1.0 http://maven.apache.org/xsd/metadata-1.1.0.xsd"
+  modelVersion="1.1.0">
+  <groupId>org.apache.maven.its</groupId>
+  <artifactId>dep-mng5324</artifactId>
+  <version>07.20.3-SNAPSHOT</version><!-- metadata for artifact snapshot -->
+  <versioning>
+    <snapshot>
+      <timestamp>20120809.112920</timestamp>
+      <buildNumber>97</buildNumber>
+    </snapshot>
+    <lastUpdated>20120809112920</lastUpdated>
+    <snapshotVersions>
+      <snapshotVersion>
+        <classifier>classifierA</classifier>
+        <extension>jar</extension>
+        <value>07.20.3-20120809.112124-88</value>
+        <updated>20120809112124</updated>
+      </snapshotVersion>
+      <snapshotVersion>
+        <classifier>classifierB</classifier>
+        <extension>jar</extension>
+        <value>07.20.3-20120809.112920-97</value>
+        <updated>20120809112920</updated>
+      </snapshotVersion>
+    </snapshotVersions>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/org/apache/maven/its/dep-mng5459/0.4.0-SNAPSHOT/maven-metadata.xml b/maven-aether-provider/src/test/resources/repo/org/apache/maven/its/dep-mng5459/0.4.0-SNAPSHOT/maven-metadata.xml
new file mode 100644
index 0000000..923f26f
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/org/apache/maven/its/dep-mng5459/0.4.0-SNAPSHOT/maven-metadata.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<metadata xmlns="http://maven.apache.org/METADATA/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/METADATA/1.1.0 http://maven.apache.org/xsd/metadata-1.1.0.xsd"
+  modelVersion="1.1.0">
+  <groupId>org.apache.maven.its</groupId>
+  <artifactId>dep-mng5459</artifactId>
+  <version>0.4.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <timestamp>20130404.090532</timestamp>
+      <buildNumber>2</buildNumber>
+    </snapshot>
+    <lastUpdated>20130404093657</lastUpdated>
+    <snapshotVersions>
+      <snapshotVersion>
+        <extension>pom</extension>
+        <value>0.4.0-20130404.090532-2</value>
+        <updated>20130404090532</updated>
+      </snapshotVersion>
+      <snapshotVersion>
+        <extension>jar</extension>
+        <value>0.4.0-20130404.093655-3</value>
+        <updated>20130404093655</updated>
+      </snapshotVersion>
+    </snapshotVersions>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0-classifier.zip b/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0-classifier.zip
new file mode 100644
index 0000000..e69de29
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom b/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom
new file mode 100644
index 0000000..f8b72af
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>ut.simple</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>artifact</artifactId>
+
+  <name>Simple Unit Test Artifact</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>ut.simple</groupId>
+      <artifactId>dependency</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>ut.simple</groupId>
+      <artifactId>dependency</artifactId>
+      <version>1.0</version>
+      <classifier>sources</classifier>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.zip b/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.zip
new file mode 100644
index 0000000..e69de29
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/maven-metadata.xml b/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/maven-metadata.xml
new file mode 100644
index 0000000..2de7ecc
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/maven-metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<metadata xmlns="http://maven.apache.org/METADATA/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/METADATA/1.1.0 http://maven.apache.org/xsd/metadata-1.1.0.xsd">
+  <groupId>ut.simple</groupId>
+  <artifactId>artifact</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20111123122038</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0.pom b/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0.pom
new file mode 100644
index 0000000..c021dfa
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0.pom
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>ut.simple</groupId>
+  <artifactId>dependency</artifactId>
+  <version>1.0</version>
+
+  <name>Simple Unit Test Dependency</name>
+</project>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/maven-metadata.xml b/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/maven-metadata.xml
new file mode 100644
index 0000000..8a97c34
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/maven-metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<metadata xmlns="http://maven.apache.org/METADATA/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/METADATA/1.1.0 http://maven.apache.org/xsd/metadata-1.1.0.xsd">
+  <groupId>ut.simple</groupId>
+  <artifactId>dependency</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20111123122038</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/parent/1.0/parent-1.0.pom b/maven-aether-provider/src/test/resources/repo/ut/simple/parent/1.0/parent-1.0.pom
new file mode 100644
index 0000000..ed64c9e
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/ut/simple/parent/1.0/parent-1.0.pom
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>ut.simple</groupId>
+  <artifactId>parent</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <name>Simple Unit Test Parent</name>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>ut.simple</groupId>
+        <artifactId>dependency</artifactId>
+        <version>1.0</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+</project>
\ No newline at end of file
diff --git a/maven-aether-provider/src/test/resources/repo/ut/simple/parent/maven-metadata.xml b/maven-aether-provider/src/test/resources/repo/ut/simple/parent/maven-metadata.xml
new file mode 100644
index 0000000..7199d52
--- /dev/null
+++ b/maven-aether-provider/src/test/resources/repo/ut/simple/parent/maven-metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<metadata xmlns="http://maven.apache.org/METADATA/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/METADATA/1.1.0 http://maven.apache.org/xsd/metadata-1.1.0.xsd">
+  <groupId>ut.simple</groupId>
+  <artifactId>parent</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20111123122038</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 94ae1d4..673540c 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -16,13 +16,19 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-artifact</artifactId>
 
   <name>Maven Artifact</name>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
index 338c612..b26ad9f 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
@@ -32,6 +32,10 @@ import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
 import org.apache.maven.artifact.versioning.VersionRange;
 
+/**
+ * Maven Artifact interface. Notice that it mixes artifact definition concepts (groupId, artifactId, version)
+ * with dependency information (version range, scope). 
+ */
 public interface Artifact
     extends Comparable<Artifact>
 {
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java
index acc906f..9ef3038 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java
@@ -19,7 +19,6 @@ package org.apache.maven.artifact.repository;
  * under the License.
  */
 
-
 import java.util.List;
 
 import org.apache.maven.artifact.Artifact;
@@ -27,6 +26,10 @@ import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.repository.Proxy;
 
+/**
+ * Abstraction of an artifact repository. Artifact repositories can be remote, local, or even build reactor or
+ * IDE workspace.
+ */
 public interface ArtifactRepository
 {
     String pathOf( Artifact artifact );
@@ -73,6 +76,12 @@ public interface ArtifactRepository
     //
     // New interface methods for the repository system.
     //
+    /**
+     *
+     * @param artifact
+     * @return
+     * @since 3.0-alpha-3
+     */
     Artifact find( Artifact artifact );
 
     /**
@@ -80,6 +89,7 @@ public interface ArtifactRepository
      *
      * @param artifact The artifact whose available versions should be determined, must not be {@code null}.
      * @return The available versions of the artifact or an empty list if none, never {@code null}.
+     * @since 3.0-alpha-3
      */
     List<String> findVersions( Artifact artifact );
 
@@ -88,16 +98,38 @@ public interface ArtifactRepository
      * are examples of such repositories.
      *
      * @return {@code true} if the repository is backed by actual projects, {@code false} otherwise.
+     * @since 3.0-beta-1
      */
     boolean isProjectAware();
 
+    /**
+     * @since 3.0-alpha-3
+     */
     void setAuthentication( Authentication authentication );
+    /**
+     * @since 3.0-alpha-3
+     */
     Authentication getAuthentication();
 
+    /**
+     * @since 3.0-alpha-3
+     */
     void setProxy( Proxy proxy );
+    /**
+     * @since 3.0-alpha-3
+     */
     Proxy getProxy();
 
+    /**
+     * @since 3.0.3
+     * @return the repositories mirrored by the actual one
+     */
     List<ArtifactRepository> getMirroredRepositories();
+
+    /**
+     * @since 3.0.3
+     * @param mirroredRepositories the repositories that the actual one mirrors
+     */
     void setMirroredRepositories( List<ArtifactRepository> mirroredRepositories );
 
 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
index 306c90b..f76e2c1 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
@@ -21,7 +21,6 @@ package org.apache.maven.artifact.repository;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.TimeZone;
 
 /**
  * Describes a set of policies for a repository to use under certain conditions.
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
index d0d3aa3..6f06614 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
@@ -41,11 +41,11 @@ import java.util.Stack;
  * <li>version components in the text can be digits or strings,</li>
  * <li>strings are checked for well-known qualifiers and the qualifier ordering is used for version ordering.
  *     Well-known qualifiers (case insensitive) are:<ul>
- *     <li><code>snapshot</code></li>
  *     <li><code>alpha</code> or <code>a</code></li>
  *     <li><code>beta</code> or <code>b</code></li>
  *     <li><code>milestone</code> or <code>m</code></li>
  *     <li><code>rc</code> or <code>cr</code></li>
+ *     <li><code>snapshot</code></li>
  *     <li><code>(the empty string)</code> or <code>ga</code> or <code>final</code></li>
  *     <li><code>sp</code></li>
  *     </ul>
@@ -69,9 +69,9 @@ public class ComparableVersion
 
     private interface Item
     {
-        final int INTEGER_ITEM = 0;
-        final int STRING_ITEM = 1;
-        final int LIST_ITEM = 2;
+        int INTEGER_ITEM = 0;
+        int STRING_ITEM = 1;
+        int LIST_ITEM = 2;
 
         int compareTo( Item item );
 
@@ -86,7 +86,7 @@ public class ComparableVersion
     private static class IntegerItem
         implements Item
     {
-    	private static final BigInteger BigInteger_ZERO = new BigInteger( "0" );
+        private static final BigInteger BIG_INTEGER_ZERO = new BigInteger( "0" );
 
         private final BigInteger value;
 
@@ -94,7 +94,7 @@ public class ComparableVersion
 
         private IntegerItem()
         {
-            this.value = BigInteger_ZERO;
+            this.value = BIG_INTEGER_ZERO;
         }
 
         public IntegerItem( String str )
@@ -109,14 +109,14 @@ public class ComparableVersion
 
         public boolean isNull()
         {
-            return BigInteger_ZERO.equals( value );
+            return BIG_INTEGER_ZERO.equals( value );
         }
 
         public int compareTo( Item item )
         {
             if ( item == null )
             {
-                return BigInteger_ZERO.equals( value ) ? 0 : 1; // 1.0 == 1, 1.1 > 1
+                return BIG_INTEGER_ZERO.equals( value ) ? 0 : 1; // 1.0 == 1, 1.1 > 1
             }
 
             switch ( item.getType() )
@@ -266,7 +266,7 @@ public class ComparableVersion
 
         void normalize()
         {
-            for( ListIterator<Item> iterator = listIterator( size() ); iterator.hasPrevious(); )
+            for ( ListIterator<Item> iterator = listIterator( size() ); iterator.hasPrevious(); )
             {
                 Item item = iterator.previous();
                 if ( item.isNull() )
@@ -327,7 +327,7 @@ public class ComparableVersion
         public String toString()
         {
             StringBuilder buffer = new StringBuilder( "(" );
-            for( Iterator<Item> iter = iterator(); iter.hasNext(); )
+            for ( Iterator<Item> iter = iterator(); iter.hasNext(); )
             {
                 buffer.append( iter.next() );
                 if ( iter.hasNext() )
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
index b588340..856eb13 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
@@ -72,7 +72,7 @@ public class DefaultArtifactVersion
     {
         if ( otherVersion instanceof DefaultArtifactVersion )
         {
-            return this.comparable.compareTo( ( (DefaultArtifactVersion) otherVersion).comparable );
+            return this.comparable.compareTo( ( (DefaultArtifactVersion) otherVersion ).comparable );
         }
         else
         {
@@ -143,7 +143,7 @@ public class DefaultArtifactVersion
             }
         }
 
-        if ( ( part1.indexOf( "." ) < 0 ) && !part1.startsWith( "0" ) )
+        if ( ( !part1.contains( "." ) ) && !part1.startsWith( "0" ) )
         {
             try
             {
@@ -178,7 +178,7 @@ public class DefaultArtifactVersion
                 }
 
                 // string tokenzier won't detect these and ignores them
-                if ( part1.indexOf( ".." ) >= 0 || part1.startsWith( "." ) || part1.endsWith( "." ) )
+                if ( part1.contains( ".." ) || part1.startsWith( "." ) || part1.endsWith( "." ) )
                 {
                     fallback = true;
                 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
index 5787def..d73d7ea 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
@@ -170,12 +170,8 @@ public class Restriction
             return false;
         }
 
-        if ( upperBoundInclusive != restriction.upperBoundInclusive )
-        {
-            return false;
-        }
+        return upperBoundInclusive == restriction.upperBoundInclusive;
 
-        return true;
     }
 
     public String toString()
diff --git a/maven-artifact/src/site/apt/index.apt b/maven-artifact/src/site/apt/index.apt
new file mode 100644
index 0000000..abe8550
--- /dev/null
+++ b/maven-artifact/src/site/apt/index.apt
@@ -0,0 +1,35 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
+ Introduction
+ -----
+ Hervé Boutemy
+ -----
+ 2012-09-29
+ -----
+
+Maven Artifact
+
+ Maven Artifact classes, providing <<<Artifact>>> component ({{{./apidocs/org/apache/maven/artifact/Artifact.html}javadoc}}),
+ with its <<<DefaultArtifact>>> implementation ({{{./xref/org/apache/maven/artifact/DefaultArtifact.html}source}}).
+
+* Useful entry points
+
+ * artifact version comparison {{{./apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html}javadoc}},
+
+ * {{{./apidocs/org/apache/maven/artifact/versioning/VersionRange.html}version range}}.
diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
index 196e678..e155941 100644
--- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
+++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
@@ -57,7 +57,7 @@ public class VersionRangeTest
         VersionRange range = VersionRange.createFromVersionSpec( "(,1.0]" );
         List<Restriction> restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        Restriction restriction = (Restriction) restrictions.get( 0 );
+        Restriction restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
@@ -70,7 +70,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.0", range.getRecommendedVersion().toString() );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -81,7 +81,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.0]" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.0", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
@@ -93,7 +93,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.2,1.3]" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -105,7 +105,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.0,2.0)" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.0", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "2.0", restriction.getUpperBound().toString() );
@@ -117,7 +117,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.5,)" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.5", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -129,13 +129,13 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "(,1.0],[1.2,)" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
         assertNull( CHECK_VERSION_RECOMMENDATION, range.getRecommendedVersion() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -183,7 +183,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.0", mergedRange.getRecommendedVersion().toString() );
         List<Restriction> restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        Restriction restriction = (Restriction) restrictions.get( 0 );
+        Restriction restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -193,7 +193,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -206,7 +206,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.0", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -218,7 +218,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -230,7 +230,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getLowerBound().toString() );
@@ -242,7 +242,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -254,7 +254,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -266,7 +266,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
@@ -278,7 +278,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -290,7 +290,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -302,7 +302,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
@@ -314,12 +314,12 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.2", mergedRange.getRecommendedVersion().toString() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -331,12 +331,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -348,12 +348,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
         assertFalse( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -365,7 +365,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -377,7 +377,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -389,7 +389,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -401,7 +401,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -413,7 +413,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -425,7 +425,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -437,7 +437,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -449,7 +449,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -468,7 +468,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -480,7 +480,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.4", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -492,12 +492,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -509,12 +509,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertFalse( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -526,12 +526,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -543,12 +543,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertFalse( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -581,12 +581,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -598,17 +598,17 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 3, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 2 );
+        restriction = restrictions.get( 2 );
         assertEquals( CHECK_LOWER_BOUND, "1.5", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.5", restriction.getUpperBound().toString() );
@@ -620,17 +620,17 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 3, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 2 );
+        restriction = restrictions.get( 2 );
         assertEquals( CHECK_LOWER_BOUND, "1.5", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.6", restriction.getUpperBound().toString() );
@@ -661,6 +661,7 @@ public class VersionRangeTest
 
         assertTrue( range.containsVersion( new DefaultArtifactVersion( "1.1-SNAPSHOT" ) ) );
         assertTrue( range.containsVersion( new DefaultArtifactVersion( "1.2-SNAPSHOT" ) ) );
+        assertFalse( range.containsVersion( new DefaultArtifactVersion( "1.0-SNAPSHOT" ) ) );
     }
 
     public void testSnapshotRangeBoundsCanContainSnapshots()
diff --git a/maven-compat/compatibility.cfl b/maven-compat/compatibility.cfl
deleted file mode 100644
index d02d54b..0000000
--- a/maven-compat/compatibility.cfl
+++ /dev/null
@@ -1,79 +0,0 @@
-This document outlines some of the steps that are being taken to ensure as much backward compatibility with tools and plugins
-that are currently written against Maven 2.0.x.
-
-h1. Affected Plugins
-
-h2. Maven Remote Resources Plugin
-* org.apache.maven.project.inheritance.ModelInheritanceAssembler#assembleModelInheritance: used to walk the POMs to find out all the license information. This 
-  functionality has been superceded by the model properties-based system for POM construction. We provide the same functionality using the model
-  properties-based system but have just placed the component as-is in the maven-compat package to ensure the default lifecycle functions.
-* org.apache.maven.project.ProjectUtils: placed in the maven-compat package.
-* org.apache.maven.project.MissingRepositoryElementException ... used by ProjectUtils
-
-h2. Maven Help Plugin
-* org.apache.maven.project.path.PathTranslator: used as a parameter in the EvaluateMojo. The path translator has been replaced the model builder
-  and PomTransformer.
-  
-h1. Affected Components & Classes
-
-h2. Maven Artifact
-
-Maven Artifact will be entirely extricated from the core of Maven 3.x and replaced with Mercury, but we will make a best effort to 
-ensure the compatibility of plugins that use Maven Artifact. There are, however, components and classes that are just so broken or conflict
-with standard ways of doing resolution and conflict reduction that we can't support them.
-
-h3. Supported Compatibility
-* org.apache.maven.artifact.deployer.ArtifactDeployer
-* org.apache.maven.artifact.factory.ArtifactFactory
-* org.apache.maven.artifact.handler.ArtifactHandler
-* org.apache.maven.artifact.installer.ArtifactInstaller
-* org.apache.maven.artifact.manager.WagonManager (1)
-* org.apache.maven.artifact.repository.ArtifactRepository
-* org.apache.maven.artifact.repository.ArtifactRepositoryPolicy
-* org.apache.maven.artifact.repository.ArtifactRepositoryFactory
-* org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout
-* org.apache.maven.artifact.resolver.ArtifactResolver
-* org.apache.maven.artifact.resolver.filter.ArtifactFilter
-* org.apache.maven.artifact.resolver.filter.Artifact
-
-(1) In r746285 various methods have been removed from the WagonManager which breaks the maven-project-info-reports-plugin, the
-maven-site-plugin and the maven-stage-plugin, e.g. due to a linkage error on getAuthentaticationInfo().
-
-h3. Unsupported Compatibility
-* org.apache.maven.artifact.metadata.ArtifactMetadataSource
-* org.apache.maven.artifact.metadata.ResolutionGroup
-* org.apache.maven.artifact.repository.metadata.*
-* org.apache.maven.artifact.resolver.ResolutionNode
-* org.apache.maven.artifact.resolver.ResolutionListener
-* org.apache.maven.artifact.resolver.metadata.*
-* org.apache.maven.artifact.resolver.transform.*
-* org.apache.maven.artifact.resolver.versioning.*
-
-h2. Settings
-
-The settings are historically a CLI-based mechanism for setting preferences. It should have never gone beyond the core into plugins
-or other tools. Unfortunately we allowed the ${settings} expression in plugins and from there it made its way into components like
-the release manager. The release manager in turn never evolved to decouple itself from the settings and it requires a recreation
-of the entire Maven environment to work and grabs the RuntimeInfo info class from the settings in order to do this. Other plugins
-may require this and we'll have to find them them and push them toward using the Invoker where the Maven environment is taken care
-of and restrict/forbid the use of settings in plugins. Everything required is in the exeution request and therefore the session and
-that's all plugins should need.
-
-The changes made relate to MNG-3954, where the RuntimeInfo class needed to be partially rescurrected in order to make the release
-plugin happy.
-
-h2. Changes to the CLI
-* Log file support has been added i.e mvn -l log.txt clean install
-* Plugin registry option has not been supported in the core and it lagged around in the CLI
-
-h2. Repositories
-
-Support for non-unique SNAPSHOT deployments will be dropped.
-
-h2. Profiles
-
-Support for the profiles.xml will be dropped.
-
-h2. Maven 1.x 
-
-Support for the legacy repositories has been dropped.
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 57bcea6..dbb4155 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -16,13 +16,19 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-compat</artifactId>
 
   <name>Maven Compat</name>
-  <description>Maven classes maintained as compatibility layer for tools done with Maven 2.</description>
+  <description>Maven2 classes maintained as compatibility layer.</description>
+
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
 
   <dependencies>
     <dependency>
@@ -54,8 +60,8 @@
       <artifactId>plexus-interpolation</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-inject-plexus</artifactId>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -72,7 +78,7 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-connector-wagon</artifactId>
       <scope>test</scope>
     </dependency>
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
index 574f7d6..c6d02c6 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
@@ -108,7 +108,7 @@ public enum ArtifactScopeEnum
     {
         final ArtifactScopeEnum s = checkScope( scope );
 
-    	// system scope is historic only - and simple
+        // system scope is historic only - and simple
         if ( id == system.id )
         {
             return scope.id == system.id;
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
index cc9e665..abbab82 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
@@ -37,15 +37,15 @@ import org.apache.maven.project.artifact.ProjectArtifactMetadata;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.deployment.DeployRequest;
-import org.sonatype.aether.deployment.DeployResult;
-import org.sonatype.aether.deployment.DeploymentException;
-import org.sonatype.aether.metadata.MergeableMetadata;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.artifact.SubArtifact;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.deployment.DeployResult;
+import org.eclipse.aether.deployment.DeploymentException;
+import org.eclipse.aether.metadata.MergeableMetadata;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.util.artifact.SubArtifact;
 
 @Component( role = ArtifactDeployer.class, instantiationStrategy = "per-lookup" )
 public class DefaultArtifactDeployer
@@ -84,9 +84,9 @@ public class DefaultArtifactDeployer
 
         DeployRequest request = new DeployRequest();
 
-        request.setTrace( DefaultRequestTrace.newChild( null, legacySupport.getSession().getCurrentProject() ) );
+        request.setTrace( RequestTrace.newChild( null, legacySupport.getSession().getCurrentProject() ) );
 
-        org.sonatype.aether.artifact.Artifact mainArtifact = RepositoryUtils.toArtifact( artifact );
+        org.eclipse.aether.artifact.Artifact mainArtifact = RepositoryUtils.toArtifact( artifact );
         mainArtifact = mainArtifact.setFile( source );
         request.addArtifact( mainArtifact );
 
@@ -103,7 +103,7 @@ public class DefaultArtifactDeployer
         {
             if ( metadata instanceof ProjectArtifactMetadata )
             {
-                org.sonatype.aether.artifact.Artifact pomArtifact = new SubArtifact( mainArtifact, "", "pom" );
+                org.eclipse.aether.artifact.Artifact pomArtifact = new SubArtifact( mainArtifact, "", "pom" );
                 pomArtifact = pomArtifact.setFile( ( (ProjectArtifactMetadata) metadata ).getFile() );
                 request.addArtifact( pomArtifact );
             }
@@ -126,8 +126,10 @@ public class DefaultArtifactDeployer
         if ( deploymentRepository instanceof DefaultArtifactRepository
             && deploymentRepository.getAuthentication() == null )
         {
-            remoteRepo.setAuthentication( session.getAuthenticationSelector().getAuthentication( remoteRepo ) );
-            remoteRepo.setProxy( session.getProxySelector().getProxy( remoteRepo ) );
+            RemoteRepository.Builder builder = new RemoteRepository.Builder( remoteRepo );
+            builder.setAuthentication( session.getAuthenticationSelector().getAuthentication( remoteRepo ) );
+            builder.setProxy( session.getProxySelector().getProxy( remoteRepo ) );
+            remoteRepo = builder.build();
         }
         request.setRepository( remoteRepo );
 
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java b/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
index d68a65c..aa924e8 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
@@ -36,12 +36,12 @@ import org.apache.maven.project.artifact.ProjectArtifactMetadata;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.installation.InstallRequest;
-import org.sonatype.aether.installation.InstallationException;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.artifact.SubArtifact;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.installation.InstallRequest;
+import org.eclipse.aether.installation.InstallationException;
+import org.eclipse.aether.util.artifact.SubArtifact;
 
 /**
  * @author Jason van Zyl
@@ -77,9 +77,9 @@ public class DefaultArtifactInstaller
 
         InstallRequest request = new InstallRequest();
 
-        request.setTrace( DefaultRequestTrace.newChild( null, legacySupport.getSession().getCurrentProject() ) );
+        request.setTrace( RequestTrace.newChild( null, legacySupport.getSession().getCurrentProject() ) );
 
-        org.sonatype.aether.artifact.Artifact mainArtifact = RepositoryUtils.toArtifact( artifact );
+        org.eclipse.aether.artifact.Artifact mainArtifact = RepositoryUtils.toArtifact( artifact );
         mainArtifact = mainArtifact.setFile( source );
         request.addArtifact( mainArtifact );
 
@@ -87,7 +87,7 @@ public class DefaultArtifactInstaller
         {
             if ( metadata instanceof ProjectArtifactMetadata )
             {
-                org.sonatype.aether.artifact.Artifact pomArtifact = new SubArtifact( mainArtifact, "", "pom" );
+                org.eclipse.aether.artifact.Artifact pomArtifact = new SubArtifact( mainArtifact, "", "pom" );
                 pomArtifact = pomArtifact.setFile( ( (ProjectArtifactMetadata) metadata ).getFile() );
                 request.addArtifact( pomArtifact );
             }
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
index d24bf12..658dbda 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
@@ -28,7 +28,7 @@ import org.apache.maven.plugin.LegacySupport;
 import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * @author jdcasey
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
index 0f1030b..53adc8d 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
@@ -1,18 +1,22 @@
 package org.apache.maven.artifact.repository.metadata;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 import java.io.File;
@@ -47,7 +51,7 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 /**
  * @author Jason van Zyl
  */
- at Component(role=RepositoryMetadataManager.class)
+ at Component( role = RepositoryMetadataManager.class )
 public class DefaultRepositoryMetadataManager
     extends AbstractLogEnabled
     implements RepositoryMetadataManager
@@ -58,7 +62,8 @@ public class DefaultRepositoryMetadataManager
     @Requirement
     private UpdateCheckManager updateCheckManager;
 
-    public void resolve( RepositoryMetadata metadata, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
+    public void resolve( RepositoryMetadata metadata, List<ArtifactRepository> remoteRepositories,
+                         ArtifactRepository localRepository )
         throws RepositoryMetadataResolutionException
     {
         RepositoryRequest request = new DefaultRepositoryRequest();
@@ -70,7 +75,7 @@ public class DefaultRepositoryMetadataManager
     public void resolve( RepositoryMetadata metadata, RepositoryRequest request )
         throws RepositoryMetadataResolutionException
     {
-        ArtifactRepository localRepository = request.getLocalRepository();
+        ArtifactRepository localRepo = request.getLocalRepository();
         List<ArtifactRepository> remoteRepositories = request.getRemoteRepositories();
 
         if ( !request.isOffline() )
@@ -78,7 +83,7 @@ public class DefaultRepositoryMetadataManager
             Date localCopyLastModified = null;
             if ( metadata.getBaseVersion() != null )
             {
-                localCopyLastModified = getLocalCopyLastModified( localRepository, metadata );
+                localCopyLastModified = getLocalCopyLastModified( localRepo, metadata );
             }
 
             for ( ArtifactRepository repository : remoteRepositories )
@@ -86,8 +91,7 @@ public class DefaultRepositoryMetadataManager
                 ArtifactRepositoryPolicy policy = metadata.getPolicy( repository );
 
                 File file =
-                    new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( metadata,
-                                                                                                           repository ) );
+                    new File( localRepo.getBasedir(), localRepo.pathOfLocalRepositoryMetadata( metadata, repository ) );
                 boolean update;
 
                 if ( !policy.isEnabled() )
@@ -118,13 +122,9 @@ public class DefaultRepositoryMetadataManager
                                                + ") in favor of local copy" );
                     }
                 }
-                else if ( updateCheckManager.isUpdateRequired( metadata, repository, file ) )
-                {
-                    update = true;
-                }
                 else
                 {
-                    update = false;
+                    update = updateCheckManager.isUpdateRequired( metadata, repository, file );
                 }
 
                 if ( update )
@@ -167,11 +167,12 @@ public class DefaultRepositoryMetadataManager
 
         try
         {
-            mergeMetadata( metadata, remoteRepositories, localRepository );
+            mergeMetadata( metadata, remoteRepositories, localRepo );
         }
         catch ( RepositoryMetadataStoreException e )
         {
-            throw new RepositoryMetadataResolutionException( "Unable to store local copy of metadata: " + e.getMessage(), e );
+            throw new RepositoryMetadataResolutionException( "Unable to store local copy of metadata: "
+                + e.getMessage(), e );
         }
     }
 
@@ -182,7 +183,8 @@ public class DefaultRepositoryMetadataManager
         return metadataFile.isFile() ? new Date( metadataFile.lastModified() ) : null;
     }
 
-    private void mergeMetadata( RepositoryMetadata metadata, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
+    private void mergeMetadata( RepositoryMetadata metadata, List<ArtifactRepository> remoteRepositories,
+                                ArtifactRepository localRepository )
         throws RepositoryMetadataStoreException
     {
         // TODO: currently this is first wins, but really we should take the latest by comparing either the
@@ -211,7 +213,9 @@ public class DefaultRepositoryMetadataManager
         updateSnapshotMetadata( metadata, previousMetadata, selected, localRepository );
     }
 
-    private void updateSnapshotMetadata( RepositoryMetadata metadata, Map<ArtifactRepository, Metadata> previousMetadata, ArtifactRepository selected, ArtifactRepository localRepository )
+    private void updateSnapshotMetadata( RepositoryMetadata metadata,
+                                         Map<ArtifactRepository, Metadata> previousMetadata,
+                                         ArtifactRepository selected, ArtifactRepository localRepository )
         throws RepositoryMetadataStoreException
     {
         // TODO: this could be a lot nicer... should really be in the snapshot transformation?
@@ -236,7 +240,8 @@ public class DefaultRepositoryMetadataManager
                 }
                 else
                 {
-                    if ( ( m.getVersioning() != null ) && ( m.getVersioning().getSnapshot() != null ) && m.getVersioning().getSnapshot().isLocalCopy() )
+                    if ( ( m.getVersioning() != null ) && ( m.getVersioning().getSnapshot() != null )
+                        && m.getVersioning().getSnapshot().isLocalCopy() )
                     {
                         m.getVersioning().getSnapshot().setLocalCopy( false );
                         metadata.setMetadata( m );
@@ -249,11 +254,15 @@ public class DefaultRepositoryMetadataManager
         }
     }
 
-    private boolean loadMetadata( RepositoryMetadata repoMetadata, ArtifactRepository remoteRepository, ArtifactRepository localRepository, Map<ArtifactRepository, Metadata> previousMetadata )
+    private boolean loadMetadata( RepositoryMetadata repoMetadata, ArtifactRepository remoteRepository,
+                                  ArtifactRepository localRepository, Map<ArtifactRepository,
+                                  Metadata> previousMetadata )
     {
         boolean setRepository = false;
 
-        File metadataFile = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( repoMetadata, remoteRepository ) );
+        File metadataFile =
+            new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( repoMetadata,
+                                                                                                   remoteRepository ) );
 
         if ( metadataFile.exists() )
         {
@@ -315,11 +324,13 @@ public class DefaultRepositoryMetadataManager
         }
         catch ( IOException e )
         {
-            throw new RepositoryMetadataReadException( "Cannot read metadata from '" + mappingFile + "': " + e.getMessage(), e );
+            throw new RepositoryMetadataReadException( "Cannot read metadata from '" + mappingFile + "': "
+                + e.getMessage(), e );
         }
         catch ( XmlPullParserException e )
         {
-            throw new RepositoryMetadataReadException( "Cannot read metadata from '" + mappingFile + "': " + e.getMessage(), e );
+            throw new RepositoryMetadataReadException( "Cannot read metadata from '" + mappingFile + "': "
+                + e.getMessage(), e );
         }
         finally
         {
@@ -330,8 +341,8 @@ public class DefaultRepositoryMetadataManager
     }
 
     /**
-     * Ensures the last updated timestamp of the specified metadata does not refer to the future and fixes the local metadata if necessary to allow
-     * proper merging/updating of metadata during deployment.
+     * Ensures the last updated timestamp of the specified metadata does not refer to the future and fixes the local
+     * metadata if necessary to allow proper merging/updating of metadata during deployment.
      */
     private void fixTimestamp( File metadataFile, Metadata metadata, Metadata reference )
     {
@@ -387,7 +398,8 @@ public class DefaultRepositoryMetadataManager
         }
     }
 
-    public void resolveAlways( RepositoryMetadata metadata, ArtifactRepository localRepository, ArtifactRepository remoteRepository )
+    public void resolveAlways( RepositoryMetadata metadata, ArtifactRepository localRepository,
+                               ArtifactRepository remoteRepository )
         throws RepositoryMetadataResolutionException
     {
         File file;
@@ -397,7 +409,8 @@ public class DefaultRepositoryMetadataManager
         }
         catch ( TransferFailedException e )
         {
-            throw new RepositoryMetadataResolutionException( metadata + " could not be retrieved from repository: " + remoteRepository.getId() + " due to an error: " + e.getMessage(), e );
+            throw new RepositoryMetadataResolutionException( metadata + " could not be retrieved from repository: "
+                + remoteRepository.getId() + " due to an error: " + e.getMessage(), e );
         }
 
         try
@@ -414,18 +427,23 @@ public class DefaultRepositoryMetadataManager
         }
     }
 
-    private File getArtifactMetadataFromDeploymentRepository( ArtifactMetadata metadata, ArtifactRepository localRepository, ArtifactRepository remoteRepository )
+    private File getArtifactMetadataFromDeploymentRepository( ArtifactMetadata metadata,
+                                                              ArtifactRepository localRepo,
+                                                              ArtifactRepository remoteRepository )
         throws TransferFailedException
     {
-        File file = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( metadata, remoteRepository ) );
+        File file =
+            new File( localRepo.getBasedir(), localRepo.pathOfLocalRepositoryMetadata( metadata, remoteRepository ) );
 
         try
         {
-            wagonManager.getArtifactMetadataFromDeploymentRepository( metadata, remoteRepository, file, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );
+            wagonManager.getArtifactMetadataFromDeploymentRepository( metadata, remoteRepository, file,
+                                                                      ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );
         }
         catch ( ResourceDoesNotExistException e )
         {
-            getLogger().info( metadata + " could not be found on repository: " + remoteRepository.getId() + ", so will be created" );
+            getLogger().info( metadata + " could not be found on repository: " + remoteRepository.getId()
+                                  + ", so will be created" );
 
             // delete the local copy so the old details aren't used.
             if ( file.exists() )
@@ -443,7 +461,8 @@ public class DefaultRepositoryMetadataManager
         return file;
     }
 
-    public void deploy( ArtifactMetadata metadata, ArtifactRepository localRepository, ArtifactRepository deploymentRepository )
+    public void deploy( ArtifactMetadata metadata, ArtifactRepository localRepository,
+                        ArtifactRepository deploymentRepository )
         throws RepositoryMetadataDeploymentException
     {
         File file;
@@ -456,7 +475,8 @@ public class DefaultRepositoryMetadataManager
             }
             catch ( TransferFailedException e )
             {
-                throw new RepositoryMetadataDeploymentException( metadata + " could not be retrieved from repository: " + deploymentRepository.getId() + " due to an error: " + e.getMessage(), e );
+                throw new RepositoryMetadataDeploymentException( metadata + " could not be retrieved from repository: "
+                    + deploymentRepository.getId() + " due to an error: " + e.getMessage(), e );
             }
 
             if ( file.isFile() )
@@ -474,7 +494,9 @@ public class DefaultRepositoryMetadataManager
         else
         {
             // It's a POM - we don't need to retrieve it first
-            file = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( metadata, deploymentRepository ) );
+            file =
+                new File( localRepository.getBasedir(),
+                          localRepository.pathOfLocalRepositoryMetadata( metadata, deploymentRepository ) );
         }
 
         try
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
index a1fb1e8..4ee80ec 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
@@ -20,14 +20,17 @@ package org.apache.maven.artifact.repository.metadata;
  */
 
 import java.io.File;
+import java.util.Collections;
+import java.util.Map;
 
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
 import org.codehaus.plexus.util.FileUtils;
-import org.sonatype.aether.RepositoryException;
-import org.sonatype.aether.metadata.MergeableMetadata;
+import org.eclipse.aether.RepositoryException;
+import org.eclipse.aether.metadata.AbstractMetadata;
+import org.eclipse.aether.metadata.MergeableMetadata;
+import org.eclipse.aether.metadata.Metadata;
 
 /**
  * <strong>Warning:</strong> This is an internal utility class that is only public for technical reasons, it is not part
@@ -36,6 +39,7 @@ import org.sonatype.aether.metadata.MergeableMetadata;
  * @author Benjamin Bentmann
  */
 public final class MetadataBridge
+    extends AbstractMetadata
     implements MergeableMetadata
 {
 
@@ -127,6 +131,17 @@ public final class MetadataBridge
         }
     }
 
+    public Map<String, String> getProperties()
+    {
+        return Collections.emptyMap();
+    }
+
+    @Override
+    public Metadata setProperties( Map<String, String> properties )
+    {
+        return this;
+    }
+
     @SuppressWarnings( "deprecation" )
     static class MetadataRepository
         extends DefaultArtifactRepository
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
index a7a28c0..0ca940a 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
@@ -44,7 +44,7 @@ public interface ArtifactResolver
     @Deprecated
     String ROLE = ArtifactResolver.class.getName();
 
-    // USED BY SUREFIRE
+    // USED BY SUREFIRE, DEPENDENCY PLUGIN
     @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
                                                   ArtifactRepository localRepository,
@@ -89,7 +89,7 @@ public interface ArtifactResolver
                                                   List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    // USED BY REMOTE RESOURCES PLUGIN
+    // USED BY REMOTE RESOURCES PLUGIN, DEPENDENCY PLUGIN
     @Deprecated
     void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException;
@@ -100,7 +100,7 @@ public interface ArtifactResolver
                   TransferListener downloadMonitor )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    // USED BY ARCHETYPE DOWNLOADER
+    // USED BY DEPENDENCY PLUGIN, ARCHETYPE DOWNLOADER
     @Deprecated
     void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
                         ArtifactRepository localRepository )
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index 9c8364d..fff16e0 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -1,18 +1,22 @@
 package org.apache.maven.artifact.resolver;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 import java.io.File;
@@ -56,16 +60,16 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.LocalRepositoryManager;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResult;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResult;
 
 /**
  * @author Jason van Zyl
  */
- at Component(role = ArtifactResolver.class)
+ at Component( role = ArtifactResolver.class )
 public class DefaultArtifactResolver
     implements ArtifactResolver
 {
@@ -97,7 +101,7 @@ public class DefaultArtifactResolver
 
     public DefaultArtifactResolver()
     {
-        int threads = Integer.getInteger( "maven.artifact.threads", 5 ).intValue();
+        int threads = Integer.getInteger( "maven.artifact.threads", 5 );
         if ( threads <= 1 )
         {
             executor = new Executor()
@@ -111,7 +115,8 @@ public class DefaultArtifactResolver
         else
         {
             executor =
-                new ThreadPoolExecutor( threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new DaemonThreadCreator());
+                new ThreadPoolExecutor( threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
+                                        new DaemonThreadCreator() );
         }
     }
 
@@ -151,19 +156,22 @@ public class DefaultArtifactResolver
         }
     }
 
-    public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository, TransferListener resolutionListener )
+    public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories,
+                         ArtifactRepository localRepository, TransferListener resolutionListener )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         resolve( artifact, remoteRepositories, getSession( localRepository ) );
     }
 
-    public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
+    public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
+                               ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         resolve( artifact, remoteRepositories, getSession( localRepository ) );
     }
 
-    private void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, RepositorySystemSession session )
+    private void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories,
+                          RepositorySystemSession session )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         if ( artifact == null )
@@ -212,9 +220,9 @@ public class DefaultArtifactResolver
 
                 result = repoSystem.resolveArtifact( session, artifactRequest );
             }
-            catch ( org.sonatype.aether.resolution.ArtifactResolutionException e )
+            catch ( org.eclipse.aether.resolution.ArtifactResolutionException e )
             {
-                if ( e.getCause() instanceof org.sonatype.aether.transfer.ArtifactNotFoundException )
+                if ( e.getCause() instanceof org.eclipse.aether.transfer.ArtifactNotFoundException )
                 {
                     throw new ArtifactNotFoundException( e.getMessage(), artifact, remoteRepositories, e );
                 }
@@ -249,52 +257,73 @@ public class DefaultArtifactResolver
         }
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         ArtifactRepository localRepository,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactMetadataSource source, ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
-        return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository, remoteRepositories, source, filter );
+        return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository,
+                                    remoteRepositories, source, filter );
 
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
-                                                         List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source )
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         Map managedVersions, ArtifactRepository localRepository,
+                                                         List<ArtifactRepository> remoteRepositories,
+                                                         ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
-        return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, null );
+        return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
+                                    remoteRepositories, source, null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
-                                                         List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter )
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         Map managedVersions, ArtifactRepository localRepository,
+                                                         List<ArtifactRepository> remoteRepositories,
+                                                         ArtifactMetadataSource source, ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
-        return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, null );
+        return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
+                                    remoteRepositories, source, filter, null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         List<ArtifactRepository> remoteRepositories,
+                                                         ArtifactRepository localRepository,
                                                          ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         return resolveTransitively( artifacts, originatingArtifact, localRepository, remoteRepositories, source, null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
-                                                         ArtifactMetadataSource source, List<ResolutionListener> listeners )
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         List<ArtifactRepository> remoteRepositories,
+                                                         ArtifactRepository localRepository,
+                                                         ArtifactMetadataSource source,
+                                                         List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository,
                                     remoteRepositories, source, null, listeners );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
-                                                         List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List<ResolutionListener> listeners )
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         Map managedVersions, ArtifactRepository localRepository,
+                                                         List<ArtifactRepository> remoteRepositories,
+                                                         ArtifactMetadataSource source, ArtifactFilter filter,
+                                                         List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
-        return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, listeners, null );
+        return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
+                                    remoteRepositories, source, filter, listeners, null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
-                                                         List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List<ResolutionListener> listeners,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                                         Map managedVersions, ArtifactRepository localRepository,
+                                                         List<ArtifactRepository> remoteRepositories,
+                                                         ArtifactMetadataSource source, ArtifactFilter filter,
+                                                         List<ResolutionListener> listeners,
                                                          List<ConflictResolver> conflictResolvers )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
@@ -336,7 +365,7 @@ public class DefaultArtifactResolver
     {
         Artifact rootArtifact = request.getArtifact();
         Set<Artifact> artifacts = request.getArtifactDependencies();
-        Map managedVersions = request.getManagedVersionMap();
+        Map<String, Artifact> managedVersions = request.getManagedVersionMap();
         List<ResolutionListener> listeners = request.getListeners();
         ArtifactFilter collectionFilter = request.getCollectionFilter();                       
         ArtifactFilter resolutionFilter = request.getResolutionFilter();
@@ -528,18 +557,18 @@ public class DefaultArtifactResolver
     /**
      * ThreadCreator for creating daemon threads with fixed ThreadGroup-name.
      */
-    final static class DaemonThreadCreator
+    static final class DaemonThreadCreator
         implements ThreadFactory
     {
         static final String THREADGROUP_NAME = "org.apache.maven.artifact.resolver.DefaultArtifactResolver";
 
-        final static ThreadGroup group = new ThreadGroup( THREADGROUP_NAME );
+        static final ThreadGroup GROUP = new ThreadGroup( THREADGROUP_NAME );
 
-        final static AtomicInteger threadNumber = new AtomicInteger( 1 );
+        static final AtomicInteger THREAD_NUMBER = new AtomicInteger( 1 );
 
         public Thread newThread( Runnable r )
         {
-            Thread newThread = new Thread( group, r, "resolver-" + threadNumber.getAndIncrement() );
+            Thread newThread = new Thread( GROUP, r, "resolver-" + THREAD_NUMBER.getAndIncrement() );
             newThread.setDaemon( true );
             return newThread;
         }
@@ -574,6 +603,7 @@ public class DefaultArtifactResolver
 
         public void run()
         {
+            ClassLoader old = Thread.currentThread().getContextClassLoader();
             try
             {
                 Thread.currentThread().setContextClassLoader( classLoader );
@@ -602,6 +632,8 @@ public class DefaultArtifactResolver
             finally
             {
                 latch.countDown();
+                Thread.currentThread().setContextClassLoader( old );
+
             }
         }
 
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
index 4b961b8..3b99e9e 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
@@ -20,13 +20,10 @@ package org.apache.maven.profiles;
  */
 
 import org.apache.maven.model.Activation;
-import org.apache.maven.model.InputLocation;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.model.building.ModelProblemCollector;
-import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.profile.DefaultProfileActivationContext;
-import org.apache.maven.model.profile.ProfileActivationContext;
 import org.apache.maven.model.profile.ProfileSelector;
 import org.apache.maven.profiles.activation.ProfileActivationException;
 import org.codehaus.plexus.MutablePlexusContainer;
@@ -36,11 +33,11 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
 import org.codehaus.plexus.logging.Logger;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 
 @Deprecated
 public class DefaultProfileManager
@@ -143,9 +140,9 @@ public class DefaultProfileManager
     */
     public void explicitlyActivate( List profileIds )
     {
-        for ( Iterator it = profileIds.iterator(); it.hasNext(); )
+        for ( Object profileId1 : profileIds )
         {
-            String profileId = (String) it.next();
+            String profileId = (String) profileId1;
 
             explicitlyActivate( profileId );
         }
@@ -169,9 +166,9 @@ public class DefaultProfileManager
     */
     public void explicitlyDeactivate( List profileIds )
     {
-        for ( Iterator it = profileIds.iterator(); it.hasNext(); )
+        for ( Object profileId1 : profileIds )
         {
-            String profileId = (String) it.next();
+            String profileId = (String) profileId1;
 
             explicitlyDeactivate( profileId );
         }
@@ -195,14 +192,13 @@ public class DefaultProfileManager
             profileSelector.getActiveProfiles( profilesById.values(), context, new ModelProblemCollector()
             {
 
-                public void add( Severity severity, String message, InputLocation location, Exception cause )
+                public void add( ModelProblemCollectorRequest req )
                 {
-                    if ( !ModelProblem.Severity.WARNING.equals( severity ) )
+                    if ( !ModelProblem.Severity.WARNING.equals( req.getSeverity() ) )
                     {
-                        errors.add( new ProfileActivationException( message, cause ) );
+                        errors.add( new ProfileActivationException( req.getMessage(), req.getException() ) );
                     }
                 }
-
             } );
 
         if ( !errors.isEmpty() )
@@ -218,9 +214,9 @@ public class DefaultProfileManager
      */
     public void addProfiles( List profiles )
     {
-        for ( Iterator it = profiles.iterator(); it.hasNext(); )
+        for ( Object profile1 : profiles )
         {
-            Profile profile = (Profile) it.next();
+            Profile profile = (Profile) profile1;
 
             addProfile( profile );
         }
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java b/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
index 8abe1de..0427d71 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
@@ -25,7 +25,6 @@ import org.apache.maven.model.ActivationProperty;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.Repository;
 
-import java.util.Iterator;
 import java.util.List;
 
 @Deprecated
@@ -100,21 +99,19 @@ public class ProfilesConversionUtils
         List repos = profileXmlProfile.getRepositories();
         if ( repos != null )
         {
-            for ( Iterator it = repos.iterator(); it.hasNext(); )
+            for ( Object repo : repos )
             {
-                profile
-                    .addRepository(
-                        convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) it.next() ) );
+                profile.addRepository( convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) repo ) );
             }
         }
 
         List pluginRepos = profileXmlProfile.getPluginRepositories();
         if ( pluginRepos != null )
         {
-            for ( Iterator it = pluginRepos.iterator(); it.hasNext(); )
+            for ( Object pluginRepo : pluginRepos )
             {
-                profile.addPluginRepository( convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) it
-                    .next() ) );
+                profile.addPluginRepository(
+                    convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) pluginRepo ) );
             }
         }
 
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
index 4186415..a03267d 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
@@ -63,7 +63,7 @@ public class SystemPropertyProfileActivator
                     + profile.getId() + "'" );
             }
 
-            if ( name.startsWith("!") )
+            if ( name.startsWith( "!" ) )
             {
                 reverseName = true;
                 name = name.substring( 1 );
diff --git a/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java b/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
index f1b382e..c44d8db 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
@@ -29,6 +29,9 @@ import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.profiles.ProfileManager;
 import org.apache.maven.wagon.events.TransferListener;
 
+/**
+ * @deprecated use {@link ProjectBuilder} instead
+ */
 @Deprecated
 public interface MavenProjectBuilder
 {
diff --git a/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java
index a79b957..92b5eb9 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java
@@ -59,37 +59,35 @@ public final class ModelUtils
             return;
         }
 
-        List parentPlugins = parentContainer.getPlugins();
+        List<Plugin> parentPlugins = parentContainer.getPlugins();
 
         if ( ( parentPlugins != null ) && !parentPlugins.isEmpty() )
         {
-            parentPlugins = new ArrayList( parentPlugins );
+            parentPlugins = new ArrayList<Plugin>( parentPlugins );
 
             // If we're processing this merge as an inheritance, we have to build up a list of
             // plugins that were considered for inheritance.
             if ( handleAsInheritance )
             {
-                for ( Iterator it = parentPlugins.iterator(); it.hasNext(); )
+                for ( Iterator<Plugin> it = parentPlugins.iterator(); it.hasNext(); )
                 {
-                    Plugin plugin = (Plugin) it.next();
+                    Plugin plugin = it.next();
 
                     String inherited = plugin.getInherited();
 
-                    if ( ( inherited != null ) && !Boolean.valueOf( inherited ).booleanValue() )
+                    if ( ( inherited != null ) && !Boolean.valueOf( inherited ) )
                     {
                         it.remove();
                     }
                 }
             }
 
-            List assembledPlugins = new ArrayList();
+            List<Plugin> assembledPlugins = new ArrayList<Plugin>();
 
-            Map childPlugins = childContainer.getPluginsAsMap();
+            Map<String, Plugin> childPlugins = childContainer.getPluginsAsMap();
 
-            for ( Iterator it = parentPlugins.iterator(); it.hasNext(); )
+            for ( Plugin parentPlugin : parentPlugins )
             {
-                Plugin parentPlugin = (Plugin) it.next();
-
                 String parentInherited = parentPlugin.getInherited();
 
                 // only merge plugin definition from the parent if at least one
@@ -98,7 +96,7 @@ public final class ModelUtils
                 // 2. the parent's <inherited/> flag is not set
                 // 3. the parent's <inherited/> flag is set to true
                 if ( !handleAsInheritance || ( parentInherited == null )
-                    || Boolean.valueOf( parentInherited ).booleanValue() )
+                    || Boolean.valueOf( parentInherited ) )
                 {
                     Plugin childPlugin = (Plugin) childPlugins.get( parentPlugin.getKey() );
 
@@ -123,7 +121,7 @@ public final class ModelUtils
 
                 // very important to use the parentPlugins List, rather than parentContainer.getPlugins()
                 // since this list is a local one, and may have been modified during processing.
-                List results =
+                List<Plugin> results =
                     ModelUtils.orderAfterMerge( assembledPlugins, parentPlugins, childContainer.getPlugins() );
 
                 childContainer.setPlugins( results );
@@ -133,30 +131,27 @@ public final class ModelUtils
         }
     }
 
-    public static List orderAfterMerge( List merged, List highPrioritySource, List lowPrioritySource )
+    public static List<Plugin> orderAfterMerge( List<Plugin> merged, List<Plugin> highPrioritySource,
+                                                List<Plugin> lowPrioritySource )
     {
-        List results = new ArrayList();
+        List<Plugin> results = new ArrayList<Plugin>();
 
         if ( !merged.isEmpty() )
         {
             results.addAll( merged );
         }
 
-        List missingFromResults = new ArrayList();
+        List<Plugin> missingFromResults = new ArrayList<Plugin>();
 
-        List sources = new ArrayList();
+        List<List<Plugin>> sources = new ArrayList<List<Plugin>>();
 
         sources.add( highPrioritySource );
         sources.add( lowPrioritySource );
 
-        for ( Iterator sourceIterator = sources.iterator(); sourceIterator.hasNext(); )
+        for ( List<Plugin> source : sources )
         {
-            List source = (List) sourceIterator.next();
-
-            for ( Iterator it = source.iterator(); it.hasNext(); )
+            for ( Plugin item : source )
             {
-                Object item = it.next();
-
                 if ( results.contains( item ) )
                 {
                     if ( !missingFromResults.isEmpty() )
@@ -221,32 +216,30 @@ public final class ModelUtils
         // from here to the end of the method is dealing with merging of the <executions/> section.
         String parentInherited = parent.getInherited();
 
-        boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited ).booleanValue();
+        boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited );
 
-        List parentExecutions = parent.getExecutions();
+        List<PluginExecution> parentExecutions = parent.getExecutions();
 
         if ( ( parentExecutions != null ) && !parentExecutions.isEmpty() )
         {
-            List mergedExecutions = new ArrayList();
+            List<PluginExecution> mergedExecutions = new ArrayList<PluginExecution>();
 
-            Map assembledExecutions = new TreeMap();
+            Map<String, PluginExecution> assembledExecutions = new TreeMap<String, PluginExecution>();
 
-            Map childExecutions = child.getExecutionsAsMap();
+            Map<String, PluginExecution> childExecutions = child.getExecutionsAsMap();
 
-            for ( Iterator it = parentExecutions.iterator(); it.hasNext(); )
+            for ( PluginExecution parentExecution : parentExecutions )
             {
-                PluginExecution parentExecution = (PluginExecution) it.next();
-
                 String inherited = parentExecution.getInherited();
 
                 boolean parentExecInherited =
-                    parentIsInherited && ( ( inherited == null ) || Boolean.valueOf( inherited ).booleanValue() );
+                    parentIsInherited && ( ( inherited == null ) || Boolean.valueOf( inherited ) );
 
                 if ( !handleAsInheritance || parentExecInherited )
                 {
                     PluginExecution assembled = parentExecution;
 
-                    PluginExecution childExecution = (PluginExecution) childExecutions.get( parentExecution.getId() );
+                    PluginExecution childExecution = childExecutions.get( parentExecution.getId() );
 
                     if ( childExecution != null )
                     {
@@ -264,10 +257,8 @@ public final class ModelUtils
                 }
             }
 
-            for ( Iterator it = child.getExecutions().iterator(); it.hasNext(); )
+            for ( PluginExecution childExecution : child.getExecutions() )
             {
-                PluginExecution childExecution = (PluginExecution) it.next();
-
                 if ( !assembledExecutions.containsKey( childExecution.getId() ) )
                 {
                     mergedExecutions.add( childExecution );
@@ -288,10 +279,10 @@ public final class ModelUtils
             child.setPhase( parent.getPhase() );
         }
 
-        List parentGoals = parent.getGoals();
-        List childGoals = child.getGoals();
+        List<String> parentGoals = parent.getGoals();
+        List<String> childGoals = child.getGoals();
 
-        List goals = new ArrayList();
+        List<String> goals = new ArrayList<String>();
 
         if ( ( childGoals != null ) && !childGoals.isEmpty() )
         {
@@ -300,10 +291,8 @@ public final class ModelUtils
 
         if ( parentGoals != null )
         {
-            for ( Iterator goalIterator = parentGoals.iterator(); goalIterator.hasNext(); )
+            for (  String goal : parentGoals )
             {
-                String goal = (String) goalIterator.next();
-
                 if ( !goals.contains( goal ) )
                 {
                     goals.add( goal );
@@ -321,21 +310,17 @@ public final class ModelUtils
         child.setConfiguration( childConfiguration );
     }
 
-    public static List mergeRepositoryLists( List dominant, List recessive )
+    public static List<Repository> mergeRepositoryLists( List<Repository> dominant, List<Repository> recessive )
     {
-        List repositories = new ArrayList();
+        List<Repository> repositories = new ArrayList<Repository>();
 
-        for ( Iterator it = dominant.iterator(); it.hasNext(); )
+        for ( Repository repository : dominant )
         {
-            Repository repository = (Repository) it.next();
-
             repositories.add( repository );
         }
 
-        for ( Iterator it = recessive.iterator(); it.hasNext(); )
+        for ( Repository repository : recessive )
         {
-            Repository repository = (Repository) it.next();
-
             if ( !repositories.contains( repository ) )
             {
                 repositories.add( repository );
@@ -345,11 +330,10 @@ public final class ModelUtils
         return repositories;
     }
 
-    public static void mergeFilterLists( List childFilters, List parentFilters )
+    public static void mergeFilterLists( List<String> childFilters, List<String> parentFilters )
     {
-        for ( Iterator i = parentFilters.iterator(); i.hasNext(); )
+        for ( String f : parentFilters )
         {
-            String f = (String) i.next();
             if ( !childFilters.contains( f ) )
             {
                 childFilters.add( f );
@@ -357,29 +341,27 @@ public final class ModelUtils
         }
     }
 
-    private static List mergeDependencyList( List child, List parent )
+    private static List<Dependency> mergeDependencyList( List<Dependency> child, List<Dependency> parent )
     {
-        Map depsMap = new LinkedHashMap();
+        Map<String, Dependency> depsMap = new LinkedHashMap<String, Dependency>();
 
         if ( parent != null )
         {
-            for ( Iterator it = parent.iterator(); it.hasNext(); )
+            for ( Dependency dependency : parent )
             {
-                Dependency dependency = (Dependency) it.next();
                 depsMap.put( dependency.getManagementKey(), dependency );
             }
         }
 
         if ( child != null )
         {
-            for ( Iterator it = child.iterator(); it.hasNext(); )
+            for ( Dependency dependency : child )
             {
-                Dependency dependency = (Dependency) it.next();
                 depsMap.put( dependency.getManagementKey(), dependency );
             }
         }
 
-        return new ArrayList( depsMap.values() );
+        return new ArrayList<Dependency>( depsMap.values() );
     }
 
 }
diff --git a/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java
index 5383654..ddfad3c 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java
@@ -25,6 +25,9 @@ import java.util.Properties;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.profiles.ProfileManager;
 
+/**
+ * @deprecated use {@link ProjectBuildingRequest} instead
+ */
 @Deprecated
 public interface ProjectBuilderConfiguration
 {
diff --git a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
index 75d1db0..b70d3cf 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
@@ -32,7 +32,7 @@ import org.apache.maven.plugin.LegacySupport;
 import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 // This class needs to stick around because it was exposed the the remote resources plugin started using it instead of
 // getting the repositories from the project.
diff --git a/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java b/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
index b16e389..ec04f34 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
@@ -323,15 +323,13 @@ public class DefaultModelInheritanceAssembler
                 List<Dependency> childDeps = childDepMgmt.getDependencies();
 
                 Map<String, Dependency> mappedChildDeps = new TreeMap<String, Dependency>();
-                for ( Iterator<Dependency> it = childDeps.iterator(); it.hasNext(); )
+                for ( Dependency dep : childDeps )
                 {
-                    Dependency dep = it.next();
                     mappedChildDeps.put( dep.getManagementKey(), dep );
                 }
 
-                for ( Iterator<Dependency> it = parentDepMgmt.getDependencies().iterator(); it.hasNext(); )
+                for ( Dependency dep : parentDepMgmt.getDependencies() )
                 {
-                    Dependency dep = it.next();
                     if ( !mappedChildDeps.containsKey( dep.getManagementKey() ) )
                     {
                         childDepMgmt.addDependency( dep );
@@ -382,14 +380,13 @@ public class DefaultModelInheritanceAssembler
 
             Map childPlugins = child.getReportPluginsAsMap();
 
-            for ( Iterator it = parentPlugins.iterator(); it.hasNext(); )
+            for ( Object parentPlugin1 : parentPlugins )
             {
-                ReportPlugin parentPlugin = (ReportPlugin) it.next();
+                ReportPlugin parentPlugin = (ReportPlugin) parentPlugin1;
 
                 String parentInherited = parentPlugin.getInherited();
 
-                if ( !handleAsInheritance || ( parentInherited == null )
-                    || Boolean.valueOf( parentInherited ).booleanValue() )
+                if ( !handleAsInheritance || ( parentInherited == null ) || Boolean.valueOf( parentInherited ) )
                 {
 
                     ReportPlugin assembledPlugin = parentPlugin;
@@ -481,7 +478,7 @@ public class DefaultModelInheritanceAssembler
         // from here to the end of the method is dealing with merging of the <executions/> section.
         String parentInherited = parent.getInherited();
 
-        boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited ).booleanValue();
+        boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited );
 
         List parentReportSets = parent.getReportSets();
 
diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
index aff88e0..dfc3dee 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
@@ -25,6 +25,7 @@ import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
 import org.apache.maven.project.DefaultProjectBuilderConfiguration;
 import org.apache.maven.project.ProjectBuilderConfiguration;
 import org.apache.maven.project.path.PathTranslator;
+import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.interpolation.AbstractValueSource;
 import org.codehaus.plexus.interpolation.InterpolationException;
 import org.codehaus.plexus.interpolation.InterpolationPostProcessor;
@@ -64,7 +65,7 @@ public abstract class AbstractStringBasedModelInterpolator
     extends AbstractLogEnabled
     implements ModelInterpolator, Initializable
 {
-    private static final List<String> PROJECT_PREFIXES = Arrays.asList( new String[]{ "pom.", "project." } );
+    private static final List<String> PROJECT_PREFIXES = Arrays.asList( "pom.", "project." );
 
     private static final List<String> TRANSLATED_PATH_EXPRESSIONS;
 
@@ -88,6 +89,7 @@ public abstract class AbstractStringBasedModelInterpolator
         TRANSLATED_PATH_EXPRESSIONS = translatedPrefixes;
     }
 
+    @Requirement
     private PathTranslator pathTranslator;
 
     private Interpolator interpolator;
@@ -283,12 +285,12 @@ public abstract class AbstractStringBasedModelInterpolator
                                                                                                          pathTranslator ) );
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings( "unchecked" )
     protected String interpolateInternal( String src, List<ValueSource> valueSources,
                                           List<InterpolationPostProcessor> postProcessors, boolean debug )
         throws ModelInterpolationException
     {
-        if ( src.indexOf( "${" ) < 0 )
+        if ( !src.contains( "${" ) )
         {
             return src;
         }
@@ -296,7 +298,7 @@ public abstract class AbstractStringBasedModelInterpolator
         Logger logger = getLogger();
 
         String result = src;
-        synchronized( this )
+        synchronized ( this )
         {
 
             for ( ValueSource vs : valueSources )
@@ -315,7 +317,7 @@ public abstract class AbstractStringBasedModelInterpolator
                 {
                     result = interpolator.interpolate( result, recursionInterceptor );
                 }
-                catch( InterpolationException e )
+                catch ( InterpolationException e )
                 {
                     throw new ModelInterpolationException( e.getMessage(), e );
                 }
diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
index da1f84a..dcb8e2b 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
@@ -168,33 +168,35 @@ public class StringSearchModelInterpolator
                     fieldsByClass.put( cls, fields );
                 }
 
-                for ( int i = 0; i < fields.length; i++ )
+                for ( Field field : fields )
                 {
-                    Class<?> type = fields[i].getType();
-                    if ( isQualifiedForInterpolation( fields[i], type ) )
+                    Class<?> type = field.getType();
+                    if ( isQualifiedForInterpolation( field, type ) )
                     {
-                        boolean isAccessible = fields[i].isAccessible();
-                        fields[i].setAccessible( true );
+                        boolean isAccessible = field.isAccessible();
+                        field.setAccessible( true );
                         try
                         {
                             try
                             {
                                 if ( String.class == type )
                                 {
-                                    String value = (String) fields[i].get( target );
+                                    String value = (String) field.get( target );
                                     if ( value != null )
                                     {
-                                        String interpolated = modelInterpolator.interpolateInternal( value, valueSources, postProcessors, debugEnabled );
+                                        String interpolated =
+                                            modelInterpolator.interpolateInternal( value, valueSources, postProcessors,
+                                                                                   debugEnabled );
 
                                         if ( !interpolated.equals( value ) )
                                         {
-                                            fields[i].set( target, interpolated );
+                                            field.set( target, interpolated );
                                         }
                                     }
                                 }
                                 else if ( Collection.class.isAssignableFrom( type ) )
                                 {
-                                    Collection<Object> c = (Collection<Object>) fields[i].get( target );
+                                    Collection<Object> c = (Collection<Object>) field.get( target );
                                     if ( c != null && !c.isEmpty() )
                                     {
                                         List<Object> originalValues = new ArrayList<Object>( c );
@@ -206,8 +208,9 @@ public class StringSearchModelInterpolator
                                         {
                                             if ( debugEnabled && logger != null )
                                             {
-                                                logger.debug( "Skipping interpolation of field: " + fields[i] + " in: "
-                                                    + cls.getName() + "; it is an unmodifiable collection." );
+                                                logger.debug( "Skipping interpolation of field: " + field + " in: "
+                                                                  + cls.getName()
+                                                                  + "; it is an unmodifiable collection." );
                                             }
                                             continue;
                                         }
@@ -256,7 +259,7 @@ public class StringSearchModelInterpolator
                                 }
                                 else if ( Map.class.isAssignableFrom( type ) )
                                 {
-                                    Map<Object, Object> m = (Map<Object, Object>) fields[i].get( target );
+                                    Map<Object, Object> m = (Map<Object, Object>) field.get( target );
                                     if ( m != null && !m.isEmpty() )
                                     {
                                         for ( Map.Entry<Object, Object> entry : m.entrySet() )
@@ -283,12 +286,12 @@ public class StringSearchModelInterpolator
                                                         {
                                                             if ( debugEnabled && logger != null )
                                                             {
-                                                                logger.debug( "Skipping interpolation of field: "
-                                                                    + fields[i] + " (key: " + entry.getKey() + ") in: "
-                                                                    + cls.getName()
-                                                                    + "; it is an unmodifiable collection." );
+                                                                logger.debug(
+                                                                    "Skipping interpolation of field: " + field
+                                                                        + " (key: " + entry.getKey() + ") in: "
+                                                                        + cls.getName()
+                                                                        + "; it is an unmodifiable collection." );
                                                             }
-                                                            continue;
                                                         }
                                                     }
                                                 }
@@ -309,10 +312,10 @@ public class StringSearchModelInterpolator
                                 }
                                 else
                                 {
-                                    Object value = fields[i].get( target );
+                                    Object value = field.get( target );
                                     if ( value != null )
                                     {
-                                        if ( fields[i].getType().isArray() )
+                                        if ( field.getType().isArray() )
                                         {
                                             evaluateArray( value );
                                         }
@@ -325,18 +328,18 @@ public class StringSearchModelInterpolator
                             }
                             catch ( IllegalArgumentException e )
                             {
-                                throw new ModelInterpolationException( "Failed to interpolate field: " + fields[i]
-                                    + " on class: " + cls.getName(), e );
+                                throw new ModelInterpolationException(
+                                    "Failed to interpolate field: " + field + " on class: " + cls.getName(), e );
                             }
                             catch ( IllegalAccessException e )
                             {
-                                throw new ModelInterpolationException( "Failed to interpolate field: " + fields[i]
-                                    + " on class: " + cls.getName(), e );
+                                throw new ModelInterpolationException(
+                                    "Failed to interpolate field: " + field + " on class: " + cls.getName(), e );
                             }
                         }
                         finally
                         {
-                            fields[i].setAccessible( isAccessible );
+                            field.setAccessible( isAccessible );
                         }
                     }
                 }
@@ -354,7 +357,7 @@ public class StringSearchModelInterpolator
         {
             if ( !fieldIsPrimitiveByClass.containsKey( fieldType ) )
             {
-                fieldIsPrimitiveByClass.put( fieldType, Boolean.valueOf( fieldType.isPrimitive() ) );
+                fieldIsPrimitiveByClass.put( fieldType, fieldType.isPrimitive() );
             }
 
             if ( fieldIsPrimitiveByClass.get( fieldType ).booleanValue() )
diff --git a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
index 020b652..ece7c39 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
@@ -125,9 +125,9 @@ public class DefaultPathTranslator
         if ( s != null )
         {
             String basedirExpr = null;
-            for ( int i = 0; i < BASEDIR_EXPRESSIONS.length; i++ )
+            for ( String BASEDIR_EXPRESSION : BASEDIR_EXPRESSIONS )
             {
-                basedirExpr = BASEDIR_EXPRESSIONS[i];
+                basedirExpr = BASEDIR_EXPRESSION;
                 if ( s.startsWith( basedirExpr ) )
                 {
                     break;
diff --git a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
index 09a13b3..0095f80 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
@@ -19,13 +19,12 @@ package org.apache.maven.project.validation;
  * under the License.
  */
 
-import org.apache.maven.model.InputLocation;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.DefaultModelBuildingRequest;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.model.building.ModelProblemCollector;
-import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
@@ -66,14 +65,12 @@ public class DefaultModelValidator
             this.result = result;
         }
 
-        public void add( Severity severity, String message, InputLocation location, Exception cause )
+        public void add( ModelProblemCollectorRequest req )
         {
-            if ( !ModelProblem.Severity.WARNING.equals( severity ) )
+            if ( !ModelProblem.Severity.WARNING.equals( req.getSeverity() ) )
             {
-                result.addMessage( message );
+                result.addMessage( req.getMessage() );
             }
         }
-
     }
-
 }
diff --git a/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java b/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
index b41b0b3..12ead7e 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
@@ -85,7 +85,7 @@ public class ModelValidationResult
 //
         for ( int i = 0; i < messages.size(); i++ )
         {
-            message.append( indentation + "[" + i + "]  " + messages.get( i ).toString() + NEWLINE );
+            message.append( indentation + "[" + i + "]  " + messages.get( i ) + NEWLINE );
         }
 
         return message.toString();
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java
index 3940cf3..c8b9ab4 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java
@@ -41,8 +41,8 @@ public class MetadataGraphNode
 
     public MetadataGraphNode()
     {
-        inNodes = new ArrayList<MetadataGraphNode>(4);
-        exNodes = new ArrayList<MetadataGraphNode>(8);
+        inNodes = new ArrayList<MetadataGraphNode>( 4 );
+        exNodes = new ArrayList<MetadataGraphNode>( 8 );
     }
 
     public MetadataGraphNode( MavenArtifactMetadata metadata )
@@ -80,7 +80,7 @@ public class MetadataGraphNode
                 return metadata == null;
             }
 
-            return metadata == null ? false : metadata.toString().equals( node2.metadata.toString() );
+            return metadata != null && metadata.toString().equals( node2.metadata.toString() );
         }
         else
         {
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
index a2bfe8c..df81685 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
@@ -21,16 +21,19 @@ package org.apache.maven.repository.legacy;
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.reflect.Method;
 import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
+import org.apache.maven.plugin.LegacySupport;
 import org.apache.maven.wagon.ConnectionException;
 import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.wagon.TransferFailedException;
@@ -50,6 +53,8 @@ import org.codehaus.plexus.component.repository.exception.ComponentLifecycleExce
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.FileUtils;
+import org.eclipse.aether.ConfigurationProperties;
+import org.eclipse.aether.util.ConfigUtils;
 
 //TODO: remove the update check manager
 //TODO: separate into retriever and publisher
@@ -72,6 +77,10 @@ public class DefaultWagonManager
     @Requirement
     private UpdateCheckManager updateCheckManager;
 
+    @Requirement
+    private LegacySupport legacySupport;
+    
+    
     //
     // Retriever
     //
@@ -226,6 +235,29 @@ public class DefaultWagonManager
     private void connectWagon( Wagon wagon, ArtifactRepository repository )
         throws ConnectionException, AuthenticationException
     {
+        // MNG-5509 
+        // See org.eclipse.aether.connector.wagon.WagonRepositoryConnector.connectWagon(Wagon)
+        if( legacySupport.getRepositorySession() != null )
+        {
+            Properties headers = new Properties();
+            
+            headers.put( "User-Agent", ConfigUtils.getString( legacySupport.getRepositorySession(), "Maven",
+                                                              ConfigurationProperties.USER_AGENT ) );
+            try
+            {
+                Method setHttpHeaders = wagon.getClass().getMethod( "setHttpHeaders", Properties.class );
+                setHttpHeaders.invoke( wagon, headers );
+            }
+            catch ( NoSuchMethodException e )
+            {
+                // normal for non-http wagons
+            }
+            catch ( Exception e )
+            {
+                logger.debug( "Could not set user agent for wagon " + wagon.getClass().getName() + ": " + e );
+            }
+        }
+        
         if ( repository.getProxy() != null && logger.isDebugEnabled() )
         {
             logger.debug( "Using proxy " + repository.getProxy().getHost() + ":" + repository.getProxy().getPort()
@@ -768,7 +800,7 @@ public class DefaultWagonManager
             throw new UnsupportedProtocolException( "Cannot find wagon which supports the requested protocol: "
                 + protocol, e );
         }
-
+        
         return wagon;
     }
 
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
index 93b1601..6dd84db 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
@@ -73,10 +73,11 @@ import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.AuthenticationSelector;
-import org.sonatype.aether.repository.ProxySelector;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.AuthenticationContext;
+import org.eclipse.aether.repository.AuthenticationSelector;
+import org.eclipse.aether.repository.ProxySelector;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * @author Jason van Zyl
@@ -478,7 +479,7 @@ public class LegacyRepositorySystem
     {
         if ( session != null )
         {
-            org.sonatype.aether.repository.MirrorSelector selector = session.getMirrorSelector();
+            org.eclipse.aether.repository.MirrorSelector selector = session.getMirrorSelector();
             if ( selector != null )
             {
                 RemoteRepository repo = selector.getMirror( RepositoryUtils.toRepo( repository ) );
@@ -583,13 +584,18 @@ public class LegacyRepositorySystem
             AuthenticationSelector selector = session.getAuthenticationSelector();
             if ( selector != null )
             {
-                org.sonatype.aether.repository.Authentication auth =
-                    selector.getAuthentication( RepositoryUtils.toRepo( repository ) );
+                RemoteRepository repo = RepositoryUtils.toRepo( repository );
+                org.eclipse.aether.repository.Authentication auth = selector.getAuthentication( repo );
                 if ( auth != null )
                 {
-                    Authentication result = new Authentication( auth.getUsername(), auth.getPassword() );
-                    result.setPrivateKey( auth.getPrivateKeyFile() );
-                    result.setPassphrase( auth.getPassphrase() );
+                    repo = new RemoteRepository.Builder( repo ).setAuthentication( auth ).build();
+                    AuthenticationContext authCtx = AuthenticationContext.forRepository( session, repo );
+                    Authentication result =
+                        new Authentication( authCtx.get( AuthenticationContext.USERNAME ),
+                                            authCtx.get( AuthenticationContext.PASSWORD ) );
+                    result.setPrivateKey( authCtx.get( AuthenticationContext.PRIVATE_KEY_PATH ) );
+                    result.setPassphrase( authCtx.get( AuthenticationContext.PRIVATE_KEY_PASSPHRASE ) );
+                    authCtx.close();
                     return result;
                 }
             }
@@ -688,7 +694,8 @@ public class LegacyRepositorySystem
             ProxySelector selector = session.getProxySelector();
             if ( selector != null )
             {
-                org.sonatype.aether.repository.Proxy proxy = selector.getProxy( RepositoryUtils.toRepo( repository ) );
+                RemoteRepository repo = RepositoryUtils.toRepo( repository );
+                org.eclipse.aether.repository.Proxy proxy = selector.getProxy( repo );
                 if ( proxy != null )
                 {
                     Proxy p = new Proxy();
@@ -697,8 +704,13 @@ public class LegacyRepositorySystem
                     p.setPort( proxy.getPort() );
                     if ( proxy.getAuthentication() != null )
                     {
-                        p.setUserName( proxy.getAuthentication().getUsername() );
-                        p.setPassword( proxy.getAuthentication().getPassword() );
+                        repo = new RemoteRepository.Builder( repo ).setProxy( proxy ).build();
+                        AuthenticationContext authCtx = AuthenticationContext.forProxy( session, repo );
+                        p.setUserName( authCtx.get( AuthenticationContext.USERNAME ) );
+                        p.setPassword( authCtx.get( AuthenticationContext.PASSWORD ) );
+                        p.setNtlmDomain( authCtx.get( AuthenticationContext.NTLM_DOMAIN ) );
+                        p.setNtlmHost( authCtx.get( AuthenticationContext.NTLM_WORKSTATION ) );
+                        authCtx.close();
                     }
                     return p;
                 }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java
index eb6e895..497828d 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java
@@ -74,7 +74,7 @@ public class TransferListenerAdapter
         }
         if ( transferred != null )
         {
-            event.setTransferredBytes( transferred.longValue() );
+            event.setTransferredBytes( transferred );
         }
 
         synchronized ( artifacts )
@@ -110,11 +110,11 @@ public class TransferListenerAdapter
             transferred = transfers.get( transferEvent.getResource() );
             if ( transferred == null )
             {
-                transferred = Long.valueOf( length );
+                transferred = (long) length;
             }
             else
             {
-                transferred = Long.valueOf( transferred.longValue() + length );
+                transferred = transferred.longValue() + length;
             }
             transfers.put( transferEvent.getResource(), transferred );
         }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java
index 85a6bc4..4bc9116 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java
@@ -43,7 +43,7 @@ public class DefaultArtifactRepositoryFactory
     private String globalChecksumPolicy;
 
     @Requirement( role = ArtifactRepositoryLayout.class )
-    private Map<String,ArtifactRepositoryLayout> repositoryLayouts;
+    private Map<String, ArtifactRepositoryLayout> repositoryLayouts;
 
     public ArtifactRepositoryLayout getLayout( String layoutId )
         throws UnknownRepositoryLayoutException
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
index 651d46e..f734416 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
@@ -63,10 +63,10 @@ import org.codehaus.plexus.logging.Logger;
 public class DefaultLegacyArtifactCollector
     implements LegacyArtifactCollector
 {
-	@Requirement(hint="nearest")
+    @Requirement( hint = "nearest" )
     private ConflictResolver defaultConflictResolver;
 
-	@Requirement
+    @Requirement
     private Logger logger;
 
     @Requirement
@@ -219,7 +219,7 @@ public class DefaultLegacyArtifactCollector
         }
 
         /* remove the originating artifact if it is also in managed versions to avoid being modified during resolution */
-        Artifact managedOriginatingArtifact = (Artifact) versionMap.get( originatingArtifact.getDependencyConflictId() );
+        Artifact managedOriginatingArtifact = versionMap.get( originatingArtifact.getDependencyConflictId() );
 
         if ( managedOriginatingArtifact != null )
         {
@@ -465,7 +465,7 @@ public class DefaultLegacyArtifactCollector
                                     // added to the artifact before we retrive the metadata
                                     // for the artifact; otherwise we may end up with unwanted
                                     // dependencies.
-                                    Artifact ma = (Artifact) managedVersions.get( childKey );
+                                    Artifact ma = managedVersions.get( childKey );
                                     ArtifactFilter managedExclusionFilter = ma.getDependencyFilter();
                                     if ( null != managedExclusionFilter )
                                     {
@@ -602,7 +602,7 @@ public class DefaultLegacyArtifactCollector
     private void manageArtifact( ResolutionNode node, ManagedVersionMap managedVersions,
                                  List<ResolutionListener> listeners )
     {
-        Artifact artifact = (Artifact) managedVersions.get( node.getKey() );
+        Artifact artifact = managedVersions.get( node.getKey() );
 
         // Before we update the version of the artifact, we need to know
         // whether we are working on a transitive dependency or not. This
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java
index 1a5606f..42604d7 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java
@@ -38,18 +38,17 @@ public interface ArtifactTransformation
 
     /**
      * Take in a artifact and return the transformed artifact for locating in the remote repository. If no
-     * transformation has occured the original artifact is returned.
+     * transformation has occurred the original artifact is returned.
      *
      * @param artifact           Artifact to be transformed.
      * @param request the repositories to check
-     * @param localRepository    the local repository
      */
     void transformForResolve( Artifact artifact, RepositoryRequest request )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /**
      * Take in a artifact and return the transformed artifact for locating in the remote repository. If no
-     * transformation has occured the original artifact is returned.
+     * transformation has occurred the original artifact is returned.
      *
      * @param artifact           Artifact to be transformed.
      * @param remoteRepositories the repositories to check
@@ -62,7 +61,7 @@ public interface ArtifactTransformation
 
     /**
      * Take in a artifact and return the transformed artifact for locating in the local repository. If no
-     * transformation has occured the original artifact is returned.
+     * transformation has occurred the original artifact is returned.
      *
      * @param artifact        Artifact to be transformed.
      * @param localRepository the local repository it will be stored in
@@ -72,8 +71,8 @@ public interface ArtifactTransformation
         throws ArtifactInstallationException;
 
     /**
-     * Take in a artifact and return the transformed artifact for distributing toa remote repository. If no
-     * transformation has occured the original artifact is returned.
+     * Take in a artifact and return the transformed artifact for distributing to remote repository. If no
+     * transformation has occurred the original artifact is returned.
      *
      * @param artifact         Artifact to be transformed.
      * @param remoteRepository the repository to deploy to
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java
index 9137261..f0ac9c8 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java
@@ -40,7 +40,6 @@ public interface ArtifactTransformationManager
      *
      * @param artifact           Artifact to be transformed.
      * @param request the repositories to check
-     * @param localRepository    the local repository
      */
     void transformForResolve( Artifact artifact, RepositoryRequest request )
         throws ArtifactResolutionException, ArtifactNotFoundException;
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java
index 0074947..2666eaf 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java
@@ -28,7 +28,6 @@ import org.apache.maven.artifact.ArtifactScopeEnum;
  * Artifact Metadata that is resolved independent of Artifact itself.
  *
  * @author <a href="oleg at codehaus.org">Oleg Gusakov</a>
- *
  */
 public class ArtifactMetadata
 {
@@ -291,7 +290,7 @@ public class ArtifactMetadata
         return artifactExists;
     }
 
-    public void setArtifactExists(boolean artifactExists)
+    public void setArtifactExists( boolean artifactExists )
     {
         this.artifactExists = artifactExists;
     }
@@ -302,7 +301,7 @@ public class ArtifactMetadata
         return dependencies;
     }
 
-    public void setDependencies(Collection<ArtifactMetadata> dependencies)
+    public void setDependencies( Collection<ArtifactMetadata> dependencies )
     {
         this.dependencies = dependencies;
     }
@@ -312,7 +311,7 @@ public class ArtifactMetadata
         return artifactUri;
     }
 
-    public void setArtifactUri(String artifactUri)
+    public void setArtifactUri( String artifactUri )
     {
         this.artifactUri = artifactUri;
     }
@@ -322,23 +321,28 @@ public class ArtifactMetadata
     {
         return why;
     }
-    public void setWhy(String why)
+
+    public void setWhy( String why )
     {
         this.why = why;
     }
+
     //-------------------------------------------------------------------
     public String getError()
     {
         return error;
     }
-    public void setError(String error)
+
+    public void setError( String error )
     {
         this.error = error;
     }
+
     public boolean isError()
     {
         return error == null;
     }
+
     //------------------------------------------------------------------
     public String getDependencyConflictId()
     {
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
index d898739..b116c69 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
@@ -294,7 +294,7 @@ public class MetadataGraph
     //------------------------------------------------------------------------
     public List<MetadataGraphEdge> getEdgesBetween( MetadataGraphVertex vFrom, MetadataGraphVertex vTo )
     {
-        List<MetadataGraphEdge> edges = getIncidentEdges(vTo);
+        List<MetadataGraphEdge> edges = getIncidentEdges( vTo );
         if ( edges == null || edges.isEmpty() )
         {
             return null;
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
index 4a50b20..9d86933 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
@@ -125,10 +125,10 @@ public class MetadataGraphEdge
         this.depth = depth;
     }
 
-	public boolean isResolved()
-	{
-		return resolved;
-	}
+    public boolean isResolved()
+    {
+        return resolved;
+    }
 
     public void setResolved( boolean resolved )
     {
@@ -175,7 +175,7 @@ public class MetadataGraphEdge
         this.target = target;
     }
 
-	@Override
+    @Override
     public String toString()
     {
         return "[ " + "FROM:("
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java
index 770ae79..9a9130b 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java
@@ -62,7 +62,7 @@ public class MetadataResolution
         return artifactMetadata;
     }
 
-    public void setArtifactMetadata(ArtifactMetadata artifactMetadata)
+    public void setArtifactMetadata( ArtifactMetadata artifactMetadata )
     {
         this.artifactMetadata = artifactMetadata;
     }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
index 263f906..1d9e9c4 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
@@ -63,8 +63,8 @@ public class MetadataResolutionResult
     public void initTreeProcessing( PlexusContainer plexus )
         throws ComponentLookupException
     {
-        classpathTransformation = (ClasspathTransformation) plexus.lookup( ClasspathTransformation.class );
-        conflictResolver = (GraphConflictResolver) plexus.lookup( GraphConflictResolver.class );
+        classpathTransformation = plexus.lookup( ClasspathTransformation.class );
+        conflictResolver = plexus.lookup( GraphConflictResolver.class );
     }
     //----------------------------------------------------------------------------
     public MetadataGraph getGraph()
diff --git a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
index e0192ca..7d41f0a 100644
--- a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
+++ b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
@@ -33,7 +33,6 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -55,13 +54,13 @@ public class ExpressionDocumenter
 
             ClassLoader docLoader = initializeDocLoader();
 
-            for ( int i = 0; i < EXPRESSION_ROOTS.length; i++ )
+            for ( String EXPRESSION_ROOT : EXPRESSION_ROOTS )
             {
                 InputStream docStream = null;
                 try
                 {
-                    docStream = docLoader
-                        .getResourceAsStream( EXPRESSION_DOCO_ROOTPATH + EXPRESSION_ROOTS[i] + ".paramdoc.xml" );
+                    docStream =
+                        docLoader.getResourceAsStream( EXPRESSION_DOCO_ROOTPATH + EXPRESSION_ROOT + ".paramdoc.xml" );
 
                     if ( docStream != null )
                     {
@@ -72,13 +71,13 @@ public class ExpressionDocumenter
                 }
                 catch ( IOException e )
                 {
-                    throw new ExpressionDocumentationException( "Failed to read documentation for expression root: "
-                        + EXPRESSION_ROOTS[i], e );
+                    throw new ExpressionDocumentationException(
+                        "Failed to read documentation for expression root: " + EXPRESSION_ROOT, e );
                 }
                 catch ( XmlPullParserException e )
                 {
-                    throw new ExpressionDocumentationException( "Failed to parse documentation for expression root: "
-                        + EXPRESSION_ROOTS[i], e );
+                    throw new ExpressionDocumentationException(
+                        "Failed to parse documentation for expression root: " + EXPRESSION_ROOT, e );
                 }
                 finally
                 {
@@ -130,9 +129,9 @@ public class ExpressionDocumenter
 
         if ( expressions != null && !expressions.isEmpty() )
         {
-            for ( Iterator it = expressions.iterator(); it.hasNext(); )
+            for ( Object expression : expressions )
             {
-                Expression expr = (Expression) it.next();
+                Expression expr = (Expression) expression;
 
                 bySyntax.put( expr.getSyntax(), expr );
             }
@@ -164,9 +163,8 @@ public class ExpressionDocumenter
         }
         catch ( MalformedURLException e )
         {
-            throw new ExpressionDocumentationException(
-                                                        "Cannot construct expression documentation classpath resource base.",
-                                                        e );
+            throw new ExpressionDocumentationException( "Cannot construct expression documentation classpath"
+                + " resource base.", e );
         }
 
         return new URLClassLoader( new URL[] { docResource } );
diff --git a/maven-compat/src/main/resources/META-INF/maven/plugin.xml b/maven-compat/src/main/resources/META-INF/maven/plugin.xml
index b8d0634..da5a62c 100644
--- a/maven-compat/src/main/resources/META-INF/maven/plugin.xml
+++ b/maven-compat/src/main/resources/META-INF/maven/plugin.xml
@@ -1,3 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <plugin>
   <description>Maven Internal State-Management Plugins</description>
   <groupId>org.apache.maven.plugins.internal</groupId>
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
index 6645257..3f96793 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
@@ -36,26 +36,30 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.execution.DefaultMavenExecutionRequest;
 import org.apache.maven.execution.DefaultMavenExecutionResult;
 import org.apache.maven.execution.MavenSession;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.collection.DependencyGraphTransformer;
-import org.sonatype.aether.collection.DependencyManager;
-import org.sonatype.aether.collection.DependencySelector;
-import org.sonatype.aether.collection.DependencyTraverser;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.graph.manager.ClassicDependencyManager;
-import org.sonatype.aether.util.graph.selector.AndDependencySelector;
-import org.sonatype.aether.util.graph.selector.ExclusionDependencySelector;
-import org.sonatype.aether.util.graph.selector.OptionalDependencySelector;
-import org.sonatype.aether.util.graph.selector.ScopeDependencySelector;
-import org.sonatype.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
-import org.sonatype.aether.util.graph.transformer.NearestVersionConflictResolver;
-import org.sonatype.aether.util.graph.transformer.ConflictMarker;
-import org.sonatype.aether.util.graph.transformer.JavaDependencyContextRefiner;
-import org.sonatype.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
-import org.sonatype.aether.util.graph.traverser.FatArtifactTraverser;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.collection.DependencyGraphTransformer;
+import org.eclipse.aether.collection.DependencyManager;
+import org.eclipse.aether.collection.DependencySelector;
+import org.eclipse.aether.collection.DependencyTraverser;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.util.graph.manager.ClassicDependencyManager;
+import org.eclipse.aether.util.graph.selector.AndDependencySelector;
+import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
+import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
+import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
+import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
+import org.eclipse.aether.util.graph.transformer.ConflictResolver;
+import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver;
+import org.eclipse.aether.util.graph.transformer.JavaScopeSelector;
+import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
+import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
+import org.eclipse.aether.util.graph.transformer.SimpleOptionalitySelector;
+import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
+import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
 
 /**
  * @author <a href="mailto:jason at maven.org">Jason van Zyl </a>
@@ -66,7 +70,14 @@ public abstract class AbstractArtifactComponentTestCase
     protected ArtifactFactory artifactFactory;
 
     protected ArtifactRepositoryFactory artifactRepositoryFactory;
-    
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
     @Override
     protected void setUp()
         throws Exception
@@ -331,8 +342,7 @@ public abstract class AbstractArtifactComponentTestCase
         throws Exception
     {
         DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
-        session.setIgnoreMissingArtifactDescriptor( true );
-        session.setIgnoreInvalidArtifactDescriptor( true );
+        session.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, true ) );
         DependencyTraverser depTraverser = new FatArtifactTraverser();
         session.setDependencyTraverser( depTraverser );
 
@@ -345,12 +355,13 @@ public abstract class AbstractArtifactComponentTestCase
         session.setDependencySelector( depFilter );
 
         DependencyGraphTransformer transformer =
-            new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
-                                                   new NearestVersionConflictResolver(),
-                                                   new JavaDependencyContextRefiner() );
+            new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(),
+                                  new SimpleOptionalitySelector(), new JavaScopeDeriver() );
+        new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() );
         session.setDependencyGraphTransformer( transformer );
 
-        session.setLocalRepositoryManager( new SimpleLocalRepositoryManager( localRepository().getBasedir() ) );
+        LocalRepository localRepo = new LocalRepository( localRepository().getBasedir() );
+        session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
 
         return session;
     }
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java
index 8e7b284..40d94c2 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java
@@ -68,7 +68,7 @@ public class DefaultArtifactResolverTest
 
         // we want to see all top-level thread groups
         ThreadGroup tg = Thread.currentThread().getThreadGroup();
-        while ( !( tg.getParent() != null ) )
+        while ( tg.getParent() == null )
         {
             tg = tg.getParent();
         }
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
index 342af15..4b6f637 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
@@ -37,20 +37,20 @@ public class MockManager
     
     public void replayAll()
     {
-        for ( Iterator it = mockControls.iterator(); it.hasNext(); )
+        for ( Object mockControl : mockControls )
         {
-            MockControl control = ( MockControl ) it.next();
-            
+            MockControl control = (MockControl) mockControl;
+
             control.replay();
         }
     }
     
     public void verifyAll()
     {
-        for ( Iterator it = mockControls.iterator(); it.hasNext(); )
+        for ( Object mockControl : mockControls )
         {
-            MockControl control = ( MockControl ) it.next();
-            
+            MockControl control = (MockControl) mockControl;
+
             control.verify();
         }
     }
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
index e2b8fa2..3845092 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
@@ -1,5 +1,20 @@
 package org.apache.maven.artifact.transform;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import java.util.List;
 
 import org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformationManager;
@@ -15,7 +30,7 @@ public class TransformationManagerTest
     public void testTransformationManager()
         throws Exception
     {
-        ArtifactTransformationManager tm = (ArtifactTransformationManager) lookup( ArtifactTransformationManager.class );
+        ArtifactTransformationManager tm = lookup( ArtifactTransformationManager.class );
 
         List tms = tm.getArtifactTransformations();
 
diff --git a/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java b/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
index b5ebedb..f897dbf 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
@@ -27,8 +27,10 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.model.building.ModelBuildingException;
 import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
+import org.eclipse.aether.DefaultRepositorySystemSession;
 
 /**
  * @author Jason van Zyl
@@ -39,7 +41,14 @@ public abstract class AbstractMavenProjectTestCase
     protected ProjectBuilder projectBuilder;
 
     protected RepositorySystem repositorySystem;
-    
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
     protected void setUp()
         throws Exception
     {
@@ -166,7 +175,7 @@ public abstract class AbstractMavenProjectTestCase
     protected void initRepoSession( ProjectBuildingRequest request )
     {
         File localRepo = new File( request.getLocalRepository().getBasedir() );
-        MavenRepositorySystemSession session = new MavenRepositorySystemSession();
+        DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
         session.setLocalRepositoryManager( new LegacyLocalRepositoryManager( localRepo ) );
         request.setRepositorySession( session );
     }
diff --git a/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java b/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java
index 84d8be2..36eaee8 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java
@@ -26,13 +26,13 @@ import java.util.Collections;
 import java.util.List;
 
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.ArtifactResolver;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResolutionException;
-import org.sonatype.aether.resolution.ArtifactResult;
-import org.sonatype.aether.transfer.ArtifactNotFoundException;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.impl.ArtifactResolver;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.transfer.ArtifactNotFoundException;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
index daab6c4..52fdd80 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
@@ -21,22 +21,36 @@ package org.apache.maven.project;
 
 import java.io.File;
 
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
-import org.sonatype.aether.repository.LocalArtifactRequest;
-import org.sonatype.aether.repository.LocalArtifactResult;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.repository.LocalArtifactRegistration;
+import org.eclipse.aether.repository.LocalArtifactRequest;
+import org.eclipse.aether.repository.LocalArtifactResult;
+import org.eclipse.aether.repository.LocalMetadataRegistration;
+import org.eclipse.aether.repository.LocalMetadataRequest;
+import org.eclipse.aether.repository.LocalMetadataResult;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * @author Benjamin Bentmann
  */
 public class LegacyLocalRepositoryManager
-    extends SimpleLocalRepositoryManager
+    implements LocalRepositoryManager
 {
 
+    private final LocalRepository repository;
+
     public LegacyLocalRepositoryManager( File basedir )
     {
-        super( basedir );
+        this.repository = new LocalRepository( basedir.getAbsoluteFile(), "legacy" );
+    }
+
+    public LocalRepository getRepository()
+    {
+        return repository;
     }
 
     public String getPathForLocalArtifact( Artifact artifact )
@@ -59,17 +73,120 @@ public class LegacyLocalRepositoryManager
         return path.toString();
     }
 
+    public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context )
+    {
+        return getPathForLocalArtifact( artifact );
+    }
+
+    public String getPathForLocalMetadata( Metadata metadata )
+    {
+        return getPath( metadata, "local" );
+    }
+
+    public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context )
+    {
+        return getPath( metadata, getRepositoryKey( repository, context ) );
+    }
+
+    String getRepositoryKey( RemoteRepository repository, String context )
+    {
+        return repository.getId();
+    }
+
+    private String getPath( Metadata metadata, String repositoryKey )
+    {
+        StringBuilder path = new StringBuilder( 128 );
+
+        if ( metadata.getGroupId().length() > 0 )
+        {
+            path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' );
+
+            if ( metadata.getArtifactId().length() > 0 )
+            {
+                path.append( metadata.getArtifactId() ).append( '/' );
+
+                if ( metadata.getVersion().length() > 0 )
+                {
+                    path.append( metadata.getVersion() ).append( '/' );
+                }
+            }
+        }
+
+        path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) );
+
+        return path.toString();
+    }
+
+    private String insertRepositoryKey( String filename, String repositoryKey )
+    {
+        String result;
+        int idx = filename.indexOf( '.' );
+        if ( idx < 0 )
+        {
+            result = filename + '-' + repositoryKey;
+        }
+        else
+        {
+            result = filename.substring( 0, idx ) + '-' + repositoryKey + filename.substring( idx );
+        }
+        return result;
+    }
+
     public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request )
     {
- 	    String path = getPathForLocalArtifact( request.getArtifact() );
- 	    File file = new File( getRepository().getBasedir(), path );
+        String path = getPathForLocalArtifact( request.getArtifact() );
+        File file = new File( getRepository().getBasedir(), path );
+
         LocalArtifactResult result = new LocalArtifactResult( request );
- 	    if ( file.isFile() )
+        if ( file.isFile() )
+        {
+            result.setFile( file );
+            result.setAvailable( true );
+        }
+
+        return result;
+    }
+
+    public void add( RepositorySystemSession session, LocalArtifactRegistration request )
+    {
+        // noop
+    }
+
+    public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request )
+    {
+        LocalMetadataResult result = new LocalMetadataResult( request );
+
+        String path;
+
+        Metadata metadata = request.getMetadata();
+        String context = request.getContext();
+        RemoteRepository remote = request.getRepository();
+
+        if ( remote != null )
+        {
+            path = getPathForRemoteMetadata( metadata, remote, context );
+        }
+        else
         {
- 	        result.setFile( file );
- 	        result.setAvailable( true );
- 	    }
- 	    return result;
- 	}
+            path = getPathForLocalMetadata( metadata );
+        }
+
+        File file = new File( getRepository().getBasedir(), path );
+        if ( file.isFile() )
+        {
+            result.setFile( file );
+        }
 
+        return result;
+    }
+
+    public void add( RepositorySystemSession session, LocalMetadataRegistration request )
+    {
+        // noop
+    }
+
+    public String toString()
+    {
+        return String.valueOf( getRepository() );
+    }
 }
diff --git a/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java b/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
index d2c44a1..9c0cbd1 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
@@ -54,7 +54,7 @@ public class ModelUtilsTest
 
         ModelUtils.mergePluginDefinitions( plugin, mgtPlugin, false );
 
-        assertEquals( dep.getVersion(), ((Dependency) plugin.getDependencies().get( 0 ) ).getVersion() );
+        assertEquals( dep.getVersion(), plugin.getDependencies().get( 0 ).getVersion() );
     }
 
     private Dependency createDependency( String gid,
@@ -157,9 +157,9 @@ public class ModelUtilsTest
 
         if( configuration != null )
         {
-            for ( Iterator it = configuration.entrySet().iterator(); it.hasNext(); )
+            for ( Object o : configuration.entrySet() )
             {
-                Map.Entry entry = (Map.Entry) it.next();
+                Map.Entry entry = (Map.Entry) o;
 
                 Xpp3Dom param = new Xpp3Dom( String.valueOf( entry.getKey() ) );
                 param.setValue( String.valueOf( entry.getValue() ) );
diff --git a/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java b/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java
index b84733c..f696675 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java
@@ -25,8 +25,8 @@ import java.util.Iterator;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.repository.internal.DefaultArtifactDescriptorReader;
-import org.sonatype.aether.impl.ArtifactDescriptorReader;
-import org.sonatype.aether.impl.ArtifactResolver;
+import org.eclipse.aether.impl.ArtifactDescriptorReader;
+import org.eclipse.aether.impl.ArtifactResolver;
 
 public class ProjectClasspathTest
     extends AbstractMavenProjectTestCase
@@ -133,9 +133,8 @@ public class ProjectClasspathTest
     private Artifact getArtifact( MavenProject project, String groupId, String artifactId )
     {
         System.out.println( "[ Looking for " + groupId + ":" + artifactId + " ]" );
-        for ( Iterator<Artifact> i = project.getArtifacts().iterator(); i.hasNext(); )
+        for ( Artifact a : project.getArtifacts() )
         {
-            Artifact a = i.next();
             System.out.println( a.toString() );
             if ( artifactId.equals( a.getArtifactId() ) && a.getGroupId().equals( groupId ) )
             {
diff --git a/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java b/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java
index 300dfae..9f389d6 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java
@@ -1,5 +1,20 @@
 package org.apache.maven.project;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.artifact.resolver.DefaultArtifactResolver;
diff --git a/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java b/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java
index c0abdae..2818df0 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java
@@ -1,5 +1,20 @@
 package org.apache.maven.project;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.repository.legacy.LegacyRepositorySystem;
diff --git a/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java b/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java
index c2a907b..c02171f 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java
@@ -1,8 +1,20 @@
-/**
- * 
- */
 package org.apache.maven.project;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.util.Collections;
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
index 4b98a23..0ee7980 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
@@ -68,7 +68,7 @@ public class ProjectInheritanceTest
         // Value taken from p2
         // ----------------------------------------------------------------------
 
-        assertEquals( "mailing-list", ( (MailingList) p4.getMailingLists().get( 0 ) ).getName() );
+        assertEquals( "mailing-list", p4.getMailingLists().get( 0 ).getName() );
 
         // ----------------------------------------------------------------------
         // Value taken from p1
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
index 927027c..2bcf7b5 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
@@ -95,7 +95,7 @@ public class ProjectInheritanceTest
         // Value taken from p2
         // ----------------------------------------------------------------------
 
-        assertEquals( "mailing-list", ( (MailingList) project4.getMailingLists().get( 0 ) ).getName() );
+        assertEquals( "mailing-list", project4.getMailingLists().get( 0 ).getName() );
 
         // ----------------------------------------------------------------------
         // Value taken from p1
@@ -123,12 +123,12 @@ public class ProjectInheritanceTest
         String testPluginArtifactId = "maven-compiler-plugin";
         
         // this is the plugin we're looking for.
-        validPluginCounts.put( testPluginArtifactId, new Integer( 0 ) );
+        validPluginCounts.put( testPluginArtifactId, 0 );
         
         // these are injected if -DperformRelease=true
-        validPluginCounts.put( "maven-deploy-plugin", new Integer( 0 ) );
-        validPluginCounts.put( "maven-javadoc-plugin", new Integer( 0 ) );
-        validPluginCounts.put( "maven-source-plugin", new Integer( 0 ) );
+        validPluginCounts.put( "maven-deploy-plugin", 0 );
+        validPluginCounts.put( "maven-javadoc-plugin", 0 );
+        validPluginCounts.put( "maven-source-plugin", 0 );
         
         Plugin testPlugin = null;
         
@@ -157,7 +157,7 @@ public class ProjectInheritanceTest
                 }
                 else
                 {
-                    count = new Integer( count.intValue() + 1 );
+                    count = count.intValue() + 1;
                     
                     validPluginCounts.put( pluginArtifactId, count );
                 }
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
index bb103cc..e24262f 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
@@ -70,12 +70,14 @@ public class ProjectInheritanceTest
         assertTrue( "No Artifacts", set.size() > 0 );
         assertTrue( "Set size should be 3, is " + set.size(), set.size() == 3 );
 
-        Iterator iter = set.iterator();
-        while ( iter.hasNext() )
+        for ( Object aSet : set )
         {
-            Artifact artifact = (Artifact) iter.next();
-            System.out.println( "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion()
-              + " Optional=" + ( artifact.isOptional() ? "true" : "false" ) );
+            Artifact artifact = (Artifact) aSet;
+            System.out.println(
+                "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() + " Optional=" + (
+                    artifact.isOptional()
+                        ? "true"
+                        : "false" ) );
             assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(),
                         artifact.getVersion().equals( "1.0" ) );
         }
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
index 6007b64..1d2bd18 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
@@ -64,14 +64,15 @@ public class ProjectInheritanceTest
         Set set = project1.getArtifacts();
         assertNotNull( "No artifacts", set );
         assertTrue( "No Artifacts", set.size() > 0 );
-        Iterator iter = set.iterator();
 
-        while ( iter.hasNext() )
+        for ( Object aSet : set )
         {
-            Artifact artifact = (Artifact) iter.next();
-            System.out.println( "Artifact: " + artifact.getDependencyConflictId() + " "
-                    + artifact.getVersion() + " Scope: " + artifact.getScope() );
-            assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals( "1.0" ) );
+            Artifact artifact = (Artifact) aSet;
+            System.out.println(
+                "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() + " Scope: "
+                    + artifact.getScope() );
+            assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(),
+                        artifact.getVersion().equals( "1.0" ) );
         }
 
     }
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java
index 9512ee7..68586aa 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java
@@ -66,14 +66,17 @@ public class ProjectInheritanceTest
         assertTrue("No Artifacts", set.size() > 0);
         assertTrue("Set size should be 3, is " + set.size(), set.size() == 3 );
 
-        Iterator iter = set.iterator();
-
-        while (iter.hasNext())
+        for ( Object aSet : set )
         {
-            Artifact artifact = (Artifact)iter.next();
+            Artifact artifact = (Artifact) aSet;
             assertFalse( "", artifact.getArtifactId().equals( "t07-d" ) );
-            System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() + " Optional=" + (artifact.isOptional() ? "true" : "false"));
-            assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
+            System.out.println(
+                "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() + " Optional=" + (
+                    artifact.isOptional()
+                        ? "true"
+                        : "false" ) );
+            assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(),
+                        artifact.getVersion().equals( "1.0" ) );
         }
     }
 }
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java
index 64f359c..4c73c0f 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java
@@ -32,9 +32,11 @@ import org.apache.maven.model.Repository;
 import org.apache.maven.model.RepositoryPolicy;
 import org.apache.maven.plugin.LegacySupport;
 import org.apache.maven.repository.RepositorySystem;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
+import org.eclipse.aether.repository.LocalRepository;
 
 /**
  * Tests {@link LegacyRepositorySystem}.
@@ -47,7 +49,14 @@ public class LegacyRepositorySystemTest
     private RepositorySystem repositorySystem;
 
     private ResolutionErrorHandler resolutionErrorHandler;
-    
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
     @Override
     protected void setUp()
         throws Exception
@@ -114,7 +123,8 @@ public class LegacyRepositorySystemTest
             .setLocalRepository( getLocalRepository() );            
                             
         DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
-        session.setLocalRepositoryManager( new SimpleLocalRepositoryManager( request.getLocalRepository().getBasedir() ) );
+        LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
+        session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
         LegacySupport legacySupport = lookup( LegacySupport.class );
         legacySupport.setSession( new MavenSession( getContainer(), session, new DefaultMavenExecutionRequest(),
                                                     new DefaultMavenExecutionResult() ) );
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java
index a56b546..98340be 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java
@@ -22,6 +22,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.Authentication;
 import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.settings.Server;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
 
 /**
@@ -35,6 +36,13 @@ public class LegacyRepositorySystemTest
     private RepositorySystem repositorySystem;
 
     @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
+    @Override
     protected void setUp()
         throws Exception
     {
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
index 2bb8c93..58dd3fa 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
@@ -76,7 +76,7 @@ public class DefaultArtifactCollectorTest
 
         source = new Source();
         artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
-        artifactCollector = (LegacyArtifactCollector) lookup( LegacyArtifactCollector.class );
+        artifactCollector = lookup( LegacyArtifactCollector.class );
 
         projectArtifact = createArtifactSpec( "project", "1.0", null );
     }
@@ -712,16 +712,16 @@ public class DefaultArtifactCollectorTest
         }
         catch ( OverConstrainedVersionException e )
         {
-            assertTrue( "Versions unordered", e.getMessage().indexOf( "[3.2.1-v3235e, 3.3.0-v3346]" ) != -1 );
-            assertTrue( "DependencyTrail unresolved", e.getMessage().indexOf( "Path to dependency:" ) != -1 );
+            assertTrue( "Versions unordered", e.getMessage().contains( "[3.2.1-v3235e, 3.3.0-v3346]" ) );
+            assertTrue( "DependencyTrail unresolved", e.getMessage().contains( "Path to dependency:" ) );
         }
     }
 
     private Artifact getArtifact( String id, Set artifacts )
     {
-        for ( Iterator i = artifacts.iterator(); i.hasNext(); )
+        for ( Object artifact : artifacts )
         {
-            Artifact a = (Artifact) i.next();
+            Artifact a = (Artifact) artifact;
             if ( a.getArtifactId().equals( id ) && a.getGroupId().equals( GROUP_ID ) )
             {
                 return a;
@@ -886,9 +886,9 @@ public class DefaultArtifactCollectorTest
         {
             Set projectArtifacts = new HashSet();
 
-            for ( Iterator i = dependencies.iterator(); i.hasNext(); )
+            for ( Object dependency : dependencies )
             {
-                Artifact d = (Artifact) i.next();
+                Artifact d = (Artifact) dependency;
 
                 VersionRange versionRange;
                 if ( d.getVersionRange() != null )
@@ -904,8 +904,8 @@ public class DefaultArtifactCollectorTest
                 {
                     /* don't call createDependencyArtifact as it'll ignore test and provided scopes */
                     artifact =
-                        artifactFactory.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(),
-                                                        d.getScope(), d.getType() );
+                        artifactFactory.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getScope(),
+                                                        d.getType() );
                 }
                 else
                 {
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java
index 0f42e0a..e4edb3c 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java
@@ -1,5 +1,20 @@
 package org.apache.maven.repository.metadata;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import org.apache.maven.artifact.ArtifactScopeEnum;
 import org.apache.maven.repository.metadata.ArtifactMetadata;
 import org.apache.maven.repository.metadata.ClasspathContainer;
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java
index 24789b9..990e1b8 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java
@@ -1,5 +1,20 @@
 package org.apache.maven.repository.metadata;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import org.apache.maven.repository.metadata.GraphConflictResolutionPolicy;
 import org.apache.maven.repository.metadata.MetadataGraphEdge;
 import org.codehaus.plexus.PlexusTestCase;
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java
index 7088fc4..d195567 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java
@@ -1,5 +1,20 @@
 package org.apache.maven.repository.metadata;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import org.apache.maven.artifact.ArtifactScopeEnum;
 import org.apache.maven.repository.metadata.ArtifactMetadata;
 import org.apache.maven.repository.metadata.GraphConflictResolver;
diff --git a/maven-compat/src/test/resources/org/apache/maven/artifact/resolver/ArtifactResolverTest.xml b/maven-compat/src/test/resources/org/apache/maven/artifact/resolver/ArtifactResolverTest.xml
index 2666d8d..2b95085 100644
--- a/maven-compat/src/test/resources/org/apache/maven/artifact/resolver/ArtifactResolverTest.xml
+++ b/maven-compat/src/test/resources/org/apache/maven/artifact/resolver/ArtifactResolverTest.xml
@@ -61,7 +61,7 @@ under the License.
           <field-name>legacySupport</field-name>
         </requirement>
         <requirement>
-          <role>org.sonatype.aether.RepositorySystem</role>
+          <role>org.eclipse.aether.RepositorySystem</role>
           <role-hint>default</role-hint>
           <field-name>repoSystem</field-name>
         </requirement>
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index a253ac4..713ffcc 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-core</artifactId>
@@ -24,6 +24,12 @@
   <name>Maven Core</name>
   <description>Maven Core classes.</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <!--  Maven -->
     <dependency>
@@ -59,24 +65,21 @@
       <artifactId>maven-aether-provider</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-impl</artifactId>
-      <version>${aetherVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-api</artifactId>
-      <version>${aetherVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.aether</groupId>
+      <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-util</artifactId>
-      <version>${aetherVersion}</version>
     </dependency>
     <!-- Plexus -->
     <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-inject-plexus</artifactId>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -112,6 +115,47 @@
         <filtering>true</filtering>
       </resource>
     </resources>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <excludes combine.children="append">
+              <exclude>lifecycle-executor.txt</exclude>
+              <exclude>plugin-manager.txt</exclude>
+              <exclude>project-builder.txt</exclude>
+              <exclude>src/site/resources/design/**</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>buildnumber-maven-plugin</artifactId>
+                    <versionRange>[1.2,)</versionRange>
+                    <goals>
+                      <goal>create-timestamp</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore />
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
       <plugin>
         <groupId>org.codehaus.plexus</groupId>
@@ -156,5 +200,4 @@
       </plugin>
     </plugins>
   </build>
-
 </project>
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java b/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java
index 55a5760..da88508 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java
@@ -37,7 +37,7 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
  * @author Jason van Zyl
  * @todo this should probably be a component with some dynamic control of filtering
  */
- at Component(role = ArtifactFilterManager.class)
+ at Component( role = ArtifactFilterManager.class )
 public class DefaultArtifactFilterManager 
     implements ArtifactFilterManager
 {
@@ -58,6 +58,7 @@ public class DefaultArtifactFilterManager
         artifacts.add( "plexus:plexus-container-default" );
         artifacts.add( "org.sonatype.spice:spice-inject-plexus" );
         artifacts.add( "org.sonatype.sisu:sisu-inject-plexus" );
+        artifacts.add( "org.eclipse.sisu:org.eclipse.sisu.plexus" );
         artifacts.add( "org.apache.maven:maven-artifact" );
         artifacts.add( "org.apache.maven:maven-aether-provider" );
         artifacts.add( "org.apache.maven:maven-artifact-manager" );
@@ -79,6 +80,12 @@ public class DefaultArtifactFilterManager
         artifacts.add( "org.apache.maven:maven-settings-builder" );
         artifacts.add( "org.apache.maven:maven-toolchain" );
         artifacts.add( "org.apache.maven.wagon:wagon-provider-api" );
+        artifacts.add( "org.eclipse.aether:aether-api" );
+        artifacts.add( "org.eclipse.aether:aether-spi" );
+        artifacts.add( "org.eclipse.aether:aether-impl" );
+        //
+        // We must also filter out the old or NoClassDefFoundErrors will surface
+        //
         artifacts.add( "org.sonatype.aether:aether-api" );
         artifacts.add( "org.sonatype.aether:aether-spi" );
         artifacts.add( "org.sonatype.aether:aether-impl" );
@@ -90,7 +97,7 @@ public class DefaultArtifactFilterManager
          * wagon from their plugin realm.
          */
 
-        DEFAULT_EXCLUSIONS = Collections.unmodifiableSet( artifacts);
+        DEFAULT_EXCLUSIONS = Collections.unmodifiableSet( artifacts );
     }
 
     protected Set<String> excludedArtifacts = new HashSet<String>( DEFAULT_EXCLUSIONS );
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index cd944a8..68e4011 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -1,18 +1,22 @@
 package org.apache.maven;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 import java.io.File;
@@ -49,7 +53,6 @@ import org.apache.maven.model.building.ModelProblemUtils;
 import org.apache.maven.model.building.ModelSource;
 import org.apache.maven.model.building.UrlModelSource;
 import org.apache.maven.plugin.LegacySupport;
-import org.apache.maven.project.DuplicateProjectException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
@@ -58,6 +61,7 @@ import org.apache.maven.project.ProjectBuildingResult;
 import org.apache.maven.project.ProjectSorter;
 import org.apache.maven.repository.DelegatingLocalArtifactRepository;
 import org.apache.maven.repository.LocalRepositoryNotAccessibleException;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
@@ -75,38 +79,27 @@ import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.sonatype.aether.ConfigurationProperties;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.collection.DependencyGraphTransformer;
-import org.sonatype.aether.collection.DependencyManager;
-import org.sonatype.aether.collection.DependencySelector;
-import org.sonatype.aether.collection.DependencyTraverser;
-import org.sonatype.aether.repository.Authentication;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RepositoryPolicy;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.graph.manager.ClassicDependencyManager;
-import org.sonatype.aether.util.graph.selector.AndDependencySelector;
-import org.sonatype.aether.util.graph.selector.ExclusionDependencySelector;
-import org.sonatype.aether.util.graph.selector.OptionalDependencySelector;
-import org.sonatype.aether.util.graph.selector.ScopeDependencySelector;
-import org.sonatype.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
-import org.sonatype.aether.util.graph.transformer.NearestVersionConflictResolver;
-import org.sonatype.aether.util.graph.transformer.ConflictMarker;
-import org.sonatype.aether.util.graph.transformer.JavaDependencyContextRefiner;
-import org.sonatype.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
-import org.sonatype.aether.util.graph.traverser.FatArtifactTraverser;
-import org.sonatype.aether.util.repository.ChainedWorkspaceReader;
-import org.sonatype.aether.util.repository.DefaultAuthenticationSelector;
-import org.sonatype.aether.util.repository.DefaultMirrorSelector;
-import org.sonatype.aether.util.repository.DefaultProxySelector;
+import org.eclipse.aether.ConfigurationProperties;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.NoLocalRepositoryManagerException;
+import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.resolution.ResolutionErrorPolicy;
+import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory;
+import org.eclipse.aether.util.repository.AuthenticationBuilder;
+import org.eclipse.aether.util.repository.ChainedWorkspaceReader;
+import org.eclipse.aether.util.repository.DefaultAuthenticationSelector;
+import org.eclipse.aether.util.repository.DefaultMirrorSelector;
+import org.eclipse.aether.util.repository.DefaultProxySelector;
+import org.eclipse.aether.util.repository.SimpleResolutionErrorPolicy;
 
 /**
  * @author Jason van Zyl
  */
- at Component(role = Maven.class)
+ at Component( role = Maven.class )
 public class DefaultMaven
     implements Maven
 {
@@ -138,6 +131,9 @@ public class DefaultMaven
     @Requirement
     private RepositorySystem repoSystem;
 
+    @Requirement( optional = true, hint = "simple" )
+    private LocalRepositoryManagerFactory simpleLocalRepositoryManagerFactory;
+
     @Requirement
     private SettingsDecrypter settingsDecrypter;
 
@@ -157,17 +153,17 @@ public class DefaultMaven
         }
         catch ( OutOfMemoryError e )
         {
-            result = processResult( new DefaultMavenExecutionResult(), e );
+            result = addExceptionToResult( new DefaultMavenExecutionResult(), e );
         }
         catch ( MavenExecutionRequestPopulationException e )
         {
-            result = processResult( new DefaultMavenExecutionResult(), e );
+            result = addExceptionToResult( new DefaultMavenExecutionResult(), e );
         }
         catch ( RuntimeException e )
         {
             result =
-                processResult( new DefaultMavenExecutionResult(),
-                               new InternalErrorException( "Internal error: " + e, e ) );
+                addExceptionToResult( new DefaultMavenExecutionResult(),
+                                      new InternalErrorException( "Internal error: " + e, e ) );
         }
         finally
         {
@@ -177,7 +173,6 @@ public class DefaultMaven
         return result;
     }
 
-    @SuppressWarnings({"ThrowableInstanceNeverThrown", "ThrowableResultOfMethodCallIgnored"})
     private MavenExecutionResult doExecute( MavenExecutionRequest request )
     {
         //TODO: Need a general way to inject standard properties
@@ -197,7 +192,7 @@ public class DefaultMaven
         }
         catch ( LocalRepositoryNotAccessibleException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
 
         DelegatingLocalArtifactRepository delegatingLocalArtifactRepository =
@@ -219,7 +214,7 @@ public class DefaultMaven
         }
         catch ( MavenExecutionException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
 
         eventCatapult.fire( ExecutionEvent.Type.ProjectDiscoveryStarted, session, null );
@@ -235,7 +230,7 @@ public class DefaultMaven
         }
         catch ( ProjectBuildingException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
 
         session.setProjects( projects );
@@ -259,11 +254,13 @@ public class DefaultMaven
             repoSession.setWorkspaceReader( ChainedWorkspaceReader.newInstance( reactorRepository,
                                                                                 repoSession.getWorkspaceReader() ) );
         }
-        catch ( org.apache.maven.DuplicateProjectException e )
+        catch ( DuplicateProjectException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
 
+        repoSession.setReadOnly();
+
         ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
         try
         {
@@ -276,7 +273,7 @@ public class DefaultMaven
         }
         catch ( MavenExecutionException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
         finally
         {
@@ -299,15 +296,15 @@ public class DefaultMaven
 
             ProjectCycleException error = new ProjectCycleException( message, e );
 
-            return processResult( result, error );
+            return addExceptionToResult( result, error );
         }
-        catch ( DuplicateProjectException e )
+        catch ( org.apache.maven.project.DuplicateProjectException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
         catch ( MavenExecutionException e )
         {
-            return processResult( result, e );
+            return addExceptionToResult( result, e );
         }
 
         result.setTopologicallySortedProjects( session.getProjects() );
@@ -323,7 +320,7 @@ public class DefaultMaven
 
         if ( session.getResult().hasExceptions() )
         {
-            return processResult( result, session.getResult().getExceptions().get( 0 ) );
+            return addExceptionToResult( result, session.getResult().getExceptions().get( 0 ) );
         }
 
         return result;
@@ -331,15 +328,13 @@ public class DefaultMaven
 
     public RepositorySystemSession newRepositorySession( MavenExecutionRequest request )
     {
-        DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
+        DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
 
         session.setCache( request.getRepositoryCache() );
 
-        session.setIgnoreInvalidArtifactDescriptor( true ).setIgnoreMissingArtifactDescriptor( true );
-
         Map<Object, Object> configProps = new LinkedHashMap<Object, Object>();
         configProps.put( ConfigurationProperties.USER_AGENT, getUserAgent() );
-        configProps.put( ConfigurationProperties.INTERACTIVE, Boolean.valueOf( request.isInteractiveMode() ) );
+        configProps.put( ConfigurationProperties.INTERACTIVE, request.isInteractiveMode() );
         configProps.putAll( request.getSystemProperties() );
         configProps.putAll( request.getUserProperties() );
 
@@ -358,13 +353,34 @@ public class DefaultMaven
             session.setUpdatePolicy( null );
         }
 
-        session.setNotFoundCachingEnabled( request.isCacheNotFound() );
-        session.setTransferErrorCachingEnabled( request.isCacheTransferError() );
+        int errorPolicy = 0;
+        errorPolicy |= request.isCacheNotFound() ? ResolutionErrorPolicy.CACHE_NOT_FOUND : 0;
+        errorPolicy |= request.isCacheTransferError() ? ResolutionErrorPolicy.CACHE_TRANSFER_ERROR : 0;
+        session.setResolutionErrorPolicy( new SimpleResolutionErrorPolicy( errorPolicy, errorPolicy
+            | ResolutionErrorPolicy.CACHE_NOT_FOUND ) );
 
         session.setArtifactTypeRegistry( RepositoryUtils.newArtifactTypeRegistry( artifactHandlerManager ) );
 
         LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
-        session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo ) );
+
+        if ( request.isUseLegacyLocalRepository() )
+        {
+            logger.warn( "Disabling enhanced local repository: using legacy is strongly discouraged to ensure build reproducibility." );
+            try
+            {
+                session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( session, localRepo ) );
+            }
+            catch ( NoLocalRepositoryManagerException e )
+            {
+
+                logger.warn( "Failed to configure legacy local repository: back to default" );
+                session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( session, localRepo ) );
+            }
+        }
+        else
+        {
+            session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( session, localRepo ) );
+        }
 
         if ( request.getWorkspaceReader() != null )
         {
@@ -399,19 +415,21 @@ public class DefaultMaven
         DefaultProxySelector proxySelector = new DefaultProxySelector();
         for ( Proxy proxy : decrypted.getProxies() )
         {
-            Authentication proxyAuth = new Authentication( proxy.getUsername(), proxy.getPassword() );
-            proxySelector.add( new org.sonatype.aether.repository.Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(),
-                                                                proxyAuth ), proxy.getNonProxyHosts() );
+            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
+            authBuilder.addUsername( proxy.getUsername() ).addPassword( proxy.getPassword() );
+            proxySelector.add( new org.eclipse.aether.repository.Proxy( proxy.getProtocol(), proxy.getHost(),
+                                                                        proxy.getPort(), authBuilder.build() ),
+                               proxy.getNonProxyHosts() );
         }
         session.setProxySelector( proxySelector );
 
         DefaultAuthenticationSelector authSelector = new DefaultAuthenticationSelector();
         for ( Server server : decrypted.getServers() )
         {
-            Authentication auth =
-                new Authentication( server.getUsername(), server.getPassword(), server.getPrivateKey(),
-                                    server.getPassphrase() );
-            authSelector.add( server.getId(), auth );
+            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
+            authBuilder.addUsername( server.getUsername() ).addPassword( server.getPassword() );
+            authBuilder.addPrivateKey( server.getPrivateKey(), server.getPassphrase() );
+            authSelector.add( server.getId(), authBuilder.build() );
 
             if ( server.getConfiguration() != null )
             {
@@ -434,30 +452,13 @@ public class DefaultMaven
         }
         session.setAuthenticationSelector( authSelector );
 
-        DependencyTraverser depTraverser = new FatArtifactTraverser();
-        session.setDependencyTraverser( depTraverser );
-
-        DependencyManager depManager = new ClassicDependencyManager();
-        session.setDependencyManager( depManager );
-
-        DependencySelector depFilter =
-            new AndDependencySelector( new ScopeDependencySelector( "test", "provided" ), new OptionalDependencySelector(),
-                                     new ExclusionDependencySelector() );
-        session.setDependencySelector( depFilter );
-
-        DependencyGraphTransformer transformer =
-            new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
-                                                   new NearestVersionConflictResolver(),
-                                                   new JavaDependencyContextRefiner() );
-        session.setDependencyGraphTransformer( transformer );
-
         session.setTransferListener( request.getTransferListener() );
 
         session.setRepositoryListener( eventSpyDispatcher.chainListener( new LoggingRepositoryListener( logger ) ) );
 
-        session.setUserProps( request.getUserProperties() );
-        session.setSystemProps( request.getSystemProperties() );
-        session.setConfigProps( configProps );
+        session.setUserProperties( request.getUserProperties() );
+        session.setSystemProperties( request.getSystemProperties() );
+        session.setConfigProperties( configProps );
 
         return session;
     }
@@ -553,7 +554,7 @@ public class DefaultMaven
         return lifecycleListeners;
     }
 
-    private MavenExecutionResult processResult( MavenExecutionResult result, Throwable e )
+    private MavenExecutionResult addExceptionToResult( MavenExecutionResult result, Throwable e )
     {
         if ( !result.getExceptions().contains( e ) )
         {
@@ -587,7 +588,7 @@ public class DefaultMaven
     }
 
     private Map<String, MavenProject> getProjectMap( List<MavenProject> projects )
-        throws org.apache.maven.DuplicateProjectException
+        throws DuplicateProjectException
     {
         Map<String, MavenProject> index = new LinkedHashMap<String, MavenProject>();
         Map<String, List<File>> collisions = new LinkedHashMap<String, List<File>>();
@@ -620,7 +621,7 @@ public class DefaultMaven
 
         if ( !collisions.isEmpty() )
         {
-            throw new org.apache.maven.DuplicateProjectException( "Two or more projects in the reactor"
+            throw new DuplicateProjectException( "Two or more projects in the reactor"
                 + " have the same identifier, please make sure that <groupId>:<artifactId>:<version>"
                 + " is unique for each project: " + collisions, collisions );
         }
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
index 4d6fa14..d511d1d 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
@@ -42,7 +42,7 @@ import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
- at Component(role = ProjectDependenciesResolver.class)
+ at Component( role = ProjectDependenciesResolver.class )
 public class DefaultProjectDependenciesResolver
     implements ProjectDependenciesResolver
 {
@@ -97,8 +97,8 @@ public class DefaultProjectDependenciesResolver
             return resolved;
         }
 
-        if ( ( scopesToCollect == null || scopesToCollect.isEmpty() ) &&
-            ( scopesToResolve == null || scopesToResolve.isEmpty() ) )
+        if ( ( scopesToCollect == null || scopesToCollect.isEmpty() )
+            && ( scopesToResolve == null || scopesToResolve.isEmpty() ) )
         {
             return resolved;
         }
diff --git a/maven-core/src/main/java/org/apache/maven/LoggingRepositoryListener.java b/maven-core/src/main/java/org/apache/maven/LoggingRepositoryListener.java
index 8e46525..d176b9d 100644
--- a/maven-core/src/main/java/org/apache/maven/LoggingRepositoryListener.java
+++ b/maven-core/src/main/java/org/apache/maven/LoggingRepositoryListener.java
@@ -22,9 +22,9 @@ package org.apache.maven;
 import java.io.FileNotFoundException;
 
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.AbstractRepositoryListener;
-import org.sonatype.aether.RepositoryEvent;
-import org.sonatype.aether.transfer.MetadataNotFoundException;
+import org.eclipse.aether.AbstractRepositoryListener;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.transfer.MetadataNotFoundException;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/main/java/org/apache/maven/ProjectBuildFailureException.java b/maven-core/src/main/java/org/apache/maven/ProjectBuildFailureException.java
index 1e95098..66ed3a0 100644
--- a/maven-core/src/main/java/org/apache/maven/ProjectBuildFailureException.java
+++ b/maven-core/src/main/java/org/apache/maven/ProjectBuildFailureException.java
@@ -1,13 +1,31 @@
 package org.apache.maven;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import org.apache.maven.plugin.MojoFailureException;
 
 /**
  * Exception which occurs when a normal (i.e. non-aggregator) mojo fails to
  * execute. In this case, the mojo failed while executing against a particular
  * project instance, so we can wrap the {@link MojoFailureException} with context
- * information including projectId and the {@link MojoBinding} that caused the
- * failure.
+ * information including projectId that caused the failure.
  *
  * @author jdcasey
  *
diff --git a/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
index 7c1ae45..7ae86fd 100644
--- a/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
@@ -69,7 +69,6 @@ public interface ProjectDependenciesResolver
                            Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-
     /**
      * Resolves the transitive dependencies of the specified projects. Note that dependencies which can't be resolved
      * from any repository but are present among the set of specified projects will not cause an exception. Instead,
diff --git a/maven-core/src/main/java/org/apache/maven/ReactorReader.java b/maven-core/src/main/java/org/apache/maven/ReactorReader.java
index 16a81e2..bc37eb7 100644
--- a/maven-core/src/main/java/org/apache/maven/ReactorReader.java
+++ b/maven-core/src/main/java/org/apache/maven/ReactorReader.java
@@ -19,14 +19,9 @@ package org.apache.maven;
  * under the License.
  */
 
-import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.project.MavenProject;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.repository.WorkspaceRepository;
-
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -34,6 +29,13 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.project.MavenProject;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.util.artifact.ArtifactIdUtils;
+
 /**
  * An implementation of a workspace reader that knows how to search the Maven reactor for artifacts.
  * 
@@ -42,6 +44,7 @@ import java.util.Map;
 class ReactorReader
     implements WorkspaceReader
 {
+    private static final Collection<String> COMPILE_PHASE_TYPES = Arrays.asList( "jar", "ejb-client" );
 
     private Map<String, MavenProject> projectsByGAV;
 
@@ -69,9 +72,64 @@ class ReactorReader
             projects.add( project );
         }
 
-        repository = new WorkspaceRepository( "reactor", new HashSet<String>( projectsByGAV.keySet() ) );
+        repository = new WorkspaceRepository( "reactor", new HashSet<String>( projectsByGAV.keySet() ) );        
+    }
+
+    //
+    // Public API
+    //
+    
+    public WorkspaceRepository getRepository()
+    {
+        return repository;
+    }
+    
+    public File findArtifact( Artifact artifact )
+    {
+        String projectKey = ArtifactUtils.key( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
+
+        MavenProject project = projectsByGAV.get( projectKey );
+
+        if ( project != null )
+        {
+            File file = find( project, artifact );
+            if ( file == null && project != project.getExecutionProject() )
+            {
+                file = find( project.getExecutionProject(), artifact );
+            }
+            return file;
+        }
+
+        return null;
     }
 
+    public List<String> findVersions( Artifact artifact )
+    {
+        String key = ArtifactUtils.versionlessKey( artifact.getGroupId(), artifact.getArtifactId() );
+
+        List<MavenProject> projects = projectsByGA.get( key );
+        if ( projects == null || projects.isEmpty() )
+        {
+            return Collections.emptyList();
+        }
+
+        List<String> versions = new ArrayList<String>();
+
+        for ( MavenProject project : projects )
+        {
+            if ( find( project, artifact ) != null )
+            {
+                versions.add( project.getVersion() );
+            }
+        }
+
+        return Collections.unmodifiableList( versions );
+    }    
+    
+    //
+    // Implementation
+    //
+    
     private File find( MavenProject project, Artifact artifact )
     {
         if ( "pom".equals( artifact.getExtension() ) )
@@ -79,15 +137,16 @@ class ReactorReader
             return project.getFile();
         }
 
-        org.apache.maven.artifact.Artifact projectArtifact = findMatchingArtifact( project, artifact );
+        Artifact projectArtifact = findMatchingArtifact( project, artifact );
 
         if ( hasArtifactFileFromPackagePhase( projectArtifact ) )
         {
             return projectArtifact.getFile();
         }
-        else if ( !hasBeenPackaged( project ) )
+        else if ( !hasBeenPackaged( project ) ) 
         {
             // fallback to loose class files only if artifacts haven't been packaged yet
+            // and only for plain old jars. Not war files, not ear files, not anything else.
 
             if ( isTestArtifact( artifact ) )
             {
@@ -98,7 +157,8 @@ class ReactorReader
             }
             else
             {
-                if ( project.hasLifecyclePhase( "compile" ) )
+                String type = artifact.getProperty( "type", "" );
+                if ( project.hasLifecyclePhase( "compile" ) && COMPILE_PHASE_TYPES.contains( type ) )
                 {
                     return new File( project.getBuild().getOutputDirectory() );
                 }
@@ -110,7 +170,7 @@ class ReactorReader
         return null;
     }
 
-    private boolean hasArtifactFileFromPackagePhase( org.apache.maven.artifact.Artifact projectArtifact )
+    private boolean hasArtifactFileFromPackagePhase( Artifact projectArtifact )
     {
         return projectArtifact != null && projectArtifact.getFile() != null && projectArtifact.getFile().exists();
     }
@@ -127,72 +187,42 @@ class ReactorReader
      * @param project The project to try to resolve the artifact from, must not be <code>null</code>.
      * @param requestedArtifact The artifact to resolve, must not be <code>null</code>.
      * @return The matching artifact from the project or <code>null</code> if not found.
+     * 
+     * Note that this 
      */
-    private org.apache.maven.artifact.Artifact findMatchingArtifact( MavenProject project, Artifact requestedArtifact )
+    private Artifact findMatchingArtifact( MavenProject project, Artifact requestedArtifact )
     {
-        String requestedRepositoryConflictId = getConflictId( requestedArtifact );
+        String requestedRepositoryConflictId = ArtifactIdUtils.toVersionlessId( requestedArtifact );
 
-        org.apache.maven.artifact.Artifact mainArtifact = project.getArtifact();
-        if ( requestedRepositoryConflictId.equals( getConflictId( mainArtifact ) ) )
+        Artifact mainArtifact = RepositoryUtils.toArtifact( project.getArtifact() );
+        if ( requestedRepositoryConflictId.equals( ArtifactIdUtils.toVersionlessId( mainArtifact ) ) )
         {
             return mainArtifact;
         }
 
-        Collection<org.apache.maven.artifact.Artifact> attachedArtifacts = project.getAttachedArtifacts();
-        if ( attachedArtifacts != null && !attachedArtifacts.isEmpty() )
+        for ( Artifact attachedArtifact : RepositoryUtils.toArtifacts( project.getAttachedArtifacts() ) )
         {
-            for ( org.apache.maven.artifact.Artifact attachedArtifact : attachedArtifacts )
+            if ( attachedArtifactComparison ( requestedArtifact, attachedArtifact ) )
             {
-                if ( requestedRepositoryConflictId.equals( getConflictId( attachedArtifact ) ) )
-                {
-                    return attachedArtifact;
-                }
+                return attachedArtifact;
             }
         }
 
         return null;
     }
 
-    /**
-     * Gets the repository conflict id of the specified artifact. Unlike the dependency conflict id, the repository
-     * conflict id uses the artifact file extension instead of the artifact type. Hence, the repository conflict id more
-     * closely reflects the identity of artifacts as perceived by a repository.
-     * 
-     * @param artifact The artifact, must not be <code>null</code>.
-     * @return The repository conflict id, never <code>null</code>.
-     */
-    private String getConflictId( org.apache.maven.artifact.Artifact artifact )
-    {
-        StringBuilder buffer = new StringBuilder( 128 );
-        buffer.append( artifact.getGroupId() );
-        buffer.append( ':' ).append( artifact.getArtifactId() );
-        if ( artifact.getArtifactHandler() != null )
-        {
-            buffer.append( ':' ).append( artifact.getArtifactHandler().getExtension() );
-        }
-        else
-        {
-            buffer.append( ':' ).append( artifact.getType() );
-        }
-        if ( artifact.hasClassifier() )
-        {
-            buffer.append( ':' ).append( artifact.getClassifier() );
-        }
-        return buffer.toString();
-    }
-
-    private String getConflictId( Artifact artifact )
+    private boolean attachedArtifactComparison( Artifact requested, Artifact attached )
     {
-        StringBuilder buffer = new StringBuilder( 128 );
-        buffer.append( artifact.getGroupId() );
-        buffer.append( ':' ).append( artifact.getArtifactId() );
-        buffer.append( ':' ).append( artifact.getExtension() );
-        if ( artifact.getClassifier().length() > 0 )
-        {
-            buffer.append( ':' ).append( artifact.getClassifier() );
-        }
-        return buffer.toString();
-    }
+        //
+        // We are taking as much as we can from the DefaultArtifact.equals(). The requested artifact has no file so
+        // we want to remove that from the comparision.
+        //
+        return requested.getArtifactId().equals( attached.getArtifactId() )
+            && requested.getGroupId().equals( attached.getGroupId() )
+            && requested.getVersion().equals( attached.getVersion() )
+            && requested.getExtension().equals( attached.getExtension() )
+            && requested.getClassifier().equals( attached.getClassifier() );
+    }    
 
     /**
      * Determines whether the specified artifact refers to test classes.
@@ -205,52 +235,4 @@ class ReactorReader
         return ( "test-jar".equals( artifact.getProperty( "type", "" ) ) )
             || ( "jar".equals( artifact.getExtension() ) && "tests".equals( artifact.getClassifier() ) );
     }
-
-    public File findArtifact( Artifact artifact )
-    {
-        String projectKey = ArtifactUtils.key( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
-
-        MavenProject project = projectsByGAV.get( projectKey );
-
-        if ( project != null )
-        {
-            File file = find( project, artifact );
-            if ( file == null && project != project.getExecutionProject() )
-            {
-                file = find( project.getExecutionProject(), artifact );
-            }
-            return file;
-        }
-
-        return null;
-    }
-
-    public List<String> findVersions( Artifact artifact )
-    {
-        String key = ArtifactUtils.versionlessKey( artifact.getGroupId(), artifact.getArtifactId() );
-
-        List<MavenProject> projects = projectsByGA.get( key );
-        if ( projects == null || projects.isEmpty() )
-        {
-            return Collections.emptyList();
-        }
-
-        List<String> versions = new ArrayList<String>();
-
-        for ( MavenProject project : projects )
-        {
-            if ( find( project, artifact ) != null )
-            {
-                versions.add( project.getVersion() );
-            }
-        }
-
-        return Collections.unmodifiableList( versions );
-    }
-
-    public WorkspaceRepository getRepository()
-    {
-        return repository;
-    }
-
 }
diff --git a/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
index f5e36c0..6341d13 100644
--- a/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
+++ b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
@@ -30,20 +30,21 @@ import org.apache.maven.artifact.handler.DefaultArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.artifact.ArtifactType;
-import org.sonatype.aether.artifact.ArtifactTypeRegistry;
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.graph.Exclusion;
-import org.sonatype.aether.repository.Authentication;
-import org.sonatype.aether.repository.Proxy;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.RepositoryPolicy;
-import org.sonatype.aether.util.artifact.ArtifactProperties;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
-import org.sonatype.aether.util.artifact.DefaultArtifactType;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.ArtifactProperties;
+import org.eclipse.aether.artifact.ArtifactType;
+import org.eclipse.aether.artifact.ArtifactTypeRegistry;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.artifact.DefaultArtifactType;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.graph.Exclusion;
+import org.eclipse.aether.repository.Authentication;
+import org.eclipse.aether.repository.Proxy;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.util.repository.AuthenticationBuilder;
 
 /**
  * <strong>Warning:</strong> This is an internal utility class that is only public for technical reasons, it is not part
@@ -197,12 +198,14 @@ public class RepositoryUtils
         RemoteRepository result = null;
         if ( repo != null )
         {
-            result = new RemoteRepository( repo.getId(), getLayout( repo ), repo.getUrl() );
-            result.setPolicy( true, toPolicy( repo.getSnapshots() ) );
-            result.setPolicy( false, toPolicy( repo.getReleases() ) );
-            result.setAuthentication( toAuthentication( repo.getAuthentication() ) );
-            result.setProxy( toProxy( repo.getProxy() ) );
-            result.setMirroredRepositories( toRepos( repo.getMirroredRepositories() ) );
+            RemoteRepository.Builder builder =
+                new RemoteRepository.Builder( repo.getId(), getLayout( repo ), repo.getUrl() );
+            builder.setSnapshotPolicy( toPolicy( repo.getSnapshots() ) );
+            builder.setReleasePolicy( toPolicy( repo.getReleases() ) );
+            builder.setAuthentication( toAuthentication( repo.getAuthentication() ) );
+            builder.setProxy( toProxy( repo.getProxy() ) );
+            builder.setMirroredRepositories( toRepos( repo.getMirroredRepositories() ) );
+            result = builder.build();
         }
         return result;
     }
@@ -247,8 +250,10 @@ public class RepositoryUtils
         Authentication result = null;
         if ( auth != null )
         {
-            result =
-                new Authentication( auth.getUsername(), auth.getPassword(), auth.getPrivateKey(), auth.getPassphrase() );
+            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
+            authBuilder.addUsername( auth.getUsername() ).addPassword( auth.getPassword() );
+            authBuilder.addPrivateKey( auth.getPrivateKey(), auth.getPassphrase() );
+            result = authBuilder.build();
         }
         return result;
     }
@@ -258,8 +263,9 @@ public class RepositoryUtils
         Proxy result = null;
         if ( proxy != null )
         {
-            Authentication auth = new Authentication( proxy.getUserName(), proxy.getPassword() );
-            result = new Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), auth );
+            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
+            authBuilder.addUsername( proxy.getUserName() ).addPassword( proxy.getPassword() );
+            result = new Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), authBuilder.build() );
         }
         return result;
     }
@@ -344,4 +350,14 @@ public class RepositoryUtils
 
     }
 
+    public static Collection<Artifact> toArtifacts( Collection<org.apache.maven.artifact.Artifact> artifactsToConvert )
+    {
+        List<Artifact> artifacts = new ArrayList<Artifact>();
+        for ( org.apache.maven.artifact.Artifact a : artifactsToConvert )
+        {
+            artifacts.add( toArtifact( a ) );
+        }
+        return artifacts;
+    }
+
 }
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java
index fb1dffe..e419ef9 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java
@@ -25,6 +25,29 @@ import org.apache.maven.artifact.Artifact;
 public class ArtifactMetadataRetrievalException
     extends org.apache.maven.repository.legacy.metadata.ArtifactMetadataRetrievalException
 {
+
+    /** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */
+    @Deprecated
+    public ArtifactMetadataRetrievalException( String message )
+    {
+        super( message, null, null );
+    }
+
+    /** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */
+    @Deprecated
+    public ArtifactMetadataRetrievalException( Throwable cause )
+    {
+        super( null, cause, null );
+    }
+
+    /** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */
+    @Deprecated
+    public ArtifactMetadataRetrievalException( String message,
+                                               Throwable cause )
+    {
+        super( message, cause, null );
+    }
+
     public ArtifactMetadataRetrievalException( String message, Throwable cause, Artifact artifact )
     {
         super( message, cause, artifact );
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
index d77f593..159d3e3 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
@@ -29,21 +29,20 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadataStoreException;
 import org.apache.maven.repository.Proxy;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.metadata.Metadata;
-import org.sonatype.aether.repository.LocalArtifactRegistration;
-import org.sonatype.aether.repository.LocalArtifactRequest;
-import org.sonatype.aether.repository.LocalArtifactResult;
-import org.sonatype.aether.repository.LocalMetadataRegistration;
-import org.sonatype.aether.repository.LocalMetadataRequest;
-import org.sonatype.aether.repository.LocalMetadataResult;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.LocalRepositoryManager;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.FilterRepositorySystemSession;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.repository.LocalArtifactRegistration;
+import org.eclipse.aether.repository.LocalArtifactRequest;
+import org.eclipse.aether.repository.LocalArtifactResult;
+import org.eclipse.aether.repository.LocalMetadataRegistration;
+import org.eclipse.aether.repository.LocalMetadataRequest;
+import org.eclipse.aether.repository.LocalMetadataResult;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * <strong>Warning:</strong> This is an internal utility class that is only public for technical reasons, it is not part
@@ -84,14 +83,7 @@ public class LegacyLocalRepositoryManager
 
         final LocalRepositoryManager llrm = new LegacyLocalRepositoryManager( repository );
 
-        return new FilterRepositorySystemSession( session )
-        {
-            @Override
-            public LocalRepositoryManager getLocalRepositoryManager()
-            {
-                return llrm;
-            }
-        };
+        return new DefaultRepositorySystemSession( session ).setLocalRepositoryManager( llrm );
     }
 
     private LegacyLocalRepositoryManager( ArtifactRepository delegate )
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
index 36c20e5..7ded223 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
@@ -205,7 +205,6 @@ public class MavenArtifactRepository
     // Path Utils
 
     /**
-     * /**
      * Return the protocol name.
      * <br/>
      * E.g: for input
@@ -291,7 +290,7 @@ public class MavenArtifactRepository
 
     /**
      * Decodes the specified (portion of a) URL. <strong>Note:</strong> This decoder assumes that ISO-8859-1 is used to
-     * convert URL-encoded octets to characters.
+     * convert URL-encoded bytes to characters.
      *
      * @param url The URL to decode, may be <code>null</code>.
      * @return The decoded URL or <code>null</code> if the input was <code>null</code>.
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/RepositoryCache.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/RepositoryCache.java
index 8fd5b08..3afe33d 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/RepositoryCache.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/RepositoryCache.java
@@ -26,6 +26,10 @@ package org.apache.maven.artifact.repository;
  * @author Benjamin Bentmann
  */
 @Deprecated
+//
+// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
+// this here, possibly indefinitely.
+//
 public interface RepositoryCache
 {
 
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java
index 7f554e4..232246f 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java
@@ -39,7 +39,7 @@ public interface MetadataReader
      * The key for the option to enable strict parsing. This option is of type {@link Boolean} and defaults to {@code
      * true}. If {@code false}, unknown elements will be ignored instead of causing a failure.
      */
-    final String IS_STRICT = "org.apache.maven.artifact.repository.metadata.io.isStrict";
+    String IS_STRICT = "org.apache.maven.artifact.repository.metadata.io.isStrict";
 
     /**
      * Reads the metadata from the specified file.
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
index 4b84ba1..890b466 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
@@ -62,7 +62,7 @@ public class ArtifactResolutionRequest
     private List<ResolutionListener> listeners = new ArrayList<ResolutionListener>();
 
     // This is like a filter but overrides all transitive versions 
-    private Map managedVersionMap;
+    private Map<String, Artifact> managedVersionMap;
     
     private boolean resolveRoot = true;
 
@@ -195,12 +195,12 @@ public class ArtifactResolutionRequest
         return this;
     }
 
-    public Map getManagedVersionMap()
+    public Map<String, Artifact> getManagedVersionMap()
     {
         return managedVersionMap;
     }
 
-    public ArtifactResolutionRequest setManagedVersionMap( Map managedVersionMap )
+    public ArtifactResolutionRequest setManagedVersionMap( Map<String, Artifact> managedVersionMap )
     {
         this.managedVersionMap = managedVersionMap;
 
@@ -243,16 +243,6 @@ public class ArtifactResolutionRequest
         return sb.toString();
     }
 
-    public RepositoryCache getCache()
-    {
-        return null;
-    }
-
-    public ArtifactResolutionRequest setCache( RepositoryCache cache )
-    {
-        return this;
-    }
-
     public boolean isOffline()
     {
         return offline;
@@ -328,4 +318,12 @@ public class ArtifactResolutionRequest
         return proxies;
     }
 
+    //
+    // Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
+    // this here, possibly indefinitely.
+    //
+    public ArtifactResolutionRequest setCache( RepositoryCache cache )                                                                                             
+    {                                                                                                                                                              
+        return this;                                                                                                                                               
+    }                    
 }
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java
index 7d8740b..45ce845 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java
@@ -54,12 +54,8 @@ public class ExclusionSetFilter
 
         id = artifact.getGroupId() + ':' + id;
 
-        if ( excludes.contains( id ) )
-        {
-            return false;
-        }
+        return !excludes.contains( id );
 
-        return true;
     }
 
     @Override
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java b/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java
index e79fa9d..562d6f4 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java
@@ -21,7 +21,7 @@ package org.apache.maven.classrealm;
 
 import java.io.File;
 
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
index fe43b52..9391f6a 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
@@ -25,7 +25,7 @@ import java.util.Map;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * Manages the class realms used by Maven. <strong>Warning:</strong> This is an internal utility interface that is only
@@ -64,7 +64,7 @@ public interface ClassRealmManager
     /**
      * Creates a new class realm for the specified build extension.
      * 
-     * @param plugin The extension plugin for which to create a realm, must not be {@code null}.
+     * @param extension The extension plugin for which to create a realm, must not be {@code null}.
      * @param artifacts The artifacts to add to the class realm, may be {@code null}. Unresolved artifacts (i.e. with a
      *            missing file) will automatically be excluded from the realm.
      * @return The new extension realm, never {@code null}.
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index 2ddbd45..41c7dc2 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -45,7 +45,7 @@ import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * Manages the class realms used by Maven. <strong>Warning:</strong> This is an internal utility class that is only
@@ -163,19 +163,20 @@ public class DefaultClassRealmManager
         imports.put( "org.apache.maven.wagon.resource", coreRealm );
 
         // aether-api, aether-spi, aether-impl
-        imports.put( "org.sonatype.aether.*", coreRealm );
-        imports.put( "org.sonatype.aether.artifact", coreRealm );
-        imports.put( "org.sonatype.aether.collection", coreRealm );
-        imports.put( "org.sonatype.aether.deployment", coreRealm );
-        imports.put( "org.sonatype.aether.graph", coreRealm );
-        imports.put( "org.sonatype.aether.impl", coreRealm );
-        imports.put( "org.sonatype.aether.installation", coreRealm );
-        imports.put( "org.sonatype.aether.metadata", coreRealm );
-        imports.put( "org.sonatype.aether.repository", coreRealm );
-        imports.put( "org.sonatype.aether.resolution", coreRealm );
-        imports.put( "org.sonatype.aether.spi", coreRealm );
-        imports.put( "org.sonatype.aether.transfer", coreRealm );
-        imports.put( "org.sonatype.aether.version", coreRealm );
+        imports.put( "org.eclipse.aether.*", coreRealm );
+        imports.put( "org.eclipse.aether.artifact", coreRealm );
+        imports.put( "org.eclipse.aether.collection", coreRealm );
+        imports.put( "org.eclipse.aether.deployment", coreRealm );
+        imports.put( "org.eclipse.aether.graph", coreRealm );
+        imports.put( "org.eclipse.aether.impl", coreRealm );
+        imports.put( "org.eclipse.aether.internal.impl", coreRealm );
+        imports.put( "org.eclipse.aether.installation", coreRealm );
+        imports.put( "org.eclipse.aether.metadata", coreRealm );
+        imports.put( "org.eclipse.aether.repository", coreRealm );
+        imports.put( "org.eclipse.aether.resolution", coreRealm );
+        imports.put( "org.eclipse.aether.spi", coreRealm );
+        imports.put( "org.eclipse.aether.transfer", coreRealm );
+        imports.put( "org.eclipse.aether.version", coreRealm );
 
         // plexus-classworlds
         imports.put( "org.codehaus.plexus.classworlds", coreRealm );
@@ -183,6 +184,12 @@ public class DefaultClassRealmManager
         // classworlds (for legacy code)
         imports.put( "org.codehaus.classworlds", coreRealm );
 
+        // plexus-utils (for DOM-type fields in maven-model)
+        imports.put( "org.codehaus.plexus.util.xml.Xpp3Dom", coreRealm );
+        imports.put( "org.codehaus.plexus.util.xml.pull.XmlPullParser", coreRealm );
+        imports.put( "org.codehaus.plexus.util.xml.pull.XmlPullParserException", coreRealm );
+        imports.put( "org.codehaus.plexus.util.xml.pull.XmlSerializer", coreRealm );
+
         // plexus-container, plexus-component-annotations
         imports.put( "org.codehaus.plexus.*", coreRealm );
         imports.put( "org.codehaus.plexus.component", coreRealm );
@@ -193,11 +200,26 @@ public class DefaultClassRealmManager
         imports.put( "org.codehaus.plexus.logging", coreRealm );
         imports.put( "org.codehaus.plexus.personality", coreRealm );
 
-        // plexus-utils (for maven-model)
-        imports.put( "org.codehaus.plexus.util.xml.Xpp3Dom", coreRealm );
-        imports.put( "org.codehaus.plexus.util.xml.pull.XmlPullParser", coreRealm );
-        imports.put( "org.codehaus.plexus.util.xml.pull.XmlPullParserException", coreRealm );
-        imports.put( "org.codehaus.plexus.util.xml.pull.XmlSerializer", coreRealm );
+        // javax.inject (JSR-330)
+        imports.put( "javax.inject.*", coreRealm );
+        imports.put( "javax.enterprise.inject.*", coreRealm );
+
+        // com.google
+        //
+        // We may potentially want to export these, but right now I'm not sure that anything Guice specific needs
+        // to be made available to plugin authors. If we find people are getting fancy and want to take advantage
+        // of Guice specifics we can expose that later. Really some testing needs to be done to see full hiding
+        // of Guice has any impact on what we may categorize as a standard JSR-330 based Tesla/Maven plugin.
+        //
+        // imports.put( "com.google.inject.*", coreRealm );
+        // imports.put( "com.google.inject.binder.*", coreRealm );
+        // imports.put( "com.google.inject.matcher.*", coreRealm );
+        // imports.put( "com.google.inject.name.*", coreRealm );
+        // imports.put( "com.google.inject.spi.*", coreRealm );
+        // imports.put( "com.google.inject.util.*", coreRealm );
+
+        // SLF4J
+        imports.put( "org.slf4j.*", coreRealm );
     }
 
     /**
diff --git a/maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationRequest.java b/maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationRequest.java
index a79082e..6f3f2fe 100644
--- a/maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationRequest.java
@@ -74,7 +74,7 @@ public interface BeanConfigurationRequest
     /**
      * Returns configuration element name or {@code null}. 
      * 
-     * @see {@link #setConfiguration(Object, String)}
+     * @see #setConfiguration(Object, String)
      * 
      * @return Configuration element name or {@code null}
      */
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
index 6646458..0913227 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
@@ -21,6 +21,7 @@ package org.apache.maven.eventspy;
 
 /**
  * A skeleton eventspy that does nothing other than helping implementors.
+ * @since 3.0.2
  */
 public abstract class AbstractEventSpy
     implements EventSpy
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java b/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java
index eea8321..a183b82 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java
+++ b/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java
@@ -27,6 +27,7 @@ import java.util.Map;
  * looks up all implementators of this interface and calls their {@link #init(Context)} method. <em>Note:</em>
  * Implementors are strongly advised to inherit from {@link AbstractEventSpy} instead of directly implementing this
  * interface.
+ * @since 3.0.2
  */
 public interface EventSpy
 {
@@ -54,15 +55,15 @@ public interface EventSpy
     /**
      * Notifies the spy of some build event/operation.
      * 
-     * @param event The event, never {@@code null}.
+     * @param event The event, never {@code null}.
      * @see org.apache.maven.settings.building.SettingsBuildingRequest
      * @see org.apache.maven.settings.building.SettingsBuildingResult
      * @see org.apache.maven.execution.MavenExecutionRequest
      * @see org.apache.maven.execution.MavenExecutionResult
      * @see org.apache.maven.project.DependencyResolutionRequest
-     * @see org.apache.maven.project.DependencyResolutionResultt
+     * @see org.apache.maven.project.DependencyResolutionResult
      * @see org.apache.maven.execution.ExecutionEvent
-     * @see org.sonatype.aether.RepositoryEvent
+     * @see org.eclipse.aether.RepositoryEvent
      */
     void onEvent( Object event )
         throws Exception;
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java
index e527336..d44642d 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java
+++ b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java
@@ -27,10 +27,11 @@ import org.apache.maven.execution.ExecutionListener;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.RepositoryListener;
+import org.eclipse.aether.RepositoryListener;
 
 /**
  * Dispatches callbacks to all registered eventspies.
+ * @since 3.0.2
  */
 @Component( role = EventSpyDispatcher.class )
 public class EventSpyDispatcher
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyExecutionListener.java b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyExecutionListener.java
index bce421d..6b25da5 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyExecutionListener.java
+++ b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyExecutionListener.java
@@ -25,6 +25,7 @@ import org.apache.maven.execution.ExecutionListener;
 
 /**
  * Forwards execution events to eventspies.
+ * @since 3.0.2
  */
 class EventSpyExecutionListener
     extends AbstractExecutionListener
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyRepositoryListener.java b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyRepositoryListener.java
index f7df6f8..60d4cd1 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyRepositoryListener.java
+++ b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyRepositoryListener.java
@@ -19,12 +19,13 @@ package org.apache.maven.eventspy.internal;
  * under the License.
  */
 
-import org.sonatype.aether.AbstractRepositoryListener;
-import org.sonatype.aether.RepositoryEvent;
-import org.sonatype.aether.RepositoryListener;
+import org.eclipse.aether.AbstractRepositoryListener;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositoryListener;
 
 /**
  * Forwards repository events to eventspies.
+ * @since 3.0.2
  */
 class EventSpyRepositoryListener
     extends AbstractRepositoryListener
diff --git a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
index e6834e5..5452fdf 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
@@ -19,6 +19,8 @@ package org.apache.maven.exception;
  * under the License.
  */
 
+import java.io.IOException;
+import java.net.ConnectException;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.List;
@@ -29,6 +31,7 @@ import org.apache.maven.model.building.ModelProblemUtils;
 import org.apache.maven.plugin.AbstractMojoExecutionException;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.PluginContainerException;
 import org.apache.maven.plugin.PluginExecutionException;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.project.ProjectBuildingResult;
@@ -175,6 +178,16 @@ public class DefaultExceptionHandler
             if ( exception instanceof MojoExecutionException )
             {
                 reference = MojoExecutionException.class.getSimpleName();
+
+                Throwable cause = exception.getCause();
+                if ( cause instanceof IOException )
+                {
+                    cause = cause.getCause();
+                    if ( cause instanceof ConnectException )
+                    {
+                        reference = ConnectException.class.getSimpleName();
+                    }
+                }
             }
             else if ( exception instanceof MojoFailureException )
             {
@@ -186,7 +199,23 @@ public class DefaultExceptionHandler
             }
             else if ( exception instanceof PluginExecutionException )
             {
-                reference = getReference( exception.getCause() );
+                Throwable cause = exception.getCause();
+
+                if ( cause instanceof PluginContainerException )
+                {
+                    Throwable cause2 = cause.getCause();
+
+                    if ( cause2 instanceof NoClassDefFoundError
+                        && cause2.getMessage().contains( "org/sonatype/aether/" ) )
+                    {
+                        reference = "AetherClassNotFound";
+                    }
+                }
+
+                if ( StringUtils.isEmpty( reference ) )
+                {
+                    reference = getReference( cause );
+                }
 
                 if ( StringUtils.isEmpty( reference ) )
                 {
diff --git a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
index 4dec0ee..945edf6 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
@@ -19,6 +19,11 @@ package org.apache.maven.exception;
  * under the License.
  */
 
+/**
+ * Transform an exception into useful end-user message.
+ *
+ * @since 3.0-alpha-3
+ */
 public interface ExceptionHandler    
 {
     ExceptionSummary handleException( Throwable e );
diff --git a/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java b/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java
index 048698e..2b7f27b 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java
@@ -22,13 +22,16 @@ package org.apache.maven.exception;
 import java.util.Collections;
 import java.util.List;
 
-// provide a
-// - the exception
-// - useful message
-// - useful reference to a solution, or set of solutions
-// - the configuration gleaned for examination
-// - plugin repositories
-
+/**
+ * Provide a summary of the exception, containing:<ul>
+ * <li>the exception itself,</li>
+ * <li>useful end-user message,</li>
+ * <li>useful reference to a solution, or set of solutions: this is usually a wiki page url in
+ * <a href="http://cwiki.apache.org/confluence/display/MAVEN/">http://cwiki.apache.org/confluence/display/MAVEN/</a>,
+ * </li>
+ * <li>child exception summaries.</li>
+ * </ul>
+ */
 public class ExceptionSummary
 {
 
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
index 78436be..ef769d9 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
@@ -32,10 +32,10 @@ import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
-import org.sonatype.aether.RepositoryCache;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.transfer.TransferListener;
-import org.sonatype.aether.util.DefaultRepositoryCache;
+import org.eclipse.aether.DefaultRepositoryCache;
+import org.eclipse.aether.RepositoryCache;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.transfer.TransferListener;
 
 /**
  * @author Jason van Zyl
@@ -143,6 +143,8 @@ public class DefaultMavenExecutionRequest
      */
     private boolean noSnapshotUpdates;
 
+    private boolean useSimpleLocalRepositoryManager = false;
+
     public DefaultMavenExecutionRequest()
     {
     }
@@ -1076,4 +1078,14 @@ public class DefaultMavenExecutionRequest
         return this;
     }
 
+    public boolean isUseLegacyLocalRepository()
+    {
+        return this.useSimpleLocalRepositoryManager;
+    }
+
+    public MavenExecutionRequest setUseLegacyLocalRepository( boolean useSimpleLocalRepositoryManager )
+    {
+        this.useSimpleLocalRepositoryManager = useSimpleLocalRepositoryManager;
+        return this;
+    }
 }
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
index d2f8111..cb22b38 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
@@ -19,7 +19,6 @@ package org.apache.maven.execution;
  * under the License.
  */
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.IdentityHashMap;
 import java.util.List;
@@ -39,7 +38,7 @@ public class DefaultMavenExecutionResult
 
     private DependencyResolutionResult dependencyResolutionResult;
 
-    private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>(  );
+    private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>();
 
     private Map<MavenProject, BuildSummary> buildSummaries;
 
diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
index ef91ccf..a3160fe 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
@@ -32,9 +32,9 @@ import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.RepositoryCache;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.transfer.TransferListener;
+import org.eclipse.aether.RepositoryCache;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.transfer.TransferListener;
 
 /**
  * @author Jason van Zyl
@@ -45,45 +45,45 @@ public interface MavenExecutionRequest
     // Logging
     // ----------------------------------------------------------------------
 
-    final int LOGGING_LEVEL_DEBUG = Logger.LEVEL_DEBUG;
+    int LOGGING_LEVEL_DEBUG = Logger.LEVEL_DEBUG;
 
-    final int LOGGING_LEVEL_INFO = Logger.LEVEL_INFO;
+    int LOGGING_LEVEL_INFO = Logger.LEVEL_INFO;
 
-    final int LOGGING_LEVEL_WARN = Logger.LEVEL_WARN;
+    int LOGGING_LEVEL_WARN = Logger.LEVEL_WARN;
 
-    final int LOGGING_LEVEL_ERROR = Logger.LEVEL_ERROR;
+    int LOGGING_LEVEL_ERROR = Logger.LEVEL_ERROR;
 
-    final int LOGGING_LEVEL_FATAL = Logger.LEVEL_FATAL;
+    int LOGGING_LEVEL_FATAL = Logger.LEVEL_FATAL;
 
-    final int LOGGING_LEVEL_DISABLED = Logger.LEVEL_DISABLED;
+    int LOGGING_LEVEL_DISABLED = Logger.LEVEL_DISABLED;
 
     // ----------------------------------------------------------------------
     // Reactor Failure Mode
     // ----------------------------------------------------------------------
 
-    final String REACTOR_FAIL_FAST = "FAIL_FAST";
+    String REACTOR_FAIL_FAST = "FAIL_FAST";
 
-    final String REACTOR_FAIL_AT_END = "FAIL_AT_END";
+    String REACTOR_FAIL_AT_END = "FAIL_AT_END";
 
-    final String REACTOR_FAIL_NEVER = "FAIL_NEVER";
+    String REACTOR_FAIL_NEVER = "FAIL_NEVER";
 
     // ----------------------------------------------------------------------
     // Reactor Make Mode
     // ----------------------------------------------------------------------
 
-    final String REACTOR_MAKE_UPSTREAM = "make-upstream";
+    String REACTOR_MAKE_UPSTREAM = "make-upstream";
 
-    final String REACTOR_MAKE_DOWNSTREAM = "make-downstream";
+    String REACTOR_MAKE_DOWNSTREAM = "make-downstream";
 
-    final String REACTOR_MAKE_BOTH = "make-both";
+    String REACTOR_MAKE_BOTH = "make-both";
 
     // ----------------------------------------------------------------------
     // Artifact repository policies
     // ----------------------------------------------------------------------
 
-    final String CHECKSUM_POLICY_FAIL = ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL;
+    String CHECKSUM_POLICY_FAIL = ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL;
 
-    final String CHECKSUM_POLICY_WARN = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
+    String CHECKSUM_POLICY_WARN = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
 
     // ----------------------------------------------------------------------
     //
@@ -261,7 +261,7 @@ public interface MavenExecutionRequest
      * mirrors then it's easier to just replace the whole list with a new list of transformed repositories.
      *
      * @param repositories
-     * @return
+     * @return This request, never {@code null}.
      */
     MavenExecutionRequest setRemoteRepositories( List<ArtifactRepository> repositories );
     List<ArtifactRepository> getRemoteRepositories();
@@ -283,4 +283,14 @@ public interface MavenExecutionRequest
 
     ProjectBuildingRequest getProjectBuildingRequest();
 
+    /**
+     * @since 3.1
+     */
+    boolean isUseLegacyLocalRepository();
+
+    /**
+     * @since 3.1
+     */
+    MavenExecutionRequest setUseLegacyLocalRepository( boolean useLegacyLocalRepository );
+
 }
diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
index 9975151..214aed8 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
@@ -36,7 +36,7 @@ import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.settings.Settings;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * @author Jason van Zyl
@@ -184,12 +184,6 @@ public class MavenSession
         return container.lookupMap( role );
     }
 
-    @Deprecated
-    public RepositoryCache getRepositoryCache()
-    {
-        return null;
-    }
-
     public ArtifactRepository getLocalRepository()
     {
         return request.getLocalRepository();
@@ -362,11 +356,6 @@ public class MavenSession
         }
     }
 
-    private String getId( MavenProject project )
-    {
-        return project.getGroupId() + ':' + project.getArtifactId() + ':' + project.getVersion();
-    }
-
     @Deprecated
     public EventDispatcher getEventDispatcher()
     {
@@ -393,4 +382,14 @@ public class MavenSession
         return repositorySession;
     }
 
+    @Deprecated
+    //
+    // Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
+    // this here, possibly indefinitely.
+    //
+    public RepositoryCache getRepositoryCache()
+    {
+        return null;
+    }
+
 }
diff --git a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java
index 6cbc133..97d5857 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java
@@ -127,12 +127,12 @@ public class ReactorManager
 
             if ( dependents != null && !dependents.isEmpty() )
             {
-                for ( Iterator it = dependents.iterator(); it.hasNext(); )
+                for ( Object dependent : dependents )
                 {
-                    String dependentId = (String) it.next();
+                    String dependentId = (String) dependent;
 
-                    if ( !buildSuccessesByProject.containsKey( dependentId )
-                        && !buildFailuresByProject.containsKey( dependentId ) )
+                    if ( !buildSuccessesByProject.containsKey( dependentId ) && !buildFailuresByProject.containsKey(
+                        dependentId ) )
                     {
                         blackList( dependentId );
                     }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java b/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java
index 79a913b..a1d1cb4 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java
@@ -32,6 +32,7 @@ import java.util.Set;
 import org.apache.maven.lifecycle.internal.ExecutionPlanItem;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.MojoExecution;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
 
 //TODO: lifecycles being executed
 //TODO: what runs in each phase
@@ -170,7 +171,11 @@ public class MavenExecutionPlan
         return result;
     }
 
-
+    /**
+     * Get set of plugins having a goal/mojo used but not marked @threadSafe
+     *
+     * @return the set of plugins (without info on which goal is concerned)
+     */
     public Set<Plugin> getNonThreadSafePlugins()
     {
         Set<Plugin> plugins = new HashSet<Plugin>();
@@ -185,6 +190,25 @@ public class MavenExecutionPlan
         return plugins;
     }
 
+    /**
+     * Get set of mojos used but not marked @threadSafe
+     *
+     * @return the set of mojo descriptors
+     */
+    public Set<MojoDescriptor> getNonThreadSafeMojos()
+    {
+        Set<MojoDescriptor> mojos = new HashSet<MojoDescriptor>();
+        for ( ExecutionPlanItem executionPlanItem : planItem )
+        {
+            final MojoExecution mojoExecution = executionPlanItem.getMojoExecution();
+            if ( !mojoExecution.getMojoDescriptor().isThreadSafe() )
+            {
+                mojos.add( mojoExecution.getMojoDescriptor() );
+            }
+        }
+        return mojos;
+    }
+
     // Used by m2e but will be removed, really.
     @Deprecated
     public List<MojoExecution> getExecutions()
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
index 92dc691..2c228ba 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
@@ -35,6 +35,7 @@ import org.apache.maven.plugin.MojoNotFoundException;
 import org.apache.maven.plugin.PluginDescriptorParsingException;
 import org.apache.maven.plugin.PluginNotFoundException;
 import org.apache.maven.plugin.PluginResolutionException;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException;
 import org.apache.maven.plugin.version.PluginVersionResolutionException;
 import org.apache.maven.project.MavenProject;
@@ -47,7 +48,7 @@ import java.util.Set;
 
 /**
  * Common code that is shared by the LifecycleModuleBuilder and the LifeCycleWeaveBuilder
- * 
+ *
  * @since 3.0
  * @author Kristian Rosenvold
  *         Builds one or more lifecycles for a full module
@@ -69,7 +70,6 @@ public class BuilderCommon
     private Logger logger;
 
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public BuilderCommon()
     {
     }
@@ -101,17 +101,30 @@ public class BuilderCommon
             {
                 logger.warn( "*****************************************************************" );
                 logger.warn( "* Your build is requesting parallel execution, but project      *" );
-                logger.warn( "* contains the following plugin(s) that are not marked as       *" );
-                logger.warn( "* @threadSafe to support parallel building.                     *" );
+                logger.warn( "* contains the following plugin(s) that have goals not marked   *" );
+                logger.warn( "* as @threadSafe to support parallel building.                  *" );
                 logger.warn( "* While this /may/ work fine, please look for plugin updates    *" );
                 logger.warn( "* and/or request plugins be made thread-safe.                   *" );
                 logger.warn( "* If reporting an issue, report it against the plugin in        *" );
                 logger.warn( "* question, not against maven-core                              *" );
                 logger.warn( "*****************************************************************" );
-                logger.warn( "The following plugins are not marked @threadSafe in " + project.getName() + ":" );
-                for ( Plugin unsafePlugin : unsafePlugins )
+                if ( logger.isDebugEnabled() )
+                {
+                    final Set<MojoDescriptor> unsafeGoals = executionPlan.getNonThreadSafeMojos();
+                    logger.warn( "The following goals are not marked @threadSafe in " + project.getName() + ":" );
+                    for ( MojoDescriptor unsafeGoal : unsafeGoals )
+                    {
+                        logger.warn( unsafeGoal.getId() );
+                    }
+                }
+                else
                 {
-                    logger.warn( unsafePlugin.getId() );
+                    logger.warn( "The following plugins are not marked @threadSafe in " + project.getName() + ":" );
+                    for ( Plugin unsafePlugin : unsafePlugins )
+                    {
+                        logger.warn( unsafePlugin.getId() );
+                    }
+                    logger.warn( "Enable debug to see more precisely which goals are not marked @threadSafe." );
                 }
                 logger.warn( "*****************************************************************" );
             }
@@ -121,7 +134,8 @@ public class BuilderCommon
     }
 
     public void handleBuildError( final ReactorContext buildContext, final MavenSession rootSession,
-                                  final MavenProject mavenProject, Exception e, final long buildStartTime )
+                                  final MavenSession currentSession, final MavenProject mavenProject, Exception e,
+                                  final long buildStartTime )
     {
         if ( e instanceof RuntimeException )
         {
@@ -134,7 +148,7 @@ public class BuilderCommon
 
         buildContext.getResult().addBuildSummary( new BuildFailure( mavenProject, buildEndTime - buildStartTime, e ) );
 
-        eventCatapult.fire( ExecutionEvent.Type.ProjectFailed, rootSession, null, e );
+        eventCatapult.fire( ExecutionEvent.Type.ProjectFailed, currentSession, null, e );
 
         if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( rootSession.getReactorFailureBehavior() ) )
         {
@@ -173,5 +187,4 @@ public class BuilderCommon
         return project.getGroupId() + ':' + project.getArtifactId() + ':' + project.getVersion();
     }
 
-
-}
\ No newline at end of file
+}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CurrentPhaseForThread.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CurrentPhaseForThread.java
index 548bfca..f054253 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CurrentPhaseForThread.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CurrentPhaseForThread.java
@@ -29,17 +29,16 @@ package org.apache.maven.lifecycle.internal;
  */
 class CurrentPhaseForThread
 {
-    private static final InheritableThreadLocal<String> threadPhase = new InheritableThreadLocal<String>();
-
+    private static final InheritableThreadLocal<String> THREAD_PHASE = new InheritableThreadLocal<String>();
 
     public static void setPhase( String phase )
     {
-        threadPhase.set( phase );
+        THREAD_PHASE.set( phase );
     }
 
     public static boolean isPhase( String phase )
     {
-        return phase.equals( threadPhase.get() );
+        return phase.equals( THREAD_PHASE.get() );
     }
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
index b28e6c0..58a7a62 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
@@ -1,18 +1,23 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *  http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-package org.apache.maven.lifecycle.internal;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -219,11 +224,10 @@ public class DefaultLifecycleExecutionPlanCalculator
 
         if ( lifecycle == null )
         {
-            throw new LifecyclePhaseNotFoundException(
-                "Unknown lifecycle phase \"" + lifecyclePhase + "\". You must specify a valid lifecycle phase" +
-                    " or a goal in the format <plugin-prefix>:<goal> or" +
-                    " <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: " +
-                    defaultLifeCycles.getLifecyclePhaseList() + ".", lifecyclePhase );
+            throw new LifecyclePhaseNotFoundException( "Unknown lifecycle phase \"" + lifecyclePhase
+                + "\". You must specify a valid lifecycle phase" + " or a goal in the format <plugin-prefix>:<goal> or"
+                + " <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: "
+                + defaultLifeCycles.getLifecyclePhaseList() + ".", lifecyclePhase );
         }
 
         /*
@@ -432,8 +436,8 @@ public class DefaultLifecycleExecutionPlanCalculator
                 {
                     parameterConfiguration = new Xpp3Dom( parameterConfiguration, parameter.getName() );
 
-                    if ( StringUtils.isEmpty( parameterConfiguration.getAttribute( "implementation" ) ) &&
-                        StringUtils.isNotEmpty( parameter.getImplementation() ) )
+                    if ( StringUtils.isEmpty( parameterConfiguration.getAttribute( "implementation" ) )
+                        && StringUtils.isNotEmpty( parameter.getImplementation() ) )
                     {
                         parameterConfiguration.setAttribute( "implementation", parameter.getImplementation() );
                     }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
index afd0034..a5e6a34 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
@@ -80,8 +80,8 @@ public class DefaultLifecyclePluginAnalyzer
     {
         if ( logger.isDebugEnabled() )
         {
-            logger.debug( "Looking up lifecyle mappings for packaging " + packaging + " from " +
-                Thread.currentThread().getContextClassLoader() );
+            logger.debug( "Looking up lifecyle mappings for packaging " + packaging + " from "
+                + Thread.currentThread().getContextClassLoader() );
         }
 
         LifecycleMapping lifecycleMappingForPackaging = lifecycleMappings.get( packaging );
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java
index 54e5756..bed9a73 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java
@@ -92,13 +92,8 @@ public class DependencyContext
 
     public boolean isResolutionRequiredForCurrentProject()
     {
-        if ( lastDependencyArtifacts != project.getDependencyArtifacts()
-            || ( lastDependencyArtifacts != null && lastDependencyArtifactCount != lastDependencyArtifacts.size() ) )
-        {
-            return true;
-
-        }
-        return false;
+        return lastDependencyArtifacts != project.getDependencyArtifacts() || ( lastDependencyArtifacts != null
+            && lastDependencyArtifactCount != lastDependencyArtifacts.size() );
     }
 
     public boolean isResolutionRequiredForAggregatedProjects( Collection<String> scopesToCollect,
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java
index 075524a..027b241 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java
@@ -94,8 +94,8 @@ public class ExecutionPlanItem
     @Override
     public String toString()
     {
-        return "ExecutionPlanItem{" + ", mojoExecution=" + mojoExecution + ", schedule=" + schedule + '}' +
-            super.toString();
+        return "ExecutionPlanItem{" + ", mojoExecution=" + mojoExecution + ", schedule=" + schedule + '}'
+            + super.toString();
     }
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java
index 76c5e0b..25a1e7d 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java
@@ -53,7 +53,6 @@ public class LifecycleDebugLogger
     private Logger logger;
 
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public LifecycleDebugLogger()
     {
     }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
index 32c9ab7..a76461d 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
@@ -1,20 +1,33 @@
 package org.apache.maven.lifecycle.internal;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *  http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under                    
- * the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
@@ -31,13 +44,11 @@ import org.apache.maven.project.artifact.InvalidDependencyVersionException;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.util.filter.AndDependencyFilter;
-import org.sonatype.aether.util.filter.ScopeDependencyFilter;
-
-import java.util.*;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.util.filter.AndDependencyFilter;
+import org.eclipse.aether.util.filter.ScopeDependencyFilter;
 
 /**
  * Resolves dependencies for the artifacts in context of the lifecycle build
@@ -49,7 +60,7 @@ import java.util.*;
  *         <p/>
  *         NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
  */
- at Component(role = LifecycleDependencyResolver.class)
+ at Component( role = LifecycleDependencyResolver.class )
 public class LifecycleDependencyResolver
 {
 
@@ -65,7 +76,6 @@ public class LifecycleDependencyResolver
     @Requirement
     private EventSpyDispatcher eventSpyDispatcher;
 
-    @SuppressWarnings({"UnusedDeclaration"})
     public LifecycleDependencyResolver()
     {
     }
@@ -228,7 +238,7 @@ public class LifecycleDependencyResolver
 
         for ( Dependency dependency : dependencies )
         {
-            org.sonatype.aether.artifact.Artifact a = dependency.getArtifact();
+            org.eclipse.aether.artifact.Artifact a = dependency.getArtifact();
             String key = ArtifactUtils.key( a.getGroupId(), a.getArtifactId(), a.getVersion() );
             if ( !projectKeys.contains( key ) )
             {
@@ -310,7 +320,7 @@ public class LifecycleDependencyResolver
             Dependency dependency = node.getDependency();
             if ( dependency != null )
             {
-                org.sonatype.aether.artifact.Artifact a = dependency.getArtifact();
+                org.eclipse.aether.artifact.Artifact a = dependency.getArtifact();
                 String key = ArtifactUtils.key( a.getGroupId(), a.getArtifactId(), a.getVersion() );
                 return !keys.contains( key );
             }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
index fe69c0a..c8a3cf4 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
@@ -32,7 +32,7 @@ import java.util.HashSet;
 
 /**
  * Builds one or more lifecycles for a full module
- * 
+ *
  * @since 3.0
  * @author Benjamin Bentmann
  * @author Jason van Zyl
@@ -92,7 +92,7 @@ public class LifecycleModuleBuilder
         }
         catch ( Exception e )
         {
-            builderCommon.handleBuildError( reactorContext, rootSession, currentProject, e, buildStartTime );
+            builderCommon.handleBuildError( reactorContext, rootSession, session, currentProject, e, buildStartTime );
         }
         finally
         {
@@ -101,4 +101,4 @@ public class LifecycleModuleBuilder
             Thread.currentThread().setContextClassLoader( reactorContext.getOriginalContextClassLoader() );
         }
     }
-}
\ No newline at end of file
+}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
index 208aa6d..c615a6f 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
@@ -52,7 +52,6 @@ public class LifecyclePluginResolver
         this.pluginVersionResolver = pluginVersionResolver;
     }
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public LifecyclePluginResolver()
     {
     }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleThreadedBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleThreadedBuilder.java
index 6d4d0e1..d5c7d9b 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleThreadedBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleThreadedBuilder.java
@@ -52,7 +52,6 @@ public class LifecycleThreadedBuilder
     private LifecycleModuleBuilder lifecycleModuleBuilder;
 
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public LifecycleThreadedBuilder()
     {
     }
@@ -68,19 +67,20 @@ public class LifecycleThreadedBuilder
         for ( TaskSegment taskSegment : currentTaskSegment )
         {
             Map<MavenProject, ProjectSegment> projectBuildMap = projectBuilds.selectSegment( taskSegment );
-                try
-                {
+            try
+            {
                 multiThreadedProjectTaskSegmentBuild( analyzer, reactorContext, session, service, taskSegment,
                                                       projectBuildMap, muxer );
-                    if ( reactorContext.getReactorBuildStatus().isHalted( ) )
-                    {
-                        break;
-                    }
-                }
-                catch ( Exception e )
+                if ( reactorContext.getReactorBuildStatus().isHalted() )
                 {
-                    break;  // Why are we just ignoring this exception? Are exceptions are being used for flow control
+                    break;
                 }
+            }
+            catch ( Exception e )
+            {
+                session.getResult().addException( e );
+                break;
+            }
 
         }
     }
@@ -126,10 +126,12 @@ public class LifecycleThreadedBuilder
             }
             catch ( InterruptedException e )
             {
+                rootSession.getResult().addException( e );
                 break;
             }
             catch ( ExecutionException e )
             {
+                rootSession.getResult().addException( e );
                 break;
             }
         }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
index 1e43dd6..4cfae73 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
@@ -87,7 +87,6 @@ public class LifecycleWeaveBuilder
     private Map<MavenProject, MavenExecutionPlan> executionPlans = new HashMap<MavenProject, MavenExecutionPlan>();
 
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public LifecycleWeaveBuilder()
     {
     }
@@ -213,7 +212,8 @@ public class LifecycleWeaveBuilder
             {
                 Iterator<ExecutionPlanItem> planItems = executionPlan.iterator();
                 ExecutionPlanItem current = planItems.hasNext() ? planItems.next() : null;
-                ThreadLockedArtifact threadLockedArtifact = (ThreadLockedArtifact)projectBuild.getProject().getArtifact();
+                ThreadLockedArtifact threadLockedArtifact =
+                    (ThreadLockedArtifact) projectBuild.getProject().getArtifact();
                 if ( threadLockedArtifact != null )
                 {
                     threadLockedArtifact.attachToThread();
@@ -278,8 +278,8 @@ public class LifecycleWeaveBuilder
                 }
                 catch ( Exception e )
                 {
-                    builderCommon.handleBuildError( reactorContext, rootSession, projectBuild.getProject(), e,
-                                                    buildStartTime );
+                    builderCommon.handleBuildError( reactorContext, rootSession, projectBuild.getSession(),
+                                                    projectBuild.getProject(), e, buildStartTime );
                 }
                 finally
                 {
@@ -376,13 +376,14 @@ public class LifecycleWeaveBuilder
         return null;
     }
 
-    private static boolean isThreadLockedAndEmpty(Artifact artifact){
-        return artifact instanceof  ThreadLockedArtifact && !((ThreadLockedArtifact) artifact).hasReal();
+    private static boolean isThreadLockedAndEmpty( Artifact artifact )
+    {
+        return artifact instanceof ThreadLockedArtifact && !( (ThreadLockedArtifact) artifact ).hasReal();
     }
 
     private static Artifact findDependency( MavenProject project, Artifact upStreamArtifact )
     {
-        if ( upStreamArtifact == null || isThreadLockedAndEmpty(upStreamArtifact))
+        if ( upStreamArtifact == null || isThreadLockedAndEmpty( upStreamArtifact ) )
         {
             return null;
         }
@@ -484,8 +485,6 @@ public class LifecycleWeaveBuilder
             artifactInThis.setFile( upstream.getFile() );
             artifactInThis.setRepository( upstream.getRepository() );
             artifactInThis.setResolved( true ); // Or maybe upstream.isResolved()....
-
         }
     }
-
-}
\ No newline at end of file
+}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java
index 9844003..4347b3c 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java
@@ -60,7 +60,6 @@ import java.util.StringTokenizer;
  *         <p/>
  *         NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
  */
-
 @Component( role = MojoDescriptorCreator.class )
 public class MojoDescriptorCreator
 {
@@ -80,7 +79,6 @@ public class MojoDescriptorCreator
     @Requirement
     private LifecyclePluginResolver lifecyclePluginResolver;
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public MojoDescriptorCreator()
     {
     }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
index 122ff3d..48dde5e 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
@@ -154,7 +154,6 @@ public class MojoExecutor
         phaseRecorder.observeExecution( mojoExecution );
     }
 
-    @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
     private void execute( MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex,
                           DependencyContext dependencyContext )
         throws LifecycleExecutionException
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadConfigurationService.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadConfigurationService.java
index cac7bc4..19b34bc 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadConfigurationService.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadConfigurationService.java
@@ -38,7 +38,6 @@ public class ThreadConfigurationService
     private final int cpuCores;
 
 
-    @SuppressWarnings( { "UnusedDeclaration" } )
     public ThreadConfigurationService()
     {
         cpuCores = Runtime.getRuntime().availableProcessors();
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java
index b566e64..9c6cf40 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java
@@ -52,8 +52,8 @@ class ThreadLockedArtifact
 
     public boolean hasReal()
     {
-        return real != null &&
-            ( !( real instanceof ThreadLockedArtifact ) || ( (ThreadLockedArtifact) real ).hasReal() );
+        return real != null
+            && ( !( real instanceof ThreadLockedArtifact ) || ( (ThreadLockedArtifact) real ).hasReal() );
     }
 
     public String getGroupId()
@@ -96,17 +96,17 @@ class ThreadLockedArtifact
         return real.hasClassifier();
     }
 
-    private static final InheritableThreadLocal<ThreadLockedArtifact> threadArtifact =
+    private static final InheritableThreadLocal<ThreadLockedArtifact> THREAD_ARTIFACT =
         new InheritableThreadLocal<ThreadLockedArtifact>();
 
     public void attachToThread()
     {
-        threadArtifact.set( this );
+        THREAD_ARTIFACT.set( this );
     }
 
     public File getFile()
     {
-        final ThreadLockedArtifact lockedArtifact = threadArtifact.get();
+        final ThreadLockedArtifact lockedArtifact = THREAD_ARTIFACT.get();
         if ( lockedArtifact != null && this != lockedArtifact && mustLock() )
         {
             try
diff --git a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
index 0a20f5a..b45c24c 100644
--- a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
+++ b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
@@ -22,7 +22,6 @@ package org.apache.maven.model.plugin;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -37,6 +36,8 @@ import org.apache.maven.model.PluginManagement;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
@@ -64,7 +65,9 @@ public class DefaultLifecycleBindingsInjector
 
         if ( defaultPlugins == null )
         {
-            problems.add( Severity.ERROR, "Unknown packaging: " + packaging, model.getLocation( "packaging" ), null );
+            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                    .setMessage( "Unknown packaging: " + packaging )
+                    .setLocation( model.getLocation( "packaging" ) ) );
         }
         else if ( !defaultPlugins.isEmpty() )
         {
@@ -76,7 +79,7 @@ public class DefaultLifecycleBindingsInjector
         }
     }
 
-    private static class LifecycleBindingsMerger
+    protected static class LifecycleBindingsMerger
         extends MavenModelMerger
     {
 
@@ -106,18 +109,16 @@ public class DefaultLifecycleBindingsInjector
 
                 Map<Object, Plugin> merged = new LinkedHashMap<Object, Plugin>( ( src.size() + tgt.size() ) * 2 );
 
-                for ( Iterator<Plugin> it = tgt.iterator(); it.hasNext(); )
+                for ( Plugin element : tgt )
                 {
-                    Plugin element = it.next();
                     Object key = getPluginKey( element );
                     merged.put( key, element );
                 }
 
                 Map<Object, Plugin> unmanaged = new LinkedHashMap<Object, Plugin>();
 
-                for ( Iterator<Plugin> it = src.iterator(); it.hasNext(); )
+                for ( Plugin element : src )
                 {
-                    Plugin element = it.next();
                     Object key = getPluginKey( element );
                     Plugin existing = merged.get( key );
                     if ( existing != null )
@@ -136,9 +137,8 @@ public class DefaultLifecycleBindingsInjector
                     PluginManagement pluginMgmt = (PluginManagement) context.get( PLUGIN_MANAGEMENT );
                     if ( pluginMgmt != null )
                     {
-                        for ( Iterator<Plugin> it = pluginMgmt.getPlugins().iterator(); it.hasNext(); )
+                        for ( Plugin managedPlugin : pluginMgmt.getPlugins() )
                         {
-                            Plugin managedPlugin = it.next();
                             Object key = getPluginKey( managedPlugin );
                             Plugin unmanagedPlugin = unmanaged.get( key );
                             if ( unmanagedPlugin != null )
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java
index 48eed40..6c1b9cb 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java
@@ -1,18 +1,22 @@
 package org.apache.maven.plugin;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 import java.util.List;
@@ -22,8 +26,8 @@ import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * @author Jason van Zyl
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
index ec8c4af..cbe1cb0 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
@@ -25,11 +25,11 @@ import java.util.List;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Exclusion;
 import org.apache.maven.model.Plugin;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.RepositoryPolicy;
-import org.sonatype.aether.repository.WorkspaceReader;
-import org.sonatype.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.repository.WorkspaceRepository;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
index 3ae2c58..178f4c8 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
@@ -1,18 +1,22 @@
 package org.apache.maven.plugin;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 import java.io.ByteArrayOutputStream;
@@ -27,13 +31,13 @@ import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 // TODO: the antrun plugin has its own configurator, the only plugin that does. might need to think about how that works
 // TODO: remove the coreArtifactFilterManager
 
- at Component(role = BuildPluginManager.class)
+ at Component( role = BuildPluginManager.class )
 public class DefaultBuildPluginManager
     implements BuildPluginManager
 {
@@ -47,7 +51,8 @@ public class DefaultBuildPluginManager
     /**
      * 
      * @param plugin
-     * @param repositoryRequest
+     * @param repositories
+     * @param session
      * @return PluginDescriptor The component descriptor for the Maven plugin.
      * @throws PluginNotFoundException The plugin could not be found in any repositories.
      * @throws PluginResolutionException The plugin could be found but could not be resolved.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java
index 6348b73..bc10223 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java
@@ -29,7 +29,7 @@ import org.apache.maven.project.ExtensionDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * Default extension realm cache implementation. Assumes cached data does not change.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
index cc2d7bf..145482d 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
@@ -28,12 +28,12 @@ import java.util.Map;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceRepository;
 
 /**
  * @author Igor Fedorenko
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
index 96b8274..4242a32 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
@@ -30,10 +30,10 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.repository.ComponentDescriptor;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceRepository;
 
 /**
  * Caches raw plugin descriptors. A raw plugin descriptor is a descriptor that has just been extracted from the plugin
@@ -96,6 +96,8 @@ public class DefaultPluginDescriptorCache
             clone.setId( original.getId() );
             clone.setIsolatedRealm( original.isIsolatedRealm() );
             clone.setSource( original.getSource() );
+
+            clone.setDependencies( original.getDependencies() );
         }
 
         return clone;
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
index 8962367..e459cbc 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
@@ -29,19 +29,21 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
+import org.codehaus.plexus.classworlds.realm.NoSuchRealmException;
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.WorkspaceRepository;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceRepository;
 
 /**
  * Default PluginCache implementation. Assumes cached data does not change.
  */
 @Component( role = PluginRealmCache.class )
 public class DefaultPluginRealmCache
-    implements PluginRealmCache
+    implements PluginRealmCache, Disposable
 {
 
     protected static class CacheKey
@@ -179,6 +181,18 @@ public class DefaultPluginRealmCache
 
     public void flush()
     {
+        for ( CacheRecord record : cache.values() )
+        {
+            ClassRealm realm = record.realm;
+            try
+            {
+                realm.getWorld().disposeRealm( realm.getId() );
+            }
+            catch ( NoSuchRealmException e )
+            {
+                // ignore
+            }
+        }
         cache.clear();
     }
 
@@ -197,4 +211,9 @@ public class DefaultPluginRealmCache
         // default cache does not track plugin usage
     }
 
+    public void dispose()
+    {
+        flush();
+    }
+
 }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java
index 6a0da57..cf5db3e 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java
@@ -24,7 +24,7 @@ import java.util.List;
 import org.apache.maven.project.ExtensionDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.sonatype.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.Artifact;
 
 /**
  * Caches extension class realms. <strong>Warning:</strong> This is an internal utility interface that is only public
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/LegacySupport.java b/maven-core/src/main/java/org/apache/maven/plugin/LegacySupport.java
index cdbc83d..eef9b4f 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/LegacySupport.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/LegacySupport.java
@@ -20,7 +20,7 @@ package org.apache.maven.plugin;
  */
 
 import org.apache.maven.execution.MavenSession;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * Helps to provide backward-compatibility with plugins that use legacy components. <strong>Warning:</strong> This is an
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java
index 18ca9c9..e62cb9b 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java
@@ -25,9 +25,9 @@ import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Provides basic services to manage Maven plugins and their mojos. This component is kept general in its design such
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java
index 37d9aee..df07d4c 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java
@@ -23,10 +23,10 @@ import java.util.List;
 
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Caches plugin artifacts. <strong>Warning:</strong> This is an internal utility interface that is only public for
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java
index 6b9bf75..4b4f368 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java
@@ -23,8 +23,8 @@ import java.util.List;
 
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Caches raw plugin descriptors. A raw plugin descriptor is a descriptor that has just been extracted from the plugin
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
index 8799250..f14bfc0 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
@@ -19,8 +19,11 @@ package org.apache.maven.plugin;
  * under the License.
  */
 
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.Parameter;
@@ -75,12 +78,68 @@ public class PluginParameterException
                                                                 StringBuilder messageBuffer )
     {
         String expression = param.getExpression();
-
+        
         if ( param.isEditable() )
         {
-            messageBuffer.append( "Inside the definition for plugin \'" + mojo.getPluginDescriptor().getArtifactId()
-                + "\' specify the following:\n\n<configuration>\n  ...\n  <" + param.getName() + ">VALUE</"
-                + param.getName() + ">\n</configuration>" );
+            boolean isArray = param.getType().endsWith( "[]" );
+            boolean isCollection = false;
+            boolean isMap = false;
+            boolean isProperties = false;
+            if ( !isArray )
+            {
+                try
+                {
+                    //assuming Type is available in current ClassLoader
+                    isCollection = Collection.class.isAssignableFrom( Class.forName( param.getType() ) );
+                    isMap = Map.class.isAssignableFrom( Class.forName( param.getType() ) );
+                    isProperties = Properties.class.isAssignableFrom( Class.forName( param.getType() ) );
+                }
+                catch ( ClassNotFoundException e )
+                {
+                    // assume it is not assignable from Collection or Map
+                }
+            }
+            
+            messageBuffer.append( "Inside the definition for plugin \'" );
+            messageBuffer.append( mojo.getPluginDescriptor().getArtifactId() );
+            messageBuffer.append( "\', specify the following:\n\n<configuration>\n  ...\n" );
+            messageBuffer.append( "  <" ).append( param.getName() ).append( '>' );
+            if ( isArray || isCollection )
+            {
+                messageBuffer.append( '\n' );
+                messageBuffer.append( "    <item>" );
+            }
+            else if ( isProperties )
+            {
+                messageBuffer.append( '\n' );
+                messageBuffer.append( "    <property>\n" );
+                messageBuffer.append( "      <name>KEY</name>\n" );
+                messageBuffer.append( "      <value>" );
+            }
+            else if ( isMap )
+            {
+                messageBuffer.append( '\n' );
+                messageBuffer.append( "    <KEY>" );
+            }
+            messageBuffer.append( "VALUE" );
+            if ( isArray || isCollection )
+            {
+                messageBuffer.append( "</item>\n" );
+                messageBuffer.append( "  " );
+            }
+            else if ( isProperties )
+            {
+                messageBuffer.append( "</value>\n" );
+                messageBuffer.append( "    </property>\n" );
+                messageBuffer.append( "  " );
+            }
+            else if ( isMap )
+            {
+                messageBuffer.append( "</KEY>\n" );
+                messageBuffer.append( "  " );
+            }    
+            messageBuffer.append( "</" ).append( param.getName() ).append( ">\n" );
+            messageBuffer.append( "</configuration>" );
 
             String alias = param.getAlias();
             if ( StringUtils.isNotEmpty( alias ) && !alias.equals( param.getName() ) )
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
index 017c8c7..b4b9492 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
@@ -33,7 +33,34 @@ import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
 
 /**
+ * Evaluator for plugin parameters expressions. Content surrounded by <code>${</code> and <code>}</code> is evaluated.
+ * Recognized values are:<table border="1">
+ * <tr><th>expression</th>                     <th></th>               <th>evaluation result</th></tr>
+ * <tr><td><code>session</code></td>           <td></td>               <td>the actual {@link MavenSession}</td></tr>
+ * <tr><td><code>session.*</code></td>         <td>(since Maven 3)</td><td></td></tr>
+ * <tr><td><code>localRepository</code></td>   <td></td>               <td>{@link MavenSession#getLocalRepository()}</td></tr>
+ * <tr><td><code>reactorProjects</code></td>   <td></td>               <td>{@link MavenSession#getProjects()}</td></tr>
+ * <tr><td><code>repositorySystemSession</code></td><td> (since Maven 3)</td><td>{@link MavenSession#getRepositorySession()}</td></tr>
+ * <tr><td><code>project</code></td>           <td></td>               <td>{@link MavenSession#getCurrentProject()}</td></tr>
+ * <tr><td><code>project.*</code></td>         <td></td>               <td></td></tr>
+ * <tr><td><code>pom.*</code></td>             <td>(since Maven 3)</td><td>same as <code>project.*</code></td></tr>
+ * <tr><td><code>executedProject</code></td>   <td></td>               <td>{@link MavenProject#getExecutionProject()}</td></tr>
+ * <tr><td><code>settings</code></td>          <td></td>               <td>{@link MavenSession#getSettings()}</td></tr>
+ * <tr><td><code>settings.*</code></td>        <td></td>               <td></td></tr>
+ * <tr><td><code>basedir</code></td>           <td></td>               <td>{@link MavenSession#getExecutionRootDirectory()} or <code>System.getProperty( "user.dir" )</code> if null</td></tr>
+ * <tr><td><code>mojoExecution</code></td>     <td></td>               <td>the actual {@link MojoExecution}</td></tr>
+ * <tr><td><code>mojo</code></td>              <td>(since Maven 3)</td><td>same as <code>mojoExecution</code></td></tr>
+ * <tr><td><code>mojo.*</code></td>            <td>(since Maven 3)</td><td></td></tr>
+ * <tr><td><code>plugin</code></td>            <td>(since Maven 3)</td><td>{@link MojoExecution#getMojoDescriptor()}.{@link MojoDescriptor#getPluginDescriptor() getPluginDescriptor()}</td></tr>
+ * <tr><td><code>plugin.*</code></td>          <td></td>               <td></td></tr>
+ * <tr><td><code>*</code></td>                 <td></td>               <td>system properties</td></tr>
+ * <tr><td><code>*</code></td>                 <td></td>               <td>project properties</td></tr>
+ * </table>
+ * <i>Notice:</i> <code>reports</code> was supported in Maven 2.x but was removed in Maven 3
+ * 
  * @author Jason van Zyl
+ * @see MavenSession
+ * @see MojoExecution
  */
 public class PluginParameterExpressionEvaluator
     implements TypeAwareExpressionEvaluator
@@ -145,7 +172,7 @@ public class PluginParameterExpressionEvaluator
             }
 
             // Was not an expression
-            if ( expression.indexOf( "$$" ) > -1 )
+            if ( expression.contains( "$$" ) )
             {
                 return expression.replaceAll( "\\$\\$", "\\$" );
             }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java
index 6842081..7c04ed5 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java
@@ -26,9 +26,9 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Caches plugin class realms. <strong>Warning:</strong> This is an internal utility interface that is only public for
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
index aea0963..59047eb 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
@@ -19,10 +19,11 @@ package org.apache.maven.plugin.internal;
  * under the License.
  */
 
+import java.util.concurrent.atomic.AtomicReference;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.LegacySupport;
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * Helps to provide backward-compatibility with plugins that use legacy components. <strong>Warning:</strong> This is an
@@ -37,29 +38,30 @@ public class DefaultLegacySupport
     implements LegacySupport
 {
 
-    private static final ThreadLocal<MavenSession[]> session = new InheritableThreadLocal<MavenSession[]>();
+    private static final ThreadLocal<AtomicReference<MavenSession>> SESSION = new InheritableThreadLocal<AtomicReference<MavenSession>>();
 
     public void setSession( MavenSession session )
     {
-        if ( session == null )
+        AtomicReference<MavenSession> reference = DefaultLegacySupport.SESSION.get();
+        if ( reference != null )
         {
-            MavenSession[] oldSession = DefaultLegacySupport.session.get();
-            if ( oldSession != null )
-            {
-                oldSession[0] = null;
-                DefaultLegacySupport.session.remove();
-            }
+            reference.set( null );
+        }
+
+        if ( session == null && reference != null )
+        {
+            DefaultLegacySupport.SESSION.remove();
         }
         else
         {
-            DefaultLegacySupport.session.set( new MavenSession[] { session } );
+            DefaultLegacySupport.SESSION.set( new AtomicReference<MavenSession>( session ) );
         }
     }
 
     public MavenSession getSession()
     {
-        MavenSession[] currentSession = DefaultLegacySupport.session.get();
-        return currentSession != null ? currentSession[0] : null;
+        AtomicReference<MavenSession> currentSession = DefaultLegacySupport.SESSION.get();
+        return currentSession != null ? currentSession.get() : null;
     }
 
     public RepositorySystemSession getRepositorySession()
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
index 603e670..8f22abe 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
@@ -83,16 +83,17 @@ import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
 import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.LoggerManager;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.util.filter.AndDependencyFilter;
-import org.sonatype.aether.util.graph.PreorderNodeListGenerator;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.util.filter.AndDependencyFilter;
+import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
 
 /**
  * Provides basic services to manage Maven plugins and their mojos. This component is kept general in its design such
@@ -111,6 +112,9 @@ public class DefaultMavenPluginManager
     private Logger logger;
 
     @Requirement
+    private LoggerManager loggerManager;
+
+    @Requirement
     private PlexusContainer container;
 
     @Requirement
@@ -139,7 +143,7 @@ public class DefaultMavenPluginManager
 
         if ( pluginDescriptor == null )
         {
-            org.sonatype.aether.artifact.Artifact artifact =
+            org.eclipse.aether.artifact.Artifact artifact =
                 pluginDependenciesResolver.resolve( plugin, repositories, session );
 
             Artifact pluginArtifact = RepositoryUtils.toArtifact( artifact );
@@ -369,7 +373,7 @@ public class DefaultMavenPluginManager
             }
         }
 
-        List<org.sonatype.aether.artifact.Artifact> pluginArtifacts = nlg.getArtifacts( true );
+        List<org.eclipse.aether.artifact.Artifact> pluginArtifacts = nlg.getArtifacts( true );
 
         ClassRealm pluginRealm =
             classRealmManager.createPluginRealm( plugin, parent, null, foreignImports, pluginArtifacts );
@@ -508,7 +512,8 @@ public class DefaultMavenPluginManager
 
             if ( mojo instanceof Mojo )
             {
-                ( (Mojo) mojo ).setLog( new DefaultLog( logger ) );
+                Logger mojoLogger = loggerManager.getLoggerForComponent( mojoDescriptor.getImplementation() );
+                ( (Mojo) mojo ).setLog( new DefaultLog( mojoLogger ) );
             }
 
             Xpp3Dom dom = mojoExecution.getConfiguration();
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java
index bfc6fae..8153aed 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java
@@ -31,35 +31,34 @@ import org.apache.maven.plugin.PluginResolutionException;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.collection.CollectRequest;
-import org.sonatype.aether.collection.DependencyCollectionException;
-import org.sonatype.aether.collection.DependencyGraphTransformer;
-import org.sonatype.aether.collection.DependencySelector;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.graph.DependencyVisitor;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.resolution.ArtifactDescriptorException;
-import org.sonatype.aether.resolution.ArtifactDescriptorRequest;
-import org.sonatype.aether.resolution.ArtifactDescriptorResult;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResolutionException;
-import org.sonatype.aether.resolution.DependencyRequest;
-import org.sonatype.aether.resolution.DependencyResolutionException;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.FilterRepositorySystemSession;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
-import org.sonatype.aether.util.artifact.JavaScopes;
-import org.sonatype.aether.util.filter.AndDependencyFilter;
-import org.sonatype.aether.util.filter.ExclusionsDependencyFilter;
-import org.sonatype.aether.util.filter.ScopeDependencyFilter;
-import org.sonatype.aether.util.graph.selector.AndDependencySelector;
-import org.sonatype.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.collection.CollectRequest;
+import org.eclipse.aether.collection.DependencyCollectionException;
+import org.eclipse.aether.collection.DependencyGraphTransformer;
+import org.eclipse.aether.collection.DependencySelector;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.graph.DependencyVisitor;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.resolution.ArtifactDescriptorException;
+import org.eclipse.aether.resolution.ArtifactDescriptorRequest;
+import org.eclipse.aether.resolution.ArtifactDescriptorResult;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
+import org.eclipse.aether.resolution.DependencyRequest;
+import org.eclipse.aether.resolution.DependencyResolutionException;
+import org.eclipse.aether.util.artifact.JavaScopes;
+import org.eclipse.aether.util.filter.AndDependencyFilter;
+import org.eclipse.aether.util.filter.ExclusionsDependencyFilter;
+import org.eclipse.aether.util.filter.ScopeDependencyFilter;
+import org.eclipse.aether.util.graph.selector.AndDependencySelector;
+import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
+import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
 
 /**
  * Assists in resolving the dependencies of a plugin. <strong>Warning:</strong> This is an internal utility class that
@@ -94,20 +93,14 @@ public class DefaultPluginDependenciesResolver
     public Artifact resolve( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
         throws PluginResolutionException
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( null, plugin );
+        RequestTrace trace = RequestTrace.newChild( null, plugin );
 
         Artifact pluginArtifact = toArtifact( plugin, session );
 
         try
         {
-            RepositorySystemSession pluginSession = new FilterRepositorySystemSession( session )
-            {
-                @Override
-                public boolean isIgnoreMissingArtifactDescriptor()
-                {
-                    return false;
-                }
-            };
+            DefaultRepositorySystemSession pluginSession = new DefaultRepositorySystemSession( session );
+            pluginSession.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, false ) );
 
             ArtifactDescriptorRequest request =
                 new ArtifactDescriptorRequest( pluginArtifact, repositories, REPOSITORY_CONTEXT );
@@ -147,7 +140,7 @@ public class DefaultPluginDependenciesResolver
                                    List<RemoteRepository> repositories, RepositorySystemSession session )
         throws PluginResolutionException
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( null, plugin );
+        RequestTrace trace = RequestTrace.newChild( null, plugin );
 
         if ( pluginArtifact == null )
         {
@@ -179,10 +172,10 @@ public class DefaultPluginDependenciesResolver
             CollectRequest request = new CollectRequest();
             request.setRequestContext( REPOSITORY_CONTEXT );
             request.setRepositories( repositories );
-            request.setRoot( new org.sonatype.aether.graph.Dependency( pluginArtifact, null ) );
+            request.setRoot( new org.eclipse.aether.graph.Dependency( pluginArtifact, null ) );
             for ( Dependency dependency : plugin.getDependencies() )
             {
-                org.sonatype.aether.graph.Dependency pluginDep =
+                org.eclipse.aether.graph.Dependency pluginDep =
                     RepositoryUtils.toDependency( dependency, session.getArtifactTypeRegistry() );
                 if ( !JavaScopes.SYSTEM.equals( pluginDep.getScope() ) )
                 {
@@ -194,7 +187,7 @@ public class DefaultPluginDependenciesResolver
             DependencyRequest depRequest = new DependencyRequest( request, resolutionFilter );
             depRequest.setTrace( trace );
 
-            request.setTrace( DefaultRequestTrace.newChild( trace, depRequest ) );
+            request.setTrace( RequestTrace.newChild( trace, depRequest ) );
 
             node = repoSystem.collectDependencies( pluginSession, request ).getRoot();
 
@@ -228,23 +221,13 @@ public class DefaultPluginDependenciesResolver
         {
             StringBuilder buffer = new StringBuilder( 128 );
             buffer.append( indent );
-            org.sonatype.aether.graph.Dependency dep = node.getDependency();
+            org.eclipse.aether.graph.Dependency dep = node.getDependency();
             if ( dep != null )
             {
-                org.sonatype.aether.artifact.Artifact art = dep.getArtifact();
+                org.eclipse.aether.artifact.Artifact art = dep.getArtifact();
 
                 buffer.append( art );
                 buffer.append( ':' ).append( dep.getScope() );
-
-                if ( node.getPremanagedScope() != null && !node.getPremanagedScope().equals( dep.getScope() ) )
-                {
-                    buffer.append( " (scope managed from " ).append( node.getPremanagedScope() ).append( ")" );
-                }
-
-                if ( node.getPremanagedVersion() != null && !node.getPremanagedVersion().equals( art.getVersion() ) )
-                {
-                    buffer.append( " (version managed from " ).append( node.getPremanagedVersion() ).append( ")" );
-                }
             }
 
             logger.debug( buffer.toString() );
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java
index 8d2dc92..015060f 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java
@@ -55,7 +55,6 @@ import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.artifact.InvalidDependencyVersionException;
 import org.apache.maven.settings.Settings;
 import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
index d191a23..2112748 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
@@ -19,15 +19,15 @@ package org.apache.maven.plugin.internal;
  * under the License.
  */
 
-import org.sonatype.aether.RepositoryException;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.collection.DependencyGraphTransformationContext;
-import org.sonatype.aether.collection.DependencyGraphTransformer;
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
-import org.sonatype.aether.util.artifact.JavaScopes;
-import org.sonatype.aether.util.graph.DefaultDependencyNode;
+import org.eclipse.aether.RepositoryException;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.collection.DependencyGraphTransformationContext;
+import org.eclipse.aether.collection.DependencyGraphTransformer;
+import org.eclipse.aether.graph.DefaultDependencyNode;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.util.artifact.JavaScopes;
 
 /**
  * Injects plexus-utils:1.1 into a plugin's class path if it doesn't already declare a dependency on plexus-utils. This
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java
index 1aa578e..632d1d5 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java
@@ -23,11 +23,11 @@ import java.util.List;
 
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.PluginResolutionException;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Assists in resolving the dependencies of a plugin. <strong>Warning:</strong> This is an internal utility interface
@@ -50,7 +50,7 @@ public interface PluginDependenciesResolver
      * @return The resolved plugin artifact, never {@code null}.
      * @throws PluginResolutionException If the plugin artifact could not be resolved.
      */
-    public Artifact resolve( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
+    Artifact resolve( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
         throws PluginResolutionException;
 
     /**
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/WagonExcluder.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/WagonExcluder.java
index 56b1c4f..f0e2107 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/WagonExcluder.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/WagonExcluder.java
@@ -19,10 +19,10 @@ package org.apache.maven.plugin.internal;
  * under the License.
  */
 
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.collection.DependencyCollectionContext;
-import org.sonatype.aether.collection.DependencySelector;
-import org.sonatype.aether.graph.Dependency;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.collection.DependencyCollectionContext;
+import org.eclipse.aether.collection.DependencySelector;
+import org.eclipse.aether.graph.Dependency;
 
 /**
  * Assists in detecting wagon providers brought into the plugin class path via legacy Maven core artifacts (e.g.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
index 15a514a..27c5f5b 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
@@ -25,8 +25,8 @@ import java.util.List;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Model;
 import org.apache.maven.project.MavenProject;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Collects settings required to resolve a plugin prefix.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java
index 7b868d8..3287021 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java
@@ -21,8 +21,8 @@ package org.apache.maven.plugin.prefix;
 
 import java.util.List;
 
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
 
 public class NoPluginFoundForPrefixException
     extends Exception
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
index 14c83cf..c23368e 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
@@ -22,8 +22,8 @@ package org.apache.maven.plugin.prefix;
 import java.util.List;
 
 import org.apache.maven.model.Model;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Collects settings required to resolve a plugin prefix.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java
index f21b670..6fe1f72 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java
@@ -1,7 +1,5 @@
 package org.apache.maven.plugin.prefix;
 
-import org.sonatype.aether.repository.ArtifactRepository;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -11,7 +9,7 @@ import org.sonatype.aether.repository.ArtifactRepository;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -21,6 +19,8 @@ import org.sonatype.aether.repository.ArtifactRepository;
  * under the License.
  */
 
+import org.eclipse.aether.repository.ArtifactRepository;
+
 /**
  * Describes the result of a plugin prefix resolution request.
  * 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
index a9761aa..76814fd 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
@@ -38,20 +38,19 @@ import org.apache.maven.plugin.prefix.PluginPrefixResult;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.RepositoryEvent.EventType;
-import org.sonatype.aether.RepositoryListener;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.repository.ArtifactRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.RepositoryPolicy;
-import org.sonatype.aether.resolution.MetadataRequest;
-import org.sonatype.aether.resolution.MetadataResult;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
-import org.sonatype.aether.util.metadata.DefaultMetadata;
+import org.eclipse.aether.RepositoryEvent.EventType;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositoryListener;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.metadata.DefaultMetadata;
+import org.eclipse.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.resolution.MetadataRequest;
+import org.eclipse.aether.resolution.MetadataResult;
 
 /**
  * Resolves a plugin prefix.
@@ -163,13 +162,13 @@ public class DefaultPluginPrefixResolver
 
     private PluginPrefixResult resolveFromRepository( PluginPrefixRequest request )
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( null, request );
+        RequestTrace trace = RequestTrace.newChild( null, request );
 
         List<MetadataRequest> requests = new ArrayList<MetadataRequest>();
 
         for ( String pluginGroup : request.getPluginGroups() )
         {
-            org.sonatype.aether.metadata.Metadata metadata =
+            org.eclipse.aether.metadata.Metadata metadata =
                 new DefaultMetadata( pluginGroup, "maven-metadata.xml", DefaultMetadata.Nature.RELEASE_OR_SNAPSHOT );
 
             requests.add( new MetadataRequest( metadata, null, REPOSITORY_CONTEXT ).setTrace( trace ) );
@@ -213,7 +212,7 @@ public class DefaultPluginPrefixResolver
     {
         for ( MetadataResult res : results )
         {
-            org.sonatype.aether.metadata.Metadata metadata = res.getMetadata();
+            org.eclipse.aether.metadata.Metadata metadata = res.getMetadata();
 
             if ( metadata != null )
             {
@@ -243,7 +242,7 @@ public class DefaultPluginPrefixResolver
 
     private PluginPrefixResult resolveFromRepository( PluginPrefixRequest request, RequestTrace trace,
                                                       String pluginGroup,
-                                                      org.sonatype.aether.metadata.Metadata metadata,
+                                                      org.eclipse.aether.metadata.Metadata metadata,
                                                       ArtifactRepository repository )
     {
         if ( metadata != null && metadata.getFile() != null && metadata.getFile().isFile() )
@@ -277,17 +276,18 @@ public class DefaultPluginPrefixResolver
     }
 
     private void invalidMetadata( RepositorySystemSession session, RequestTrace trace,
-                                  org.sonatype.aether.metadata.Metadata metadata, ArtifactRepository repository,
+                                  org.eclipse.aether.metadata.Metadata metadata, ArtifactRepository repository,
                                   Exception exception )
     {
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID, session, trace );
+            RepositoryEvent.Builder event = new RepositoryEvent.Builder( session, EventType.METADATA_INVALID );
+            event.setTrace( trace );
             event.setMetadata( metadata );
             event.setException( exception );
             event.setRepository( repository );
-            listener.metadataInvalid( event );
+            listener.metadataInvalid( event.build() );
         }
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResult.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResult.java
index 65aea88..9917387 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResult.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResult.java
@@ -21,7 +21,7 @@ package org.apache.maven.plugin.prefix.internal;
 
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.prefix.PluginPrefixResult;
-import org.sonatype.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.ArtifactRepository;
 
 /**
  * Describes the result of a plugin prefix resolution request.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
index 1e671b3..b672090 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
@@ -26,8 +26,8 @@ import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Collects settings required to resolve the version for a plugin.
@@ -61,7 +61,7 @@ public class DefaultPluginVersionRequest
      * has a current project, its plugin repositories will be used as well.
      * 
      * @param plugin The plugin for which to resolve a version, must not be {@code null}.
-     * @param repositoryRequest The repository request to copy from, must not be {@code null}.
+     * @param session The Maven session to use, must not be {@code null}.
      */
     public DefaultPluginVersionRequest( Plugin plugin, MavenSession session )
     {
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
index a6b9e5b..5d2b63d 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
@@ -22,8 +22,8 @@ package org.apache.maven.plugin.version;
 import java.util.List;
 
 import org.apache.maven.model.Model;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * Collects settings required to resolve the version for a plugin.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java
index af85f1f..84ec096 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java
@@ -21,8 +21,8 @@ package org.apache.maven.plugin.version;
 
 import java.util.List;
 
-import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
 
 public class PluginVersionResolutionException
     extends Exception
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResult.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResult.java
index 4169d30..bc3a2d2 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResult.java
@@ -19,7 +19,7 @@ package org.apache.maven.plugin.version;
  * under the License.
  */
 
-import org.sonatype.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.ArtifactRepository;
 
 /**
  * Describes the result of a plugin version resolution request.
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
index a215d28..5efa809 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
@@ -43,22 +43,21 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.RepositoryEvent.EventType;
-import org.sonatype.aether.RepositoryListener;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.repository.ArtifactRepository;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.resolution.MetadataRequest;
-import org.sonatype.aether.resolution.MetadataResult;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
-import org.sonatype.aether.util.metadata.DefaultMetadata;
-import org.sonatype.aether.util.version.GenericVersionScheme;
-import org.sonatype.aether.version.InvalidVersionSpecificationException;
-import org.sonatype.aether.version.Version;
-import org.sonatype.aether.version.VersionScheme;
+import org.eclipse.aether.RepositoryEvent.EventType;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.RepositoryListener;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.metadata.DefaultMetadata;
+import org.eclipse.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.resolution.MetadataRequest;
+import org.eclipse.aether.resolution.MetadataResult;
+import org.eclipse.aether.util.version.GenericVersionScheme;
+import org.eclipse.aether.version.InvalidVersionSpecificationException;
+import org.eclipse.aether.version.Version;
+import org.eclipse.aether.version.VersionScheme;
 
 /**
  * Resolves a version for a plugin.
@@ -114,11 +113,11 @@ public class DefaultPluginVersionResolver
     private PluginVersionResult resolveFromRepository( PluginVersionRequest request )
         throws PluginVersionResolutionException
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( null, request );
+        RequestTrace trace = RequestTrace.newChild( null, request );
 
         DefaultPluginVersionResult result = new DefaultPluginVersionResult();
 
-        org.sonatype.aether.metadata.Metadata metadata =
+        org.eclipse.aether.metadata.Metadata metadata =
             new DefaultMetadata( request.getGroupId(), request.getArtifactId(), "maven-metadata.xml",
                                  DefaultMetadata.Nature.RELEASE_OR_SNAPSHOT );
 
@@ -197,7 +196,6 @@ public class DefaultPluginVersionResolver
                 }
                 catch ( InvalidVersionSpecificationException e )
                 {
-                    continue;
                 }
             }
 
@@ -280,7 +278,7 @@ public class DefaultPluginVersionResolver
     }
 
     private void mergeMetadata( RepositorySystemSession session, RequestTrace trace, Versions versions,
-                                org.sonatype.aether.metadata.Metadata metadata, ArtifactRepository repository )
+                                org.eclipse.aether.metadata.Metadata metadata, ArtifactRepository repository )
     {
         if ( metadata != null && metadata.getFile() != null && metadata.getFile().isFile() )
         {
@@ -300,17 +298,18 @@ public class DefaultPluginVersionResolver
     }
 
     private void invalidMetadata( RepositorySystemSession session, RequestTrace trace,
-                                  org.sonatype.aether.metadata.Metadata metadata, ArtifactRepository repository,
+                                  org.eclipse.aether.metadata.Metadata metadata, ArtifactRepository repository,
                                   Exception exception )
     {
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID, session, trace );
+            RepositoryEvent.Builder event = new RepositoryEvent.Builder( session, EventType.METADATA_INVALID );
+            event.setTrace( trace );
             event.setMetadata( metadata );
             event.setException( exception );
             event.setRepository( repository );
-            listener.metadataInvalid( event );
+            listener.metadataInvalid( event.build() );
         }
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResult.java b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResult.java
index 234d0b7..c67516c 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResult.java
@@ -20,7 +20,7 @@ package org.apache.maven.plugin.version.internal;
  */
 
 import org.apache.maven.plugin.version.PluginVersionResult;
-import org.sonatype.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.ArtifactRepository;
 
 /**
  * Describes the result of a plugin version resolution request.
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionRequest.java b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionRequest.java
index a7f3a93..cf5b0d7 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionRequest.java
@@ -19,8 +19,8 @@ package org.apache.maven.project;
  * under the License.
  */
 
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.graph.DependencyFilter;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.graph.DependencyFilter;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java
index 49727f3..b69b69e 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java
@@ -25,8 +25,8 @@ import java.util.IdentityHashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.DependencyNode;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyNode;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java
index 25eb246..2b9444f 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java
@@ -19,9 +19,6 @@ package org.apache.maven.project;
  * under the License.
  */
 
-import java.io.File;
-import java.util.List;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
@@ -31,6 +28,9 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
+import java.io.File;
+import java.util.List;
+
 @SuppressWarnings( "deprecation" )
 @Component( role = MavenProjectHelper.class )
 public class DefaultMavenProjectHelper
@@ -90,23 +90,18 @@ public class DefaultMavenProjectHelper
         attachArtifact( project, artifact );
     }
 
+    /**
+     * Add an attached artifact or replace the file for an existing artifact.
+     * @see MavenProject#addAttachedArtifact(org.apache.maven.artifact.Artifact)
+     * @param project project reference.
+     * @param artifact artifact to add or replace.
+     */
     public void attachArtifact( MavenProject project, Artifact artifact )
     {
-        try
-        {
-            project.addAttachedArtifact( artifact );
-        }
-        catch ( DuplicateArtifactAttachmentException dae )
-        {
-            getLogger().warn( dae.getMessage() );
-
-            // We can throw this because it's unchecked, and won't change the MavenProjectHelper API, which would break
-            // backward compat if it did.
-            throw dae;
-        }
+        project.addAttachedArtifact( artifact );
     }
 
-    public void addResource( MavenProject project, String resourceDirectory, List includes, List excludes )
+    public void addResource( MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes )
     {
         Resource resource = new Resource();
         resource.setDirectory( resourceDirectory );
@@ -116,7 +111,7 @@ public class DefaultMavenProjectHelper
         project.addResource( resource );
     }
 
-    public void addTestResource( MavenProject project, String resourceDirectory, List includes, List excludes )
+    public void addTestResource( MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes )
     {
         Resource resource = new Resource();
         resource.setDirectory( resourceDirectory );
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
index baaf01e..3aebe9b 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
@@ -26,6 +26,8 @@ import org.apache.maven.model.Model;
 import org.apache.maven.model.building.AbstractModelBuildingListener;
 import org.apache.maven.model.building.ModelBuildingEvent;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.plugin.PluginResolutionException;
 import org.apache.maven.plugin.version.PluginVersionResolutionException;
 
@@ -95,7 +97,9 @@ class DefaultModelBuildingListener
         }
         catch ( Exception e )
         {
-            event.getProblems().add( Severity.ERROR, "Invalid plugin repository: " + e.getMessage(), null, e );
+            event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                    .setMessage( "Invalid plugin repository: " + e.getMessage() )
+                    .setException( e ) );
         }
         project.setPluginArtifactRepositories( pluginRepositories );
 
@@ -111,11 +115,15 @@ class DefaultModelBuildingListener
             }
             catch ( PluginResolutionException e )
             {
-                event.getProblems().add( Severity.ERROR, "Unresolveable build extension: " + e.getMessage(), null, e );
+                event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "Unresolveable build extension: " + e.getMessage() )
+                        .setException( e ) );
             }
             catch ( PluginVersionResolutionException e )
             {
-                event.getProblems().add( Severity.ERROR, "Unresolveable build extension: " + e.getMessage(), null, e );
+                event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "Unresolveable build extension: " + e.getMessage() )
+                        .setException( e ) );
             }
 
             projectBuildingHelper.selectProjectRealm( project );
@@ -130,7 +138,9 @@ class DefaultModelBuildingListener
         }
         catch ( Exception e )
         {
-            event.getProblems().add( Severity.ERROR, "Invalid artifact repository: " + e.getMessage(), null, e );
+            event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                    .setMessage( "Invalid artifact repository: " + e.getMessage() )
+                    .setException( e ) );
         }
         project.setRemoteArtifactRepositories( remoteRepositories );
     }
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
index f410302..a5abc29 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
@@ -1,18 +1,22 @@
 package org.apache.maven.project;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 import java.io.File;
@@ -51,15 +55,14 @@ import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.Os;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.impl.RemoteRepositoryManager;
-import org.sonatype.aether.repository.LocalRepositoryManager;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.repository.WorkspaceRepository;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResult;
-import org.sonatype.aether.util.DefaultRequestTrace;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceRepository;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResult;
 
 /**
  */
@@ -84,7 +87,7 @@ public class DefaultProjectBuilder
     private RepositorySystem repositorySystem;
 
     @Requirement
-    private org.sonatype.aether.RepositorySystem repoSystem;
+    private org.eclipse.aether.RepositorySystem repoSystem;
 
     @Requirement
     private RemoteRepositoryManager repositoryManager;
@@ -99,13 +102,13 @@ public class DefaultProjectBuilder
     public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest request )
         throws ProjectBuildingException
     {
-        return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null, null ) );
+        return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null ) );
     }
 
     public ProjectBuildingResult build( ModelSource modelSource, ProjectBuildingRequest request )
         throws ProjectBuildingException
     {
-        return build( null, modelSource, new InternalConfig( request, null, null ) );
+        return build( null, modelSource, new InternalConfig( request, null ) );
     }
 
     private ProjectBuildingResult build( File pomFile, ModelSource modelSource, InternalConfig config )
@@ -241,7 +244,7 @@ public class DefaultProjectBuilder
 
         ModelBuildingRequest request = new DefaultModelBuildingRequest();
 
-        RequestTrace trace = DefaultRequestTrace.newChild( null, configuration ).newChild( request );
+        RequestTrace trace = RequestTrace.newChild( null, configuration ).newChild( request );
 
         ModelResolver resolver =
             new ProjectModelResolver( config.session, trace, repoSystem, repositoryManager, config.repositories,
@@ -256,7 +259,7 @@ public class DefaultProjectBuilder
         request.setUserProperties( configuration.getUserProperties() );
         request.setBuildStartTime( configuration.getBuildStartTime() );
         request.setModelResolver( resolver );
-        request.setModelCache( config.modelCache );
+        request.setModelCache( new ReactorModelCache() );
 
         return request;
     }
@@ -270,10 +273,10 @@ public class DefaultProjectBuilder
     public ProjectBuildingResult build( Artifact artifact, boolean allowStubModel, ProjectBuildingRequest request )
         throws ProjectBuildingException
     {
-        org.sonatype.aether.artifact.Artifact pomArtifact = RepositoryUtils.toArtifact( artifact );
+        org.eclipse.aether.artifact.Artifact pomArtifact = RepositoryUtils.toArtifact( artifact );
         pomArtifact = ArtifactDescriptorUtils.toPomArtifact( pomArtifact );
 
-        InternalConfig config = new InternalConfig( request, null, null );
+        InternalConfig config = new InternalConfig( request, null );
 
         boolean localProject;
 
@@ -287,7 +290,7 @@ public class DefaultProjectBuilder
             pomArtifact = pomResult.getArtifact();
             localProject = pomResult.getRepository() instanceof WorkspaceRepository;
         }
-        catch ( org.sonatype.aether.resolution.ArtifactResolutionException e )
+        catch ( org.eclipse.aether.resolution.ArtifactResolutionException e )
         {
             if ( e.getResults().get( 0 ).isMissing() && allowStubModel )
             {
@@ -334,9 +337,7 @@ public class DefaultProjectBuilder
 
         ReactorModelPool modelPool = new ReactorModelPool();
 
-        ReactorModelCache modelCache = new ReactorModelCache();
-
-        InternalConfig config = new InternalConfig( request, modelPool, modelCache );
+        InternalConfig config = new InternalConfig( request, modelPool );
 
         Map<String, MavenProject> projectIndex = new HashMap<String, MavenProject>( 256 );
 
@@ -442,7 +443,7 @@ public class DefaultProjectBuilder
                     {
                         ModelProblem problem =
                             new DefaultModelProblem( "Child module " + moduleFile + " of " + pomFile
-                                + " does not exist", ModelProblem.Severity.ERROR, model, -1, -1, null );
+                                + " does not exist", ModelProblem.Severity.ERROR, ModelProblem.Version.BASE, model, -1, -1, null );
                         result.getProblems().add( problem );
 
                         noErrors = false;
@@ -478,7 +479,7 @@ public class DefaultProjectBuilder
 
                         ModelProblem problem =
                             new DefaultModelProblem( "Child module " + moduleFile + " of " + pomFile
-                                + " forms aggregation cycle " + buffer, ModelProblem.Severity.ERROR, model, -1, -1,
+                                + " forms aggregation cycle " + buffer, ModelProblem.Severity.ERROR, ModelProblem.Version.BASE, model, -1, -1,
                                                      null );
                         result.getProblems().add( problem );
 
@@ -630,7 +631,7 @@ public class DefaultProjectBuilder
             ModelProblem problem =
                 new DefaultModelProblem( "Detected profiles.xml alongside " + modelId
                     + ", this file is no longer supported and was ignored" + ", please use the settings.xml instead",
-                                         ModelProblem.Severity.WARNING, model, -1, -1, null );
+                                         ModelProblem.Severity.WARNING, ModelProblem.Version.V30, model, -1, -1, null );
             result.getProblems().add( problem );
         }
     }
@@ -650,7 +651,7 @@ public class DefaultProjectBuilder
             Boolean profilesXml = profilesXmls.get( basedir );
             if ( profilesXml == null )
             {
-                profilesXml = Boolean.valueOf( new File( basedir, "profiles.xml" ).exists() );
+                profilesXml = new File( basedir, "profiles.xml" ).exists();
                 profilesXmls.put( basedir, profilesXml );
             }
             if ( profilesXml.booleanValue() )
@@ -673,13 +674,10 @@ public class DefaultProjectBuilder
 
         public final ReactorModelPool modelPool;
 
-        public final ReactorModelCache modelCache;
-
-        public InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool, ReactorModelCache modelCache )
+        InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool )
         {
             this.request = request;
             this.modelPool = modelPool;
-            this.modelCache = modelCache;
             session =
                 LegacyLocalRepositoryManager.overlay( request.getLocalRepository(), request.getRepositorySession(),
                                                       repoSystem );
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java
index e9b0892..1d99343 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java
@@ -52,12 +52,12 @@ import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.util.filter.ExclusionsDependencyFilter;
-import org.sonatype.aether.util.graph.PreorderNodeListGenerator;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.util.filter.ExclusionsDependencyFilter;
+import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
 
 /**
  * Assists the project builder. <strong>Warning:</strong> This is an internal utility class that is only public for
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
index f32426d..87b4b8c 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
@@ -27,7 +27,7 @@ import java.util.Properties;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelBuildingRequest;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 public class DefaultProjectBuildingRequest
     implements ProjectBuildingRequest
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
index 2d9b159..2a6be6d 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
@@ -34,22 +34,23 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.artifact.ArtifactType;
-import org.sonatype.aether.artifact.ArtifactTypeRegistry;
-import org.sonatype.aether.collection.CollectRequest;
-import org.sonatype.aether.collection.DependencyCollectionException;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.graph.DependencyVisitor;
-import org.sonatype.aether.resolution.ArtifactResult;
-import org.sonatype.aether.resolution.DependencyRequest;
-import org.sonatype.aether.util.DefaultRequestTrace;
-import org.sonatype.aether.util.artifact.ArtifacIdUtils;
-import org.sonatype.aether.util.artifact.ArtifactProperties;
-import org.sonatype.aether.util.artifact.JavaScopes;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.artifact.ArtifactProperties;
+import org.eclipse.aether.artifact.ArtifactType;
+import org.eclipse.aether.artifact.ArtifactTypeRegistry;
+import org.eclipse.aether.collection.CollectRequest;
+import org.eclipse.aether.collection.DependencyCollectionException;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.graph.DependencyVisitor;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.resolution.DependencyRequest;
+import org.eclipse.aether.util.artifact.ArtifactIdUtils;
+import org.eclipse.aether.util.artifact.JavaScopes;
+import org.eclipse.aether.util.graph.manager.DependencyManagerUtils;
 
 /**
  * @author Benjamin Bentmann
@@ -68,17 +69,25 @@ public class DefaultProjectDependenciesResolver
     public DependencyResolutionResult resolve( DependencyResolutionRequest request )
         throws DependencyResolutionException
     {
-        RequestTrace trace = DefaultRequestTrace.newChild( null, request );
+        RequestTrace trace = RequestTrace.newChild( null, request );
 
         DefaultDependencyResolutionResult result = new DefaultDependencyResolutionResult();
 
         MavenProject project = request.getMavenProject();
         RepositorySystemSession session = request.getRepositorySession();
+        if ( logger.isDebugEnabled()
+            && session.getConfigProperties().get( DependencyManagerUtils.CONFIG_PROP_VERBOSE ) == null )
+        {
+            DefaultRepositorySystemSession verbose = new DefaultRepositorySystemSession( session );
+            verbose.setConfigProperty( DependencyManagerUtils.CONFIG_PROP_VERBOSE, Boolean.TRUE );
+            session = verbose;
+        }
         DependencyFilter filter = request.getResolutionFilter();
 
         ArtifactTypeRegistry stereotypes = session.getArtifactTypeRegistry();
 
         CollectRequest collect = new CollectRequest();
+        collect.setRootArtifact( RepositoryUtils.toArtifact( project.getArtifact() ) );
         collect.setRequestContext( "project" );
         collect.setRepositories( project.getRemoteProjectRepositories() );
 
@@ -110,7 +119,7 @@ public class DefaultProjectDependenciesResolver
                     }
                 }
                 String key =
-                    ArtifacIdUtils.toVersionlessId( dependency.getGroupId(), dependency.getArtifactId(),
+                    ArtifactIdUtils.toVersionlessId( dependency.getGroupId(), dependency.getArtifactId(),
                                                     dependency.getType(), classifier );
                 dependencies.put( key, dependency );
             }
@@ -119,11 +128,11 @@ public class DefaultProjectDependenciesResolver
                 String key = artifact.getDependencyConflictId();
                 Dependency dependency = dependencies.get( key );
                 Collection<Exclusion> exclusions = dependency != null ? dependency.getExclusions() : null;
-                org.sonatype.aether.graph.Dependency dep = RepositoryUtils.toDependency( artifact, exclusions );
+                org.eclipse.aether.graph.Dependency dep = RepositoryUtils.toDependency( artifact, exclusions );
                 if ( !JavaScopes.SYSTEM.equals( dep.getScope() ) && dep.getArtifact().getFile() != null )
                 {
                     // enable re-resolution
-                    org.sonatype.aether.artifact.Artifact art = dep.getArtifact();
+                    org.eclipse.aether.artifact.Artifact art = dep.getArtifact();
                     art = art.setFile( null ).setVersion( art.getBaseVersion() );
                     dep = dep.setArtifact( art );
                 }
@@ -146,7 +155,7 @@ public class DefaultProjectDependenciesResolver
         DependencyNode node;
         try
         {
-            collect.setTrace( DefaultRequestTrace.newChild( trace, depRequest ) );
+            collect.setTrace( RequestTrace.newChild( trace, depRequest ) );
             node = repoSystem.collectDependencies( session, collect ).getRoot();
             result.setDependencyGraph( node );
         }
@@ -182,7 +191,7 @@ public class DefaultProjectDependenciesResolver
         {
             process( result, repoSystem.resolveDependencies( session, depRequest ).getArtifactResults() );
         }
-        catch ( org.sonatype.aether.resolution.DependencyResolutionException e )
+        catch ( org.eclipse.aether.resolution.DependencyResolutionException e )
         {
             process( result, e.getResult().getArtifactResults() );
 
@@ -228,24 +237,26 @@ public class DefaultProjectDependenciesResolver
         {
             StringBuilder buffer = new StringBuilder( 128 );
             buffer.append( indent );
-            org.sonatype.aether.graph.Dependency dep = node.getDependency();
+            org.eclipse.aether.graph.Dependency dep = node.getDependency();
             if ( dep != null )
             {
-                org.sonatype.aether.artifact.Artifact art = dep.getArtifact();
+                org.eclipse.aether.artifact.Artifact art = dep.getArtifact();
 
                 buffer.append( art );
                 buffer.append( ':' ).append( dep.getScope() );
 
-                if ( node.getPremanagedScope() != null && !node.getPremanagedScope().equals( dep.getScope() ) )
+                String premanagedScope = DependencyManagerUtils.getPremanagedScope( node );
+                if ( premanagedScope != null && !premanagedScope.equals( dep.getScope() ) )
                 {
-                    buffer.append( " (scope managed from " ).append( node.getPremanagedScope() );
+                    buffer.append( " (scope managed from " ).append( premanagedScope );
                     appendManagementSource( buffer, art, "scope" );
                     buffer.append( ")" );
                 }
 
-                if ( node.getPremanagedVersion() != null && !node.getPremanagedVersion().equals( art.getVersion() ) )
+                String premanagedVersion = DependencyManagerUtils.getPremanagedVersion( node );
+                if ( premanagedVersion != null && !premanagedVersion.equals( art.getVersion() ) )
                 {
-                    buffer.append( " (version managed from " ).append( node.getPremanagedVersion() );
+                    buffer.append( " (version managed from " ).append( premanagedVersion );
                     appendManagementSource( buffer, art, "version" );
                     buffer.append( ")" );
                 }
@@ -269,7 +280,7 @@ public class DefaultProjectDependenciesResolver
             return true;
         }
 
-        private void appendManagementSource( StringBuilder buffer, org.sonatype.aether.artifact.Artifact artifact,
+        private void appendManagementSource( StringBuilder buffer, org.eclipse.aether.artifact.Artifact artifact,
                                              String field )
         {
             if ( managed == null )
@@ -285,7 +296,7 @@ public class DefaultProjectDependenciesResolver
             }
 
             String key =
-                ArtifacIdUtils.toVersionlessId( artifact.getGroupId(), artifact.getArtifactId(),
+                ArtifactIdUtils.toVersionlessId( artifact.getGroupId(), artifact.getArtifactId(),
                                                 artifact.getProperty( ArtifactProperties.TYPE, "jar" ),
                                                 artifact.getClassifier() );
 
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java
index d895fdf..1c5dfa3 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java
@@ -26,7 +26,7 @@ import java.util.Map;
 
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyFilter;
 
 /**
  * Default project realm cache implementation. Assumes cached data does not change.
diff --git a/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionRequest.java b/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionRequest.java
index 32dcc4a..758c491 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionRequest.java
@@ -19,8 +19,8 @@ package org.apache.maven.project;
  * under the License.
  */
 
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.graph.DependencyFilter;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.graph.DependencyFilter;
 
 /**
  * A request to resolve the dependencies of a project.
@@ -54,7 +54,7 @@ public interface DependencyResolutionRequest
 
     /**
      * Sets the filter used to exclude some dependencies from resolution. Note that this filter only controls the
-     * resolution/download of dependency artifacts, not the inclusion of dependency nodes in the resolved dependeny
+     * resolution/download of dependency artifacts, not the inclusion of dependency nodes in the resolved dependency
      * graph.
      * 
      * @param filter The filter to exclude dependencies from resolution, may be {@code null} to resolve all
diff --git a/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java b/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java
index d951c05..2f62d80 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java
@@ -21,8 +21,8 @@ package org.apache.maven.project;
 
 import java.util.List;
 
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.DependencyNode;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyNode;
 
 /**
  * The result of a project dependency resolution.
diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index 088289d..d6f308f 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -1,36 +1,24 @@
 package org.apache.maven.project;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
 import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
@@ -72,8 +60,24 @@ import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.repository.RemoteRepository;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
 
 /**
  * The concern of the project is provide runtime values based on the model.
@@ -287,9 +291,8 @@ public class MavenProject
             List<String> modules = getModules();
             if ( modules != null )
             {
-                for ( Iterator<String> it = modules.iterator(); it.hasNext(); )
+                for ( String modulePath : modules )
                 {
-                    String modulePath = it.next();
                     String moduleName = modulePath;
 
                     if ( moduleName.endsWith( "/" ) || moduleName.endsWith( "\\" ) )
@@ -504,7 +507,11 @@ public class MavenProject
     {
         List<String> list = new ArrayList<String>( getArtifacts().size() + 1 );
 
-        list.add( getBuild().getOutputDirectory() );
+        String d = getBuild().getOutputDirectory();
+        if ( d != null )
+        {
+            list.add( d );
+        }
 
         for ( Artifact a : getArtifacts() )
         {                        
@@ -580,9 +587,17 @@ public class MavenProject
     {
         List<String> list = new ArrayList<String>( getArtifacts().size() + 2 );
 
-        list.add( getBuild().getTestOutputDirectory() );
+        String d = getBuild().getTestOutputDirectory();
+        if ( d != null )
+        {
+            list.add( d );
+        }
 
-        list.add( getBuild().getOutputDirectory() );
+        d = getBuild().getOutputDirectory();
+        if ( d != null )
+        {
+            list.add( d );
+        }
         
         for ( Artifact a : getArtifacts() )
         {            
@@ -644,7 +659,11 @@ public class MavenProject
     {
         List<String> list = new ArrayList<String>( getArtifacts().size() + 1 );
 
-        list.add( getBuild().getOutputDirectory() );
+        String d = getBuild().getOutputDirectory();
+        if ( d != null )
+        {
+            list.add( d );
+        }
 
         for ( Artifact a : getArtifacts() )
         {
@@ -717,7 +736,11 @@ public class MavenProject
     {
         List<String> list = new ArrayList<String>( getArtifacts().size() );
 
-        list.add( getBuild().getOutputDirectory() );
+        String d = getBuild().getOutputDirectory();
+        if ( d != null )
+        {
+            list.add( d );
+        }
 
         for ( Artifact a : getArtifacts() )
         {
@@ -1224,10 +1247,8 @@ public class MavenProject
         List<Extension> extensions = getBuildExtensions();
         if ( extensions != null )
         {
-            for ( Iterator<Extension> i = extensions.iterator(); i.hasNext(); )
+            for ( Extension ext : extensions )
             {
-                Extension ext = i.next();
-
                 String version;
                 if ( StringUtils.isEmpty( ext.getVersion() ) )
                 {
@@ -1238,7 +1259,8 @@ public class MavenProject
                     version = ext.getVersion();
                 }
 
-                Artifact artifact = repositorySystem.createArtifact( ext.getGroupId(), ext.getArtifactId(), version, null, "jar" );
+                Artifact artifact =
+                    repositorySystem.createArtifact( ext.getGroupId(), ext.getArtifactId(), version, null, "jar" );
 
                 if ( artifact != null )
                 {
@@ -1429,19 +1451,46 @@ public class MavenProject
         return this.injectedProfileIds;
     }
 
+    private String logStringForArtifactFile( Artifact a )
+    {
+        if ( a.getFile() != null )
+        {
+            return a.getFile().getAbsolutePath();
+        }
+        else
+        {
+            return "(no path)";
+        }
+    }
+
+    /**
+     * Add or replace an artifact.
+     * In spite of the 'throws' declaration on this API, this method has never thrown an exception since Maven 3.0.x.
+     * Historically, it logged and ignored a second addition of the same g/a/v/c/t. Now it replaces the file for
+     * the artifact, so that plugins (e.g. shade) can change the pathname of the file for a particular set of
+     * coordinates.
+     * @param artifact the artifact to add or replace.
+     * @throws DuplicateArtifactAttachmentException
+     */
     public void addAttachedArtifact( Artifact artifact )
         throws DuplicateArtifactAttachmentException
     {
         List<Artifact> attachedArtifacts = getAttachedArtifacts();
-
-        if ( attachedArtifacts.contains( artifact ) )
+        for ( int ax = 0; ax < attachedArtifacts.size(); ax++ )
         {
-            if ( logger != null )
+            Artifact a = attachedArtifacts.get( ax );
+            if ( a.equals( artifact ) )
             {
-                logger.warn( "Artifact " + artifact + " already attached to project, ignoring duplicate" );
+                if ( logger != null )
+                {
+                    logger.debug( String.format( "Replacing attached artifact %s. Old path %s, new path %s. ",
+                                                 a,
+                                                 logStringForArtifactFile( a ),
+                                                 logStringForArtifactFile( artifact ) ) );
+                }
+                attachedArtifacts.set( ax, artifact );
+                return;
             }
-            return;
-            //throw new DuplicateArtifactAttachmentException( this, artifact );
         }
 
         getAttachedArtifacts().add( artifact );
@@ -1505,10 +1554,8 @@ public class MavenProject
 
         if ( getReportPlugins() != null )
         {
-            for ( Iterator<ReportPlugin> iterator = getReportPlugins().iterator(); iterator.hasNext(); )
+            for ( ReportPlugin plugin : getReportPlugins() )
             {
-                ReportPlugin plugin = iterator.next();
-
                 if ( pluginGroupId.equals( plugin.getGroupId() ) && pluginArtifactId.equals( plugin.getArtifactId() ) )
                 {
                     dom = (Xpp3Dom) plugin.getConfiguration();
@@ -1617,10 +1664,8 @@ public class MavenProject
             if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null ) && ( deps.size() > 0 ) )
             {
                 map = new HashMap<String, Artifact>();
-                for ( Iterator<Dependency> i = dependencyManagement.getDependencies().iterator(); i.hasNext(); )
+                for ( Dependency d : dependencyManagement.getDependencies() )
                 {
-                    Dependency d = i.next();
-
                     Artifact artifact = repositorySystem.createDependencyArtifact( d );
 
                     if ( artifact == null )
@@ -2160,6 +2205,7 @@ public class MavenProject
      * an utility method that is meant to assist integrators of Maven, it must not be used by Maven plugins.
      * 
      * @return The project building request or {@code null}.
+     * @since 2.1
      */
     public ProjectBuildingRequest getProjectBuildingRequest()
     {
@@ -2171,6 +2217,7 @@ public class MavenProject
      * an utility method that is meant to assist integrators of Maven, it must not be used by Maven plugins.
      * 
      * @param projectBuildingRequest The project building request, may be {@code null}.
+     * @since 2.1
      */
     public void setProjectBuildingRequest( ProjectBuildingRequest projectBuildingRequest )
     {
diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProjectHelper.java b/maven-core/src/main/java/org/apache/maven/project/MavenProjectHelper.java
index c652661..406bbf2 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProjectHelper.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProjectHelper.java
@@ -22,18 +22,54 @@ package org.apache.maven.project;
 import java.io.File;
 import java.util.List;
 
+/**
+ * Convenience interface for plugins to add or replace artifacts and resources on projects.
+ */
 public interface MavenProjectHelper
 {
     String ROLE = MavenProjectHelper.class.getName();
 
+    /**
+     * See {@link #attachArtifact(MavenProject, String, String, java.io.File)}, but with type set to null.
+     * @param project project reference.
+     * @param artifactFile artifact file.
+     * @param artifactClassifier artifact classifier.
+     */
     void attachArtifact( MavenProject project, File artifactFile, String artifactClassifier );
 
+    /**
+     * * See {@link #attachArtifact(MavenProject, String, String, java.io.File)}, but with classifier set to null.
+     * @param project project reference.
+     * @param artifactType artifact type.
+     * @param artifactFile arrifact file.
+     */
     void attachArtifact( MavenProject project, String artifactType, File artifactFile );
 
+    /**
+     * Add or replace an artifact to the current project.
+     * @param project the project reference.
+     * @param artifactType the type (e.g. jar) or null.
+     * @param artifactClassifier the classifier or null.
+     * @param artifactFile the file for the artifact.
+     */
     void attachArtifact( MavenProject project, String artifactType, String artifactClassifier, File artifactFile );
 
-    void addResource( MavenProject project, String resourceDirectory, List includes, List excludes );
+    /**
+     * Add a resource directory to the project.
+     * @param project project reference.
+     * @param resourceDirectory directory.
+     * @param includes include patterns.
+     * @param excludes exclude patterns.
+     */
+    void addResource( MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes );
 
-    void addTestResource( MavenProject project, String resourceDirectory, List includes, List excludes );
+    /**
+     * Add a test resource directory to the project.
+     * @param project project reference.
+     * @param resourceDirectory directory.
+     * @param includes include patterns.
+     * @param excludes exclude patterns.
+     */
+    void addTestResource( MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes );
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java
index 84e54a9..55adce7 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java
@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.building.ModelSource;
+import org.apache.maven.model.building.ModelSource2;
 
 /**
  * Builds in-memory descriptions of projects.
@@ -74,6 +75,8 @@ public interface ProjectBuilder
      * @param request The project building request that holds further parameters, must not be {@code null}.
      * @return The result of the project building, never {@code null}.
      * @throws ProjectBuildingException If the project descriptor could not be successfully built.
+     * 
+     * @see ModelSource2
      */
     ProjectBuildingResult build( ModelSource modelSource, ProjectBuildingRequest request )
         throws ProjectBuildingException;
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
index 39522f6..2055d5e 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
@@ -26,7 +26,7 @@ import java.util.Properties;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelBuildingRequest;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 public interface ProjectBuildingRequest
 {
@@ -79,7 +79,7 @@ public interface ProjectBuildingRequest
      */
     Properties getUserProperties();
 
-    void setProject(MavenProject mavenProject);
+    void setProject( MavenProject mavenProject );
 
     MavenProject getProject();
 
@@ -122,8 +122,9 @@ public interface ProjectBuildingRequest
     List<String> getInactiveProfileIds();
     
     /**
-     * Add a {@link org.apache.maven.model.Profile} that has come from an external source. This may be from a custom configuration
-     * like the MavenCLI settings.xml file, or from a custom dialog in an IDE integration like M2Eclipse.
+     * Add a {@link org.apache.maven.model.Profile} that has come from an external source. This may be from a custom
+     * configuration like the MavenCLI settings.xml file, or from a custom dialog in an IDE integration like M2Eclipse.
+     * 
      * @param profile
      */
     void addProfile( Profile profile );
@@ -143,7 +144,6 @@ public interface ProjectBuildingRequest
      * Sets the start time of the build.
      * 
      * @param buildStartTime The start time of the build, may be {@code null}.
-     * @return This request, never {@code null}.
      */
     void setBuildStartTime( Date buildStartTime );
 
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java b/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java
index e6cc411..522c79c 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java
@@ -33,15 +33,15 @@ import org.apache.maven.model.resolution.InvalidRepositoryException;
 import org.apache.maven.model.resolution.ModelResolver;
 import org.apache.maven.model.resolution.UnresolvableModelException;
 import org.apache.maven.repository.internal.ArtifactDescriptorUtils;
-import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.RequestTrace;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.RemoteRepositoryManager;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.resolution.ArtifactRequest;
-import org.sonatype.aether.resolution.ArtifactResolutionException;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.RequestTrace;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
 
 /**
  * A model resolver to assist building of projects. This resolver gives priority to those repositories that have been
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java
index e36d1d2..456cfa9 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java
@@ -22,7 +22,7 @@ package org.apache.maven.project;
 import java.util.List;
 
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.sonatype.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyFilter;
 
 /**
  * Caches project class realms. <strong>Warning:</strong> This is an internal utility interface that is only public for
diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java
index b2fdec3..fd2b956 100644
--- a/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java
+++ b/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java
@@ -25,6 +25,7 @@ import org.apache.maven.artifact.InvalidArtifactRTException;
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.VersionRange;
 
 import java.util.Collection;
@@ -71,12 +72,12 @@ public class AttachedArtifact
             + " It is derived from the main artifact." );
     }
 
-    public List getAvailableVersions()
+    public List<ArtifactVersion> getAvailableVersions()
     {
         return parent.getAvailableVersions();
     }
 
-    public void setAvailableVersions( List availableVersions )
+    public void setAvailableVersions( List<ArtifactVersion> availableVersions )
     {
         throw new UnsupportedOperationException( "Cannot change the version information for an attached artifact."
             + " It is derived from the main artifact." );
@@ -176,9 +177,9 @@ public class AttachedArtifact
         // we must fail silently here to avoid problems with the artifact transformers.
     }
 
-    public Collection getMetadataList()
+    public Collection<ArtifactMetadata> getMetadataList()
     {
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
     }
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
index 919f0ee..002134b 100644
--- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
+++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
@@ -52,7 +52,6 @@ import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.model.DistributionManagement;
@@ -76,9 +75,9 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.Logger;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RepositoryPolicy;
-import org.sonatype.aether.transfer.ArtifactNotFoundException;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.transfer.ArtifactNotFoundException;
 
 /**
  * @author Jason van Zyl
@@ -735,12 +734,8 @@ public class MavenMetadataSource
         {
             return true;
         }
-        if ( e.getCause() instanceof org.sonatype.aether.resolution.ArtifactResolutionException
-            && e.getCause().getCause() instanceof ArtifactNotFoundException )
-        {
-            return true;
-        }
-        return false;
+        return e.getCause() instanceof org.eclipse.aether.resolution.ArtifactResolutionException
+            && e.getCause().getCause() instanceof ArtifactNotFoundException;
     }
 
     private boolean isNonTransferrablePom( Exception e )
@@ -749,12 +744,8 @@ public class MavenMetadataSource
         {
             return true;
         }
-        if ( e.getCause() instanceof org.sonatype.aether.resolution.ArtifactResolutionException
-            && !( e.getCause().getCause() instanceof ArtifactNotFoundException ) )
-        {
-            return true;
-        }
-        return false;
+        return e.getCause() instanceof org.eclipse.aether.resolution.ArtifactResolutionException
+            && !( e.getCause().getCause() instanceof ArtifactNotFoundException );
     }
 
     private Properties getSystemProperties()
diff --git a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java
index f8f4f22..0f3cd56 100644
--- a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java
+++ b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java
@@ -34,24 +34,25 @@ import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Repository;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Server;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * @author Jason van Zyl
+ * @since 3.0-alpha
  */
 public interface RepositorySystem
 {
-    final String DEFAULT_LOCAL_REPO_ID = "local";
+    String DEFAULT_LOCAL_REPO_ID = "local";
 
-    final String userHome = System.getProperty( "user.home" );
+    String userHome = System.getProperty( "user.home" );
 
-    final File userMavenConfigurationHome = new File( userHome, ".m2" );
+    File userMavenConfigurationHome = new File( userHome, ".m2" );
 
-    final File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" );
+    File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" );
 
-    final String DEFAULT_REMOTE_REPO_ID = "central";
+    String DEFAULT_REMOTE_REPO_ID = "central";
 
-    final String DEFAULT_REMOTE_REPO_URL = "http://repo.maven.apache.org/maven2";
+    String DEFAULT_REMOTE_REPO_URL = "http://repo.maven.apache.org/maven2";
 
     Artifact createArtifact( String groupId, String artifactId, String version, String packaging );
 
diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java
index a3fac63..aaa0ee3 100644
--- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java
+++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java
@@ -65,7 +65,7 @@ public interface ArtifactMetadataSource
      *            needed, for instance the following code will work
      *            <code>artifactFactory.createProjectArtifact( "org.apache.maven", "maven", "" )</code>
      * @param localRepository    local repository
-     * @param deploymentRepository remote repository
+     * @param remoteRepository   remote repository
      * @return {@link List} $lt; {@link ArtifactVersion} >
      * @throws ArtifactMetadataRetrievalException
      *          in case of error while retrieving repository metadata from the repository.
diff --git a/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java b/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java
index 04ec4fe..2bb801d 100644
--- a/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java
+++ b/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java
@@ -29,11 +29,11 @@ import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.util.version.GenericVersionScheme;
-import org.sonatype.aether.version.InvalidVersionSpecificationException;
-import org.sonatype.aether.version.Version;
-import org.sonatype.aether.version.VersionConstraint;
-import org.sonatype.aether.version.VersionScheme;
+import org.eclipse.aether.util.version.GenericVersionScheme;
+import org.eclipse.aether.version.InvalidVersionSpecificationException;
+import org.eclipse.aether.version.Version;
+import org.eclipse.aether.version.VersionConstraint;
+import org.eclipse.aether.version.VersionScheme;
 
 /**
  * Provides information about the current Maven runtime.
@@ -139,7 +139,7 @@ public class DefaultRuntimeInformation
             throw new IllegalStateException( "Could not parse current Maven version: " + e.getMessage(), e );
         }
 
-        if ( constraint.getRanges().isEmpty() )
+        if ( constraint.getRange() == null )
         {
             return constraint.getVersion().compareTo( current ) <= 0;
         }
diff --git a/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java b/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java
index aacce44..8da696e 100644
--- a/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java
+++ b/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java
@@ -48,7 +48,7 @@ public final class SettingsUtils
     }
 
     /**
-     * @param settingsProfile
+     * @param modelProfile
      * @return a profile
      */
     public static Profile convertToSettingsProfile( org.apache.maven.model.Profile modelProfile )
diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java
index 2052b52..74f6e4a 100644
--- a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java
+++ b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java
@@ -20,7 +20,6 @@ package org.apache.maven.toolchain;
  */
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.maven.toolchain.model.ToolchainModel;
@@ -74,12 +73,11 @@ public abstract class DefaultToolchain
     }
 
 
-    public boolean matchesRequirements( Map requirements )
+    public boolean matchesRequirements( Map<String, String> requirements )
     {
-        Iterator it = requirements.keySet().iterator();
-        while ( it.hasNext() )
+        for ( Map.Entry<String, String> requirement : requirements.entrySet() )
         {
-            String key = (String) it.next();
+            String key = requirement.getKey();
 
             RequirementMatcher matcher = provides.get( key );
 
@@ -88,7 +86,7 @@ public abstract class DefaultToolchain
                 getLog().debug( "Toolchain " + this + " is missing required property: " + key );
                 return false;
             }
-            if ( !matcher.matches( (String) requirements.get( key ) ) )
+            if ( !matcher.matches( requirement.getValue() ) )
             {
                 getLog().debug( "Toolchain " + this + " doesn't match required property: " + key );
                 return false;
diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java
index 93664f9..b104cd0 100644
--- a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java
+++ b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java
@@ -35,9 +35,9 @@ public interface ToolchainPrivate
      * Let the toolchain decide if it matches requirements defined
      * in the toolchain plugin configuration.
      * @param requirements Map<String, String> key value pair
-     * @return
+     * @return {@code true} if the requirements match, otherwise {@code false}
      */
-    boolean matchesRequirements( Map requirements );
+    boolean matchesRequirements( Map<String, String> requirements );
 
     ToolchainModel getModel();
 
diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java b/maven-core/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java
index 776f314..6a8e7f6 100644
--- a/maven-core/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java
+++ b/maven-core/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java
@@ -78,23 +78,22 @@ public class DefaultJavaToolchainFactory
         //TODO possibly move at least parts to a utility method or abstract implementation.
         dom = (Xpp3Dom) model.getProvides();
         Xpp3Dom[] provides = dom.getChildren();
-        for ( int i = 0; i < provides.length; i++ )
+        for ( Xpp3Dom provide : provides )
         {
-            String key = provides[i].getName();
-            String value = provides[i].getValue();
+            String key = provide.getName();
+            String value = provide.getValue();
             if ( value == null )
             {
-                throw new MisconfiguredToolchainException( "Provides token '" + key + "' doesn't have any value configured." );
+                throw new MisconfiguredToolchainException(
+                    "Provides token '" + key + "' doesn't have any value configured." );
             }
             if ( "version".equals( key ) )
             {
-                jtc.addProvideToken( key,
-                    RequirementMatcherFactory.createVersionMatcher( value ) );
+                jtc.addProvideToken( key, RequirementMatcherFactory.createVersionMatcher( value ) );
             }
             else
             {
-                jtc.addProvideToken( key,
-                    RequirementMatcherFactory.createExactMatcher( value ) );
+                jtc.addProvideToken( key, RequirementMatcherFactory.createExactMatcher( value ) );
             }
         }
         return jtc;
diff --git a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
index 8d16de3..855e9b7 100644
--- a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
@@ -21,13 +21,7 @@ under the License.
 
 <!-- 
 
-Artifact handlers are required by the dependency resolution mechanism and therefore needed by the core.
-The type specified by a dependency could be altered to load a particular plugin in order to get the 
-artifact handler. This would make it easier to encapsulate all handling for a type in one place and
-not be bound to the core. It wouldn't be terrible as the plugin would need to be downloaded, classloaded,
-components discovered which is probably a reasonable price to pay for complete and comprehensible
-encapsulation. All these special entries here is probably understood by no one which is a real
-problem.
+Artifact handlers are required by the dependency resolution mechanism.
 
 -->
 
@@ -44,28 +38,6 @@ problem.
         <type>pom</type>
       </configuration>
     </component>     
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>pom</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: pom-lifecycle -->
-            <phases>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: pom-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>    
     
     <!--
      | JAR
@@ -80,46 +52,6 @@ problem.
         <addedToClasspath>true</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>jar</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: jar-lifecycle -->
-            <phases>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-jar-plugin:2.3.2:jar
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: jar-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>
           
     <!--
      | EJB 
@@ -136,46 +68,6 @@ problem.
       </configuration>
     </component>
     <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>ejb</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: ejb-lifecycle -->
-            <phases>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-ejb-plugin:2.3:ejb
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: ejb-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>    
-    <component>
       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
       <role-hint>ejb-client</role-hint>
       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
@@ -199,46 +91,6 @@ problem.
         <addedToClasspath>false</addedToClasspath>
       </configuration>
     </component>   
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>ejb3</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: ejb3-lifecycle -->
-            <phases>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-ejb3-plugin:ejb3
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: ejb3-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>     
 
     <!--
      | TEST JAR
@@ -271,50 +123,6 @@ problem.
         <addedToClasspath>true</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>maven-plugin</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: maven-plugin-lifecycle -->
-            <phases>
-              <generate-resources>
-                org.apache.maven.plugins:maven-plugin-plugin:2.9:descriptor
-              </generate-resources>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar,
-                org.apache.maven.plugins:maven-plugin-plugin:2.9:addPluginArtifactMetadata
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: maven-plugin-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>    
 
     <!--
      | SOURCE JAR
@@ -362,46 +170,6 @@ problem.
         <addedToClasspath>false</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>war</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: war-lifecycle -->
-            <phases>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-war-plugin:2.1.1:war
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: war-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>    
 
     <!--
      | EAR 
@@ -417,37 +185,6 @@ problem.
         <addedToClasspath>false</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>ear</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: ear-lifecycle -->
-            <phases>
-              <generate-resources>
-                org.apache.maven.plugins:maven-ear-plugin:2.5:generate-application-xml
-              </generate-resources>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources
-              </process-resources>
-              <package>
-                org.apache.maven.plugins:maven-ear-plugin:2.6:ear
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: ear-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>
 
     <!--
      | RAR
@@ -463,46 +200,6 @@ problem.
         <addedToClasspath>false</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>rar</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: rar-lifecycle -->
-            <phases>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-rar-plugin:2.2:rar
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: rar-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>    
 
     <!--
      | PAR
@@ -518,45 +215,5 @@ problem.
         <addedToClasspath>false</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-      <role-hint>par</role-hint>
-      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
-      <configuration>
-        <lifecycles>
-          <lifecycle>
-            <id>default</id>
-            <!-- START SNIPPET: par-lifecycle -->
-            <phases>
-              <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
-              </process-resources>
-              <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
-              </compile>
-              <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
-              </process-test-resources>
-              <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
-              </test-compile>
-              <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
-              </test>
-              <package>
-                org.apache.maven.plugins:maven-par-plugin:par
-              </package>
-              <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
-              </install>
-              <deploy>
-                org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
-              </deploy>
-            </phases>
-            <!-- END SNIPPET: par-lifecycle -->
-          </lifecycle>
-        </lifecycles>
-      </configuration>
-    </component>    
   </components>
 </component-set>
diff --git a/maven-core/src/main/resources/META-INF/plexus/components.xml b/maven-core/src/main/resources/META-INF/plexus/components.xml
index c4cb6d5..93eb2c4 100644
--- a/maven-core/src/main/resources/META-INF/plexus/components.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/components.xml
@@ -106,7 +106,7 @@ under the License.
         </phases>
         <default-phases>
           <clean>
-            org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean
+            org.apache.maven.plugins:maven-clean-plugin:2.5:clean
           </clean>
         </default-phases>
         <!-- END SNIPPET: clean -->
@@ -129,10 +129,10 @@ under the License.
         </phases>
         <default-phases>
           <site>
-            org.apache.maven.plugins:maven-site-plugin:3.0:site
+            org.apache.maven.plugins:maven-site-plugin:3.3:site
           </site>
           <site-deploy>
-            org.apache.maven.plugins:maven-site-plugin:3.0:deploy
+            org.apache.maven.plugins:maven-site-plugin:3.3:deploy
           </site-deploy>
         </default-phases>
         <!-- END SNIPPET: site -->
@@ -149,6 +149,10 @@ under the License.
           <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>
           <field-name>_cipher</field-name>
         </requirement>
+        <requirement>
+          <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>
+          <field-name>_decryptors</field-name>
+        </requirement>
       </requirements>
       <configuration>
         <_configuration-file>~/.m2/settings-security.xml</_configuration-file>
diff --git a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml b/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
similarity index 64%
copy from maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
copy to maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
index 8d16de3..09ecba4 100644
--- a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
@@ -21,13 +21,7 @@ under the License.
 
 <!-- 
 
-Artifact handlers are required by the dependency resolution mechanism and therefore needed by the core.
-The type specified by a dependency could be altered to load a particular plugin in order to get the 
-artifact handler. This would make it easier to encapsulate all handling for a type in one place and
-not be bound to the core. It wouldn't be terrible as the plugin would need to be downloaded, classloaded,
-components discovered which is probably a reasonable price to pay for complete and comprehensible
-encapsulation. All these special entries here is probably understood by no one which is a real
-problem.
+Mappings to default lifecycle, specific for each packaging.
 
 -->
 
@@ -37,14 +31,6 @@ problem.
      | POM
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>pom</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>pom</type>
-      </configuration>
-    </component>     
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>pom</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -55,7 +41,7 @@ problem.
             <!-- START SNIPPET: pom-lifecycle -->
             <phases>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -71,16 +57,6 @@ problem.
      | JAR
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>jar</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>jar</type>
-        <language>java</language>
-        <addedToClasspath>true</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>jar</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -91,25 +67,25 @@ problem.
             <!-- START SNIPPET: jar-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
-                org.apache.maven.plugins:maven-jar-plugin:2.3.2:jar
+                org.apache.maven.plugins:maven-jar-plugin:2.4:jar
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -125,17 +101,6 @@ problem.
      | EJB 
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>ejb</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>ejb</type>
-        <extension>jar</extension>
-        <language>java</language>
-        <addedToClasspath>true</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>ejb</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -146,25 +111,25 @@ problem.
             <!-- START SNIPPET: ejb-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
                 org.apache.maven.plugins:maven-ejb-plugin:2.3:ejb
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -176,30 +141,6 @@ problem.
       </configuration>
     </component>    
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>ejb-client</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>ejb-client</type>
-        <extension>jar</extension>
-        <packaging>ejb</packaging>
-        <classifier>client</classifier>
-        <language>java</language>
-        <addedToClasspath>true</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>ejb3</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>ejb3</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>   
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>ejb3</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -210,25 +151,25 @@ problem.
             <!-- START SNIPPET: ejb3-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
                 org.apache.maven.plugins:maven-ejb3-plugin:ejb3
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -241,37 +182,9 @@ problem.
     </component>     
 
     <!--
-     | TEST JAR
-     |-->
-    <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>test-jar</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <classifier>tests</classifier>
-        <extension>jar</extension>
-        <type>test-jar</type>
-        <packaging>jar</packaging>
-        <language>java</language>
-        <addedToClasspath>true</addedToClasspath>
-      </configuration>
-    </component>
-
-    <!--
      | MAVEN PLUGIN
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>maven-plugin</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>maven-plugin</type>
-        <extension>jar</extension>
-        <language>java</language>
-        <addedToClasspath>true</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>maven-plugin</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -282,29 +195,29 @@ problem.
             <!-- START SNIPPET: maven-plugin-lifecycle -->
             <phases>
               <generate-resources>
-                org.apache.maven.plugins:maven-plugin-plugin:2.9:descriptor
+                org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor
               </generate-resources>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
-                org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar,
-                org.apache.maven.plugins:maven-plugin-plugin:2.9:addPluginArtifactMetadata
+                org.apache.maven.plugins:maven-jar-plugin:2.4:jar,
+                org.apache.maven.plugins:maven-plugin-plugin:3.2:addPluginArtifactMetadata
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -317,52 +230,9 @@ problem.
     </component>    
 
     <!--
-     | SOURCE JAR
-     |-->
-    <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>java-source</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <classifier>sources</classifier>
-        <type>java-source</type>
-        <extension>jar</extension>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
-
-    <!--
-     | JAVADOC JAR 
-     |-->
-    <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>javadoc</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <classifier>javadoc</classifier>
-        <type>javadoc</type>
-        <extension>jar</extension>
-        <language>java</language>
-        <addedToClasspath>true</addedToClasspath>
-      </configuration>
-    </component>
-
-    <!--
      | WAR 
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>war</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>war</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>war</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -373,25 +243,25 @@ problem.
             <!-- START SNIPPET: war-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
-                org.apache.maven.plugins:maven-war-plugin:2.1.1:war
+                org.apache.maven.plugins:maven-war-plugin:2.2:war
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -407,17 +277,6 @@ problem.
      | EAR 
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>ear</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>ear</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>ear</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -428,16 +287,16 @@ problem.
             <!-- START SNIPPET: ear-lifecycle -->
             <phases>
               <generate-resources>
-                org.apache.maven.plugins:maven-ear-plugin:2.5:generate-application-xml
+                org.apache.maven.plugins:maven-ear-plugin:2.8:generate-application-xml
               </generate-resources>
               <process-resources>
                 org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources
               </process-resources>
               <package>
-                org.apache.maven.plugins:maven-ear-plugin:2.6:ear
+                org.apache.maven.plugins:maven-ear-plugin:2.8:ear
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -453,17 +312,6 @@ problem.
      | RAR
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>rar</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>rar</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>rar</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -474,25 +322,25 @@ problem.
             <!-- START SNIPPET: rar-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
                 org.apache.maven.plugins:maven-rar-plugin:2.2:rar
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
@@ -508,17 +356,6 @@ problem.
      | PAR
      |-->
     <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>par</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>par</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
-    <component>
       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
       <role-hint>par</role-hint>
       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
@@ -529,25 +366,25 @@ problem.
             <!-- START SNIPPET: par-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:resources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:resources
               </process-resources>
               <compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.5:testResources
+                org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
               </process-test-resources>
               <test-compile>
-                org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
+                org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
               </test-compile>
               <test>
-                org.apache.maven.plugins:maven-surefire-plugin:2.10:test
+                org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
               </test>
               <package>
                 org.apache.maven.plugins:maven-par-plugin:par
               </package>
               <install>
-                org.apache.maven.plugins:maven-install-plugin:2.3.1:install
+                org.apache.maven.plugins:maven-install-plugin:2.4:install
               </install>
               <deploy>
                 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/build.properties b/maven-core/src/main/resources/org/apache/maven/messages/build.properties
index ab2e60f..d15784a 100644
--- a/maven-core/src/main/resources/org/apache/maven/messages/build.properties
+++ b/maven-core/src/main/resources/org/apache/maven/messages/build.properties
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 buildNumber=${buildNumber}
 timestamp=${timestamp}
 version=${project.version}
diff --git a/maven-core/src/site/apt/artifact-handlers.apt b/maven-core/src/site/apt/artifact-handlers.apt
new file mode 100644
index 0000000..916161b
--- /dev/null
+++ b/maven-core/src/site/apt/artifact-handlers.apt
@@ -0,0 +1,59 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ ---
+ Default Artifact Handlers Reference
+ ---
+ Hervé Boutemy
+ ---
+ 2013-08-02
+ ---
+
+Default Artifact Handlers Reference
+
+  Some artifact handlers (see {{{../maven-artifact/apidocs/org/apache/maven/artifact/handler/ArtifactHandler.html} API}})
+  are configured by default in <<<META-INF/plexus/artifact-handlers.xml>>>:
+
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+|| type              || extension || packaging || classifier   || language || added to classpath || includesDependencies ||
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<pom>>>          | <= type>   | <= type>   |               | none      |                     |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<jar>>>          | <= type>   | <= type>   |               | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<maven-plugin>>> | <<<jar>>>  | <= type>   |               | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<ejb>>>          | <<<jar>>>  | <= type>   |               | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<ejb3>>>         | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<war>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<ear>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<rar>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<par>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<java-source>>>  | <<<jar>>>  | <= type>   | <<<sources>>> | java      |                     |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<javadoc>>>      | <<<jar>>>  | <= type>   | <<<javadoc>>> | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<ejb-client>>>   | <<<jar>>>  | <<<ejb>>>  | <<<client>>>  | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<test-jar>>>     | <<<jar>>>  | <<<jar>>>  | <<<tests>>>   | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
diff --git a/maven-core/src/site/apt/configuration-management.apt b/maven-core/src/site/apt/configuration-management.apt
index 71cb234..7c70abc 100644
--- a/maven-core/src/site/apt/configuration-management.apt
+++ b/maven-core/src/site/apt/configuration-management.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Maven configuration management
  -----
diff --git a/maven-core/src/site/apt/default-bindings.apt.vm b/maven-core/src/site/apt/default-bindings.apt.vm
index 0e129ba..607f244 100644
--- a/maven-core/src/site/apt/default-bindings.apt.vm
+++ b/maven-core/src/site/apt/default-bindings.apt.vm
@@ -1,51 +1,68 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  ---
- Bindings for Default Lifecycle Reference
+ Plugin Bindings for Default Lifecycle Reference
  ---
  Hervé Boutemy
  ---
- 2011-09-12
+ 2013-08-02
  ---
   
-Bindings for <<<default>>> Lifecycle Reference
+Plugin Bindings for <<<default>>> Lifecycle Reference
 
-  The {{{./lifecycles.html}default lifecycle}} is defined without any binding: bindings are defined separately and
-  are specific for each packaging:
+  The {{{./lifecycles.html}<<<default>>> lifecycle}} is defined without any plugin binding; plugin bindings are defined separately
+  in <<<META-INF/plexus/default-bindings.xml>>> because they are specific for each packaging:
 
 %{toc|fromDepth=2}
 
-* Bindings for <<<pom>>> packaging
+* Plugin bindings for <<<pom>>> packaging
 
-%{snippet|id=pom-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=pom-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<jar>>> packaging
+* Plugin bindings for <<<jar>>> packaging
 
-%{snippet|id=jar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=jar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<ejb>>> packaging
+* Plugin bindings for <<<ejb>>> packaging
 
-%{snippet|id=ejb-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=ejb-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<ejb3>>> packaging
+* Plugin bindings for <<<ejb3>>> packaging
 
-%{snippet|id=ejb3-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=ejb3-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<maven-plugin>>> packaging
+* Plugin bindings for <<<maven-plugin>>> packaging
 
-%{snippet|id=maven-plugin-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=maven-plugin-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<war>>> packaging
+* Plugin bindings for <<<war>>> packaging
 
-%{snippet|id=war-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=war-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<ear>>> packaging
+* Plugin bindings for <<<ear>>> packaging
 
-%{snippet|id=ear-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=ear-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<rar>>> packaging
+* Plugin bindings for <<<rar>>> packaging
 
-%{snippet|id=rar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=rar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Bindings for <<<par>>> packaging
+* Plugin bindings for <<<par>>> packaging
 
-%{snippet|id=par-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/artifact-handlers.xml}
+%{snippet|id=par-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
   
\ No newline at end of file
diff --git a/maven-core/src/site/apt/getting-to-container-configured-mojos.apt b/maven-core/src/site/apt/getting-to-container-configured-mojos.apt
index 1f7c77f..4daa6c1 100644
--- a/maven-core/src/site/apt/getting-to-container-configured-mojos.apt
+++ b/maven-core/src/site/apt/getting-to-container-configured-mojos.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
   ---
   Getting to Plexus-configured Mojos
   ---
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
new file mode 100644
index 0000000..f66e577
--- /dev/null
+++ b/maven-core/src/site/apt/index.apt
@@ -0,0 +1,61 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
+ Introduction
+ -----
+ Hervé Boutemy
+ -----
+ 2013-07-27
+ -----
+
+Maven Core
+
+ Maven Core classes managing the whole build process.
+
+* Useful entry points
+
+ * {{{./lifecycles.html}lifecycles}} and {{{./default-bindings.html}plugin bindings to <<<default>>> lifecycle}},
+
+ * {{{./artifact-handlers.html}default artifact handlers}},
+
+ * {{{./toolchains.html}Toolchains descriptor reference}},
+
+ * <<<Maven>>> component ({{{./apidocs/org/apache/maven/Maven.html}javadoc}}),
+ with its <<<DefaultMaven>>> implementation ({{{./xref/org/apache/maven/DefaultMaven.html}source}}),
+
+ * <<<ProjectBuilder>>> component ({{{./apidocs/org/apache/maven/project/ProjectBuilder.html}javadoc}}),
+ with its <<<DefaultProjectBuilder>>> implementation
+ ({{{./xref/org/apache/maven/project/DefaultProjectBuilder.html}source}}),
+
+ * <<<MavenPluginManager>>> component ({{{./apidocs/org/apache/maven/plugin/MavenPluginManager.html}javadoc}}),
+ with its <<<DefaultMavenPluginManager>>> implementation
+ ({{{./xref/org/apache/maven/plugin/internal/DefaultMavenPluginManager.html}source}}),
+
+ * {{{./apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html}PluginParameterExpressionEvaluator}}, used to
+ evaluate plugin parameters values during Mojo configuration,
+
+ * {{{/guides/mini/guide-maven-classloading.html}classloader hierarchy}} done by <<<ClassRealmManager>>> component
+ ({{{./apidocs/org/apache/maven/classrealm/ClassRealmManager.html}javadoc}}),
+ with its <<<DefaultClassRealmManager>>> implementation
+ ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}), using
+ {{{http://plexus.codehaus.org/plexus-classworlds/}Plexus Classworlds}},
+
+ * <<<ExceptionHandler>>> component ({{{./apidocs/org/apache/maven/exception/ExceptionHandler.html}javadoc}}),
+ with its <<<DefaultExceptionHandler>>> implementation
+ ({{{./xref/org/apache/maven/exception/DefaultExceptionHandler.html}source}}), use to transform exception into useful end-user messages.
+ 
\ No newline at end of file
diff --git a/maven-core/src/site/apt/inheritance.apt b/maven-core/src/site/apt/inheritance.apt
index f9fda34..41fa3f9 100644
--- a/maven-core/src/site/apt/inheritance.apt
+++ b/maven-core/src/site/apt/inheritance.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Inheritance in Maven
  -----
diff --git a/maven-core/src/site/apt/lifecycles.apt.vm b/maven-core/src/site/apt/lifecycles.apt.vm
index 253bbf6..584a77d 100644
--- a/maven-core/src/site/apt/lifecycles.apt.vm
+++ b/maven-core/src/site/apt/lifecycles.apt.vm
@@ -1,32 +1,49 @@
- ---
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
  Lifecycles Reference
- ---
+ -----
  Hervé Boutemy
- ---
- 2011-09-12
- ---
+ -----
+ 2013-08-02
+ -----
   
 Lifecycles Reference
 
-  Maven defines 3 lifecycles:
+  Maven defines 3 lifecycles in <<<META-INF/plexus/components.xml>>>:
 
 %{toc|fromDepth=2}
 
 * <<<default>>> Lifecycle
 
-  <<<default>>> lifecycle is defined without any associated.
-  Bindings are {{{./default-bindings.html}defined separately for every packaging}}:
+  <<<default>>> lifecycle is defined <<without>> any associated plugin.
+  Plugin bindings for this lifecycle are {{{./default-bindings.html}defined separately for every packaging}}:
 
 %{snippet|id=lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
 
 * <<<clean>>> Lifecycle
 
-  <<<clean>>> lifecycle is defined directly with its bindings.
+  <<<clean>>> lifecycle is defined directly with its plugin bindings.
 
 %{snippet|id=clean|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
 
 * <<<site>>> Lifecycle
 
-  <<<site>>> lifecycle is defined directly with its bindings.
+  <<<site>>> lifecycle is defined directly with its plugin bindings.
 
 %{snippet|id=site|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
diff --git a/maven-core/src/site/apt/offline-mode.apt b/maven-core/src/site/apt/offline-mode.apt
index ff7cdb7..b64e2da 100644
--- a/maven-core/src/site/apt/offline-mode.apt
+++ b/maven-core/src/site/apt/offline-mode.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
   ---
   Offline Mode Design
   ---
diff --git a/maven-core/src/site/apt/plugin-execution-isolation.apt b/maven-core/src/site/apt/plugin-execution-isolation.apt
index 0c73df1..e64ae26 100644
--- a/maven-core/src/site/apt/plugin-execution-isolation.apt
+++ b/maven-core/src/site/apt/plugin-execution-isolation.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Maven plugins
  -----
diff --git a/maven-core/src/site/apt/scripting-support/marmalade-support.apt b/maven-core/src/site/apt/scripting-support/marmalade-support.apt
index 7800f73..87d4815 100644
--- a/maven-core/src/site/apt/scripting-support/marmalade-support.apt
+++ b/maven-core/src/site/apt/scripting-support/marmalade-support.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
   ---
   Marmalade Mojo Support - Notes
   ---
diff --git a/maven-core/src/site/site.xml b/maven-core/src/site/site.xml
index 3860fa7..2c38d2a 100644
--- a/maven-core/src/site/site.xml
+++ b/maven-core/src/site/site.xml
@@ -32,7 +32,8 @@ under the License.
 
     <menu name="Reference">
       <item name="Lifecycles" href="lifecycles.html"/>
-      <item name="Default Lifecycle Bindings" href="default-bindings.html"/>
+      <item name="Plugin Bindings to Default Lifecycle" href="default-bindings.html"/>
+      <item name="Artifact Handlers" href="artifact-handlers.html"/>
     </menu>
 
     <menu ref="parent"/>
diff --git a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
index 31f6c86..6534fc1 100644
--- a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
+++ b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
@@ -42,12 +42,14 @@ import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
 import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.FileUtils;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
+import org.eclipse.aether.repository.LocalRepository;
 
 public abstract class AbstractCoreMavenComponentTestCase
     extends PlexusTestCase
@@ -96,8 +98,7 @@ public abstract class AbstractCoreMavenComponentTestCase
      */
     protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
     {
-//        containerConfiguration.addComponentDiscoverer( PluginManager.class );
-//        containerConfiguration.addComponentDiscoveryListener( PluginManager.class );
+        containerConfiguration.setAutoWiring( true );
     }
 
     protected MavenExecutionRequest createMavenExecutionRequest( File pom )
@@ -107,11 +108,11 @@ public abstract class AbstractCoreMavenComponentTestCase
             .setPom( pom )
             .setProjectPresent( true )
             .setShowErrors( true )
-            .setPluginGroups( Arrays.asList( new String[] { "org.apache.maven.plugins" } ) )
+            .setPluginGroups( Arrays.asList( "org.apache.maven.plugins" ) )
             .setLocalRepository( getLocalRepository() )
             .setRemoteRepositories( getRemoteRepositories() )
             .setPluginArtifactRepositories( getPluginArtifactRepositories() )
-            .setGoals( Arrays.asList( new String[] { "package" } ) );
+            .setGoals( Arrays.asList( "package" ) );
 
         return request;
     }
@@ -160,10 +161,12 @@ public abstract class AbstractCoreMavenComponentTestCase
     }
 
     protected void initRepoSession( ProjectBuildingRequest request )
+        throws Exception
     {
-        File localRepo = new File( request.getLocalRepository().getBasedir() );
-        MavenRepositorySystemSession session = new MavenRepositorySystemSession();
-        session.setLocalRepositoryManager( new SimpleLocalRepositoryManager( localRepo ) );
+        File localRepoDir = new File( request.getLocalRepository().getBasedir() );
+        LocalRepository localRepo = new LocalRepository( localRepoDir );
+        DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
+        session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
         request.setRepositorySession( session );
     }
 
diff --git a/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java b/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java
index b220304..558d917 100644
--- a/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java
+++ b/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java
@@ -88,8 +88,9 @@ public class MavenLifecycleParticipantTest
     {
         PlexusContainer container = getContainer();
 
-        ComponentDescriptor cd =
-            new ComponentDescriptor( InjectDependencyLifecycleListener.class, container.getContainerRealm() );
+        ComponentDescriptor<? extends AbstractMavenLifecycleParticipant> cd =
+            new ComponentDescriptor<InjectDependencyLifecycleListener>( InjectDependencyLifecycleListener.class,
+                                                                        container.getContainerRealm() );
         cd.setRoleClass( AbstractMavenLifecycleParticipant.class );
         container.addComponentDescriptor( cd );
 
diff --git a/maven-core/src/test/java/org/apache/maven/MavenTest.java b/maven-core/src/test/java/org/apache/maven/MavenTest.java
index 5cfdada..3e24860 100644
--- a/maven-core/src/test/java/org/apache/maven/MavenTest.java
+++ b/maven-core/src/test/java/org/apache/maven/MavenTest.java
@@ -1,11 +1,22 @@
 package org.apache.maven;
 
-import java.io.File;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 
 import org.apache.maven.exception.ExceptionHandler;
-import org.apache.maven.exception.ExceptionSummary;
-import org.apache.maven.execution.MavenExecutionRequest;
-import org.apache.maven.execution.MavenExecutionResult;
 import org.codehaus.plexus.component.annotations.Requirement;
 
 public class MavenTest
diff --git a/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java b/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java
index dbbfb99..67a7575 100644
--- a/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java
+++ b/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java
@@ -1,5 +1,20 @@
 package org.apache.maven;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import java.io.File;
 import java.util.Collections;
 import java.util.List;
@@ -8,7 +23,6 @@ import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.execution.MavenSession;
-import org.apache.maven.model.Exclusion;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Requirement;
 
@@ -92,6 +106,7 @@ public class ProjectDependenciesResolverTest
         List<String> elements = project.getCompileClasspathElements();
         assertEquals( 2, elements.size() );
         
+        @SuppressWarnings( "deprecation" )
         List<Artifact> artifacts = project.getCompileArtifacts();
         assertEquals( 1, artifacts.size() );
         assertTrue( artifacts.get( 0 ).getFile().getName().endsWith( "tools.jar" ) );
diff --git a/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java b/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java
new file mode 100644
index 0000000..ac02e10
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java
@@ -0,0 +1,89 @@
+package org.apache.maven.artifact.handler;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.List;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+public class ArtifactHandlerTest
+    extends PlexusTestCase
+{
+    public void testAptConsistency()
+        throws Exception
+    {
+        File apt = getTestFile( "src/site/apt/artifact-handlers.apt" );
+
+        @SuppressWarnings( "unchecked" )
+        List<String> lines = FileUtils.loadFile( apt );
+
+        for ( String line : lines )
+        {
+            if ( line.startsWith( "||" ) )
+            {
+                String[] cols = line.split( "\\|\\|" );
+                String[] expected =
+                    new String[] { "", "type", "extension", "packaging", "classifier", "language", "added to classpath",
+                        "includesDependencies", "" };
+
+                int i = 0;
+                for ( String col : cols )
+                {
+                    assertEquals( "Wrong column header", expected[i++], col.trim() );
+                }
+            }
+            else if ( line.startsWith( "|" ) )
+            {
+                String[] cols = line.split( "\\|" );
+
+                String type = trimApt( cols[1] );
+                String extension = trimApt( cols[2], type );
+                String packaging = trimApt( cols[3], type );
+                String classifier = trimApt( cols[4] );
+                String language = trimApt( cols[5] );
+                String addedToClasspath = trimApt( cols[6] );
+                String includesDependencies = trimApt( cols[7] );
+
+                ArtifactHandler handler = lookup( ArtifactHandler.class, type );
+                assertEquals( type + " extension", handler.getExtension(), extension );
+                assertEquals( type + " packaging", handler.getPackaging(), packaging );
+                assertEquals( type + " classifier", handler.getClassifier(), classifier );
+                assertEquals( type + " language", handler.getLanguage(), language );
+                assertEquals( type + " addedToClasspath", handler.isAddedToClasspath() ? "true" : null, addedToClasspath );
+                assertEquals( type + " includesDependencies", handler.isIncludesDependencies() ? "true" : null, includesDependencies );
+            }
+        }
+    }
+
+    private String trimApt( String content, String type )
+    {
+        String value = trimApt( content );
+        return "= type".equals( value ) ? type : value;
+    }
+
+    private String trimApt( String content )
+    {
+        content = content.replace( '<', ' ' ).replace( '>', ' ' ).trim();
+
+        return ( content.length() == 0 ) ? null : content;
+    }
+}
diff --git a/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java b/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java
new file mode 100644
index 0000000..9727bdf
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java
@@ -0,0 +1,60 @@
+package org.apache.maven.exception;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.net.ConnectException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:baerrach at apache.org">Barrie Treloar</a>
+ */
+public class DefaultExceptionHandlerTest
+    extends TestCase
+{
+    /**
+     * Running Maven under JDK7 may cause connection issues because IPv6 is used by default.
+     * <p>
+     * e.g running mvn site:run will cause Jetty to fail.
+     * </p>
+     * <p>
+     * The resolution is to add -Djava.net.preferIPv4Stack=true to the command line as documented in
+     * http://cwiki.apache.org/confluence/display/MAVEN/ConnectException
+     * </p>
+     */
+    public void testJdk7ipv6()
+    {
+        ConnectException connEx = new ConnectException( "Connection refused: connect" );
+        IOException ioEx = new IOException( "Unable to establish loopback connection" );
+        ioEx.initCause( connEx );
+        MojoExecutionException mojoEx =
+            new MojoExecutionException( "Error executing Jetty: Unable to establish loopback connection", ioEx );
+
+        ExceptionHandler exceptionHandler = new DefaultExceptionHandler();
+        ExceptionSummary exceptionSummary = exceptionHandler.handleException( mojoEx );
+
+        String expectedReference = "http://cwiki.apache.org/confluence/display/MAVEN/ConnectException";
+        assertEquals( expectedReference, exceptionSummary.getReference() );
+
+    }
+}
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java b/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java
index 48c0a44..6244cc9 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java
@@ -32,8 +32,6 @@ public class MojoExecutionXPathContainer
 {
     private JXPathContext context;
 
-    private MojoExecution mojoExecution;
-
     static
     {
         JXPathContextReferenceImpl.addNodePointerFactory( new Xpp3DomPointerFactory() );
@@ -42,7 +40,6 @@ public class MojoExecutionXPathContainer
     public MojoExecutionXPathContainer( MojoExecution mojoExecution )
         throws IOException
     {
-        this.mojoExecution = mojoExecution;
         context = JXPathContext.newContext( mojoExecution );
     }
 
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java
index 4c7a61d..a003983 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -13,8 +15,6 @@
  * the License.
  */
 
-package org.apache.maven.lifecycle.internal;
-
 import junit.framework.TestCase;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.lifecycle.internal.stub.LifecycleTaskSegmentCalculatorStub;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java
index 21f0fc7..a474848 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -13,8 +15,6 @@
  * the License.
  */
 
-package org.apache.maven.lifecycle.internal;
-
 import junit.framework.TestCase;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.execution.MavenSession;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java
index a15ccca..0bb1227 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -12,7 +14,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.maven.lifecycle.internal;
 
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.execution.ProjectDependencyGraph;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrentBuildLoggerTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrentBuildLoggerTest.java
index f89c282..7eb7348 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrentBuildLoggerTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrentBuildLoggerTest.java
@@ -29,6 +29,7 @@ import java.util.Iterator;
 public class ConcurrentBuildLoggerTest
     extends TestCase
 {
+    @SuppressWarnings( "unused" )
     public void testToGraph()
         throws Exception
     {
@@ -68,6 +69,6 @@ public class ConcurrentBuildLoggerTest
         b1.addWait( A, aPlan.next(), System.currentTimeMillis() );
         b2.addWait( A, aPlan.next(), System.currentTimeMillis() );
         final String response = concurrentBuildLogger.toGraph();
-        assertTrue( response.indexOf( "digraph" ) >= 0 );
+        assertTrue( response.contains( "digraph" ) );
     }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java
index b7eacea..57caf95 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -12,7 +14,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.maven.lifecycle.internal;
 
 import junit.framework.TestCase;
 import org.apache.maven.lifecycle.Schedule;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java
index 13eedb4..cddbf59 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -13,10 +15,6 @@
  * the License.
  */
 
-package org.apache.maven.lifecycle.internal;
-
-import java.io.File;
-
 import org.apache.maven.AbstractCoreMavenComponentTestCase;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.lifecycle.MavenExecutionPlan;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java
index fa777f9..5c5e7e8 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -12,7 +14,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.maven.lifecycle.internal;
 
 import junit.framework.TestCase;
 import org.apache.maven.execution.DefaultMavenExecutionResult;
@@ -41,7 +42,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
 /**
- * @author Kristian Rosenvold>
+ * @author Kristian Rosenvold
  */
 public class LifecycleWeaveBuilderTest
     extends TestCase
@@ -57,6 +58,7 @@ public class LifecycleWeaveBuilderTest
     }
   */
 
+    @SuppressWarnings( "unused" )
     public void testBuildProjectThreaded()
         throws Exception
     {
@@ -66,6 +68,7 @@ public class LifecycleWeaveBuilderTest
         executor.shutdown();
     }
 
+    @SuppressWarnings( "unused" )
     public void testBuildProjectThreadedAggressive()
         throws Exception
     {
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java
index 77d10e5..12e1f86 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java
@@ -1,4 +1,5 @@
 package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -13,6 +14,7 @@ package org.apache.maven.lifecycle.internal;
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
+
 import junit.framework.TestCase;
 import org.apache.maven.lifecycle.MavenExecutionPlan;
 import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java
index 8049237..047ef9f 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -12,7 +14,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.maven.lifecycle.internal;
 
 import junit.framework.TestCase;
 import org.apache.maven.execution.MavenSession;
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java
index 40fcadf..f040566 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.lifecycle.internal;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -12,7 +14,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.maven.lifecycle.internal;
 
 import junit.framework.TestCase;
 import org.apache.maven.execution.MavenSession;
@@ -94,7 +95,6 @@ public class ThreadOutputMuxerTest
             Arrays.asList( "Thinkin", "of", "a", "master", "plan", "Cuz", "ain’t", "nuthin", "but", "sweat", "inside",
                            "my", "hand" );
         Iterator<String> lyrics = stringList.iterator();
-        List<Outputter> outputters = new ArrayList<Outputter>();
 
         ExecutorService executor = Executors.newFixedThreadPool( 10 );
         CompletionService<ProjectSegment> service = new ExecutorCompletionService<ProjectSegment>( executor );
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/AboutTheStubs.html b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/AboutTheStubs.html
index 4642e50..8ad74b9 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/AboutTheStubs.html
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/AboutTheStubs.html
@@ -1,5 +1,24 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
         "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <html>
 <head>
     <title>About these stubs</title>
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java
index be148bd..133bcb3 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java
@@ -24,8 +24,8 @@ import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * @author Kristian Rosenvold
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java
index 48b308f..5bf53ea 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java
@@ -49,6 +49,7 @@ public class DefaultLifecyclesStub
         List<String> stubSiteCycle =
             Arrays.asList( PRE_SITE.getPhase(), SITE.getPhase(), POST_SITE.getPhase(), SITE_DEPLOY.getPhase() );
 
+        @SuppressWarnings( "unchecked" )
         Iterator<List<String>> lcs = Arrays.asList( stubDefaultCycle, stubCleanCycle, stubSiteCycle ).iterator();
 
         Map<String, Lifecycle> lifeCycles = new HashMap<String, Lifecycle>();
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginPrefixResolverStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginPrefixResolverStub.java
index e5dc526..a4b54e9 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginPrefixResolverStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginPrefixResolverStub.java
@@ -19,7 +19,7 @@ import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException;
 import org.apache.maven.plugin.prefix.PluginPrefixRequest;
 import org.apache.maven.plugin.prefix.PluginPrefixResolver;
 import org.apache.maven.plugin.prefix.PluginPrefixResult;
-import org.sonatype.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.ArtifactRepository;
 
 /**
  * @author Kristian Rosenvold
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginVersionResolverStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginVersionResolverStub.java
index b2daee2..c79658e 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginVersionResolverStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/PluginVersionResolverStub.java
@@ -19,7 +19,7 @@ import org.apache.maven.plugin.version.PluginVersionRequest;
 import org.apache.maven.plugin.version.PluginVersionResolutionException;
 import org.apache.maven.plugin.version.PluginVersionResolver;
 import org.apache.maven.plugin.version.PluginVersionResult;
-import org.sonatype.aether.repository.ArtifactRepository;
+import org.eclipse.aether.repository.ArtifactRepository;
 
 /**
  * @author Kristian Rosenvold
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java
index 673e538..4147b36 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java
@@ -24,9 +24,9 @@ import org.apache.maven.project.DependencyResolutionException;
 import org.apache.maven.project.DependencyResolutionRequest;
 import org.apache.maven.project.DependencyResolutionResult;
 import org.apache.maven.project.MavenProject;
-import org.sonatype.aether.graph.Dependency;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.util.graph.DefaultDependencyNode;
+import org.eclipse.aether.graph.DefaultDependencyNode;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyNode;
 
 import java.util.Collection;
 import java.util.Collections;
diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java
index 1625799..e491629 100644
--- a/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java
+++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java
@@ -292,6 +292,8 @@ public class PluginManagerTest
                                       session.getRepositorySession() );
         pluginManager.getPluginRealm( session, pluginDescriptor );
 
+        assertEquals( 1, pluginDescriptor.getDependencies().size() );
+
         for ( ComponentDescriptor<?> descriptor : pluginDescriptor.getComponents() )
         {
             assertNotNull( descriptor.getRealm() );
@@ -308,6 +310,8 @@ public class PluginManagerTest
                                       session.getRepositorySession() );
         pluginManager.getPluginRealm( session, pluginDescriptor );
 
+        assertEquals( 1, pluginDescriptor.getDependencies().size() );
+
         for ( ComponentDescriptor<?> descriptor : pluginDescriptor.getComponents() )
         {
             assertNotNull( descriptor.getRealm() );
diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java
new file mode 100644
index 0000000..7f94bac
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java
@@ -0,0 +1,164 @@
+package org.apache.maven.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Collections;
+
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.Parameter;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+
+import junit.framework.TestCase;
+
+/**
+ * MNG-3131
+ * 
+ * @author Robert Scholte
+ *
+ */
+public class PluginParameterExceptionTest
+    extends TestCase
+{
+
+    public void testMissingRequiredStringArrayTypeParameter()
+    {
+        MojoDescriptor mojoDescriptor = new MojoDescriptor();
+        mojoDescriptor.setGoal( "goal" );
+        PluginDescriptor pluginDescriptor = new PluginDescriptor();
+        pluginDescriptor.setGoalPrefix( "goalPrefix" );
+        pluginDescriptor.setArtifactId( "artifactId" );
+        mojoDescriptor.setPluginDescriptor( pluginDescriptor );
+
+        Parameter parameter = new Parameter();
+        parameter.setType( "java.lang.String[]" );
+        parameter.setName( "toAddresses" );
+        
+        parameter.setRequired( true );
+
+        PluginParameterException exception =
+            new PluginParameterException( mojoDescriptor, Collections.singletonList( parameter ) );
+
+        assertEquals( "One or more required plugin parameters are invalid/missing for 'goalPrefix:goal'\n" + 
+        		"\n" + 
+        		"[0] Inside the definition for plugin 'artifactId', specify the following:\n" + 
+        		"\n" + 
+        		"<configuration>\n" + 
+        		"  ...\n" + 
+        		"  <toAddresses>\n" +
+        		"    <item>VALUE</item>\n" +
+        		"  </toAddresses>\n" + 
+        		"</configuration>.\n", exception.buildDiagnosticMessage() );
+    }
+    
+    public void testMissingRequiredCollectionTypeParameter()
+    {
+        MojoDescriptor mojoDescriptor = new MojoDescriptor();
+        mojoDescriptor.setGoal( "goal" );
+        PluginDescriptor pluginDescriptor = new PluginDescriptor();
+        pluginDescriptor.setGoalPrefix( "goalPrefix" );
+        pluginDescriptor.setArtifactId( "artifactId" );
+        mojoDescriptor.setPluginDescriptor( pluginDescriptor );
+
+        Parameter parameter = new Parameter();
+        parameter.setType( "java.util.List" );
+        parameter.setName( "toAddresses" );
+        
+        parameter.setRequired( true );
+
+        PluginParameterException exception =
+            new PluginParameterException( mojoDescriptor, Collections.singletonList( parameter ) );
+
+        assertEquals( "One or more required plugin parameters are invalid/missing for 'goalPrefix:goal'\n" + 
+                "\n" + 
+                "[0] Inside the definition for plugin 'artifactId', specify the following:\n" + 
+                "\n" + 
+                "<configuration>\n" + 
+                "  ...\n" + 
+                "  <toAddresses>\n" +
+                "    <item>VALUE</item>\n" +
+                "  </toAddresses>\n" + 
+                "</configuration>.\n", exception.buildDiagnosticMessage() );
+    }
+
+    public void testMissingRequiredMapTypeParameter()
+    {
+        MojoDescriptor mojoDescriptor = new MojoDescriptor();
+        mojoDescriptor.setGoal( "goal" );
+        PluginDescriptor pluginDescriptor = new PluginDescriptor();
+        pluginDescriptor.setGoalPrefix( "goalPrefix" );
+        pluginDescriptor.setArtifactId( "artifactId" );
+        mojoDescriptor.setPluginDescriptor( pluginDescriptor );
+
+        Parameter parameter = new Parameter();
+        parameter.setType( "java.util.Map" );
+        parameter.setName( "toAddresses" );
+        
+        parameter.setRequired( true );
+
+        PluginParameterException exception =
+            new PluginParameterException( mojoDescriptor, Collections.singletonList( parameter ) );
+
+        assertEquals( "One or more required plugin parameters are invalid/missing for 'goalPrefix:goal'\n" + 
+                "\n" + 
+                "[0] Inside the definition for plugin 'artifactId', specify the following:\n" + 
+                "\n" + 
+                "<configuration>\n" + 
+                "  ...\n" + 
+                "  <toAddresses>\n" +
+                "    <KEY>VALUE</KEY>\n" +
+                "  </toAddresses>\n" + 
+                "</configuration>.\n", exception.buildDiagnosticMessage() );
+    }
+
+    public void testMissingRequiredPropertiesTypeParameter()
+    {
+        MojoDescriptor mojoDescriptor = new MojoDescriptor();
+        mojoDescriptor.setGoal( "goal" );
+        PluginDescriptor pluginDescriptor = new PluginDescriptor();
+        pluginDescriptor.setGoalPrefix( "goalPrefix" );
+        pluginDescriptor.setArtifactId( "artifactId" );
+        mojoDescriptor.setPluginDescriptor( pluginDescriptor );
+
+        Parameter parameter = new Parameter();
+        parameter.setType( "java.util.Properties" );
+        parameter.setName( "toAddresses" );
+        
+        parameter.setRequired( true );
+
+        PluginParameterException exception =
+            new PluginParameterException( mojoDescriptor, Collections.singletonList( parameter ) );
+
+        assertEquals( "One or more required plugin parameters are invalid/missing for 'goalPrefix:goal'\n" + 
+                "\n" + 
+                "[0] Inside the definition for plugin 'artifactId', specify the following:\n" + 
+                "\n" + 
+                "<configuration>\n" + 
+                "  ...\n" + 
+                "  <toAddresses>\n" +
+                "    <property>\n" +
+                "      <name>KEY</name>\n" +
+                "      <value>VALUE</value>\n" +
+                "    </property>\n" +
+                "  </toAddresses>\n" + 
+                "</configuration>.\n", exception.buildDiagnosticMessage() );
+    }
+
+
+}
diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java
index 31714d8..5f6744c 100644
--- a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java
+++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java
@@ -29,7 +29,6 @@ import java.util.Properties;
 import org.apache.maven.AbstractCoreMavenComponentTestCase;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.DefaultMavenExecutionRequest;
 import org.apache.maven.execution.DefaultMavenExecutionResult;
@@ -48,7 +47,6 @@ import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
-
 /**
  * @author Jason van Zyl
  */
@@ -104,7 +102,9 @@ public class PluginParameterExpressionEvaluatorTest
 
         MavenSession session = newMavenSession();
 
-        List depResults = (List) new PluginParameterExpressionEvaluator( session, exec ).evaluate( "${plugin.artifacts}" );
+        @SuppressWarnings( "unchecked" )
+        List<Artifact> depResults =
+            (List<Artifact>) new PluginParameterExpressionEvaluator( session, exec ).evaluate( "${plugin.artifacts}" );
 
         System.out.println( "Result: " + depResults );
 
@@ -127,7 +127,9 @@ public class PluginParameterExpressionEvaluatorTest
 
         MavenSession session = newMavenSession();
 
-        Map depResults = (Map) new PluginParameterExpressionEvaluator( session, exec ).evaluate( "${plugin.artifactMap}" );
+        @SuppressWarnings( "unchecked" )
+        Map<String, Artifact> depResults =
+            (Map<String, Artifact>) new PluginParameterExpressionEvaluator( session, exec ).evaluate( "${plugin.artifactMap}" );
 
         System.out.println( "Result: " + depResults );
 
@@ -312,16 +314,17 @@ public class PluginParameterExpressionEvaluatorTest
         assertEquals( "value", value );
     }
 
+    @SuppressWarnings( "deprecation" )
     private static MavenSession createSession( PlexusContainer container, ArtifactRepository repo, Properties properties )
         throws CycleDetectedException, DuplicateProjectException
     {
         MavenExecutionRequest request = new DefaultMavenExecutionRequest()
             .setSystemProperties( properties )
-            .setGoals( Collections.EMPTY_LIST )
+            .setGoals( Collections.<String>emptyList() )
             .setBaseDirectory( new File( "" ) )
             .setLocalRepository( repo );
 
-        return new MavenSession( container, request, new DefaultMavenExecutionResult(), Collections.EMPTY_LIST  );
+        return new MavenSession( container, request, new DefaultMavenExecutionResult(), Collections.<MavenProject>emptyList()  );
     }
 
     public void testLocalRepositoryExtraction()
@@ -367,11 +370,12 @@ public class PluginParameterExpressionEvaluatorTest
 
         assertTrue( value instanceof List );
 
-        List artifacts = (List) value;
+        @SuppressWarnings( "unchecked" )
+        List<Artifact> artifacts = (List<Artifact>) value;
 
         assertEquals( 1, artifacts.size() );
 
-        Artifact result = (Artifact) artifacts.get( 0 );
+        Artifact result = artifacts.get( 0 );
 
         assertEquals( "testGroup", result.getGroupId() );
     }
diff --git a/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java b/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java
new file mode 100644
index 0000000..d350770
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java
@@ -0,0 +1,74 @@
+package org.apache.maven.plugin.internal;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenSession;
+
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author Kristian Rosenvold
+ */
+public class DefaultLegacySupportTest extends TestCase {
+    final CountDownLatch latch = new CountDownLatch(1);
+    final DefaultLegacySupport defaultLegacySupport = new DefaultLegacySupport();
+
+    public void testSetSession() throws Exception {
+
+        MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest();
+        MavenSession m1 = new MavenSession(null, null, mavenExecutionRequest, null);
+        defaultLegacySupport.setSession(m1);
+
+        MyRunnable myRunnable = new MyRunnable();
+        Thread thread = new Thread(myRunnable);
+        thread.start();
+
+        MavenSession m2 = new MavenSession(null, null, mavenExecutionRequest, null);
+        defaultLegacySupport.setSession(m2);
+        latch.countDown();
+        thread.join();
+        assertNull( myRunnable.getSession());
+    }
+
+
+    class MyRunnable implements Runnable {
+
+        private volatile MavenSession session;
+
+        public void run() {
+            try
+            {
+                latch.await();
+            }
+            catch (InterruptedException ingore)
+            {
+                // Test may fail if we get interrupted
+            }
+            session = defaultLegacySupport.getSession();
+        }
+
+        public MavenSession getSession() {
+            return session;
+        }
+    }
+
+}
diff --git a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
index aa54f3e..a8b4829 100644
--- a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
+++ b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
@@ -27,8 +27,10 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.model.building.ModelBuildingException;
 import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
+import org.eclipse.aether.DefaultRepositorySystemSession;
 
 /**
  * @author Jason van Zyl
@@ -39,7 +41,14 @@ public abstract class AbstractMavenProjectTestCase
     protected ProjectBuilder projectBuilder;
 
     protected RepositorySystem repositorySystem;
-    
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
     protected void setUp()
         throws Exception
     {
@@ -170,7 +179,7 @@ public abstract class AbstractMavenProjectTestCase
     protected void initRepoSession( ProjectBuildingRequest request )
     {
         File localRepo = new File( request.getLocalRepository().getBasedir() );
-        MavenRepositorySystemSession repoSession = new MavenRepositorySystemSession();
+        DefaultRepositorySystemSession repoSession = MavenRepositorySystemUtils.newSession();
         repoSession.setLocalRepositoryManager( new LegacyLocalRepositoryManager( localRepo ) );
         request.setRepositorySession( repoSession );
     }
diff --git a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
index 15dbed8..7f1cef7 100644
--- a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
@@ -59,10 +59,8 @@ public class DefaultMavenProjectBuilderTest
 
         if ( !filesToDelete.isEmpty() )
         {
-            for ( Iterator<File> it = filesToDelete.iterator(); it.hasNext(); )
+            for ( File file : filesToDelete )
             {
-                File file = it.next();
-
                 if ( file.exists() )
                 {
                     if ( file.isDirectory() )
diff --git a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
index daab6c4..52fdd80 100644
--- a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
+++ b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
@@ -21,22 +21,36 @@ package org.apache.maven.project;
 
 import java.io.File;
 
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
-import org.sonatype.aether.repository.LocalArtifactRequest;
-import org.sonatype.aether.repository.LocalArtifactResult;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.repository.LocalArtifactRegistration;
+import org.eclipse.aether.repository.LocalArtifactRequest;
+import org.eclipse.aether.repository.LocalArtifactResult;
+import org.eclipse.aether.repository.LocalMetadataRegistration;
+import org.eclipse.aether.repository.LocalMetadataRequest;
+import org.eclipse.aether.repository.LocalMetadataResult;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.eclipse.aether.repository.RemoteRepository;
 
 /**
  * @author Benjamin Bentmann
  */
 public class LegacyLocalRepositoryManager
-    extends SimpleLocalRepositoryManager
+    implements LocalRepositoryManager
 {
 
+    private final LocalRepository repository;
+
     public LegacyLocalRepositoryManager( File basedir )
     {
-        super( basedir );
+        this.repository = new LocalRepository( basedir.getAbsoluteFile(), "legacy" );
+    }
+
+    public LocalRepository getRepository()
+    {
+        return repository;
     }
 
     public String getPathForLocalArtifact( Artifact artifact )
@@ -59,17 +73,120 @@ public class LegacyLocalRepositoryManager
         return path.toString();
     }
 
+    public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context )
+    {
+        return getPathForLocalArtifact( artifact );
+    }
+
+    public String getPathForLocalMetadata( Metadata metadata )
+    {
+        return getPath( metadata, "local" );
+    }
+
+    public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context )
+    {
+        return getPath( metadata, getRepositoryKey( repository, context ) );
+    }
+
+    String getRepositoryKey( RemoteRepository repository, String context )
+    {
+        return repository.getId();
+    }
+
+    private String getPath( Metadata metadata, String repositoryKey )
+    {
+        StringBuilder path = new StringBuilder( 128 );
+
+        if ( metadata.getGroupId().length() > 0 )
+        {
+            path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' );
+
+            if ( metadata.getArtifactId().length() > 0 )
+            {
+                path.append( metadata.getArtifactId() ).append( '/' );
+
+                if ( metadata.getVersion().length() > 0 )
+                {
+                    path.append( metadata.getVersion() ).append( '/' );
+                }
+            }
+        }
+
+        path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) );
+
+        return path.toString();
+    }
+
+    private String insertRepositoryKey( String filename, String repositoryKey )
+    {
+        String result;
+        int idx = filename.indexOf( '.' );
+        if ( idx < 0 )
+        {
+            result = filename + '-' + repositoryKey;
+        }
+        else
+        {
+            result = filename.substring( 0, idx ) + '-' + repositoryKey + filename.substring( idx );
+        }
+        return result;
+    }
+
     public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request )
     {
- 	    String path = getPathForLocalArtifact( request.getArtifact() );
- 	    File file = new File( getRepository().getBasedir(), path );
+        String path = getPathForLocalArtifact( request.getArtifact() );
+        File file = new File( getRepository().getBasedir(), path );
+
         LocalArtifactResult result = new LocalArtifactResult( request );
- 	    if ( file.isFile() )
+        if ( file.isFile() )
+        {
+            result.setFile( file );
+            result.setAvailable( true );
+        }
+
+        return result;
+    }
+
+    public void add( RepositorySystemSession session, LocalArtifactRegistration request )
+    {
+        // noop
+    }
+
+    public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request )
+    {
+        LocalMetadataResult result = new LocalMetadataResult( request );
+
+        String path;
+
+        Metadata metadata = request.getMetadata();
+        String context = request.getContext();
+        RemoteRepository remote = request.getRepository();
+
+        if ( remote != null )
+        {
+            path = getPathForRemoteMetadata( metadata, remote, context );
+        }
+        else
         {
- 	        result.setFile( file );
- 	        result.setAvailable( true );
- 	    }
- 	    return result;
- 	}
+            path = getPathForLocalMetadata( metadata );
+        }
+
+        File file = new File( getRepository().getBasedir(), path );
+        if ( file.isFile() )
+        {
+            result.setFile( file );
+        }
 
+        return result;
+    }
+
+    public void add( RepositorySystemSession session, LocalMetadataRegistration request )
+    {
+        // noop
+    }
+
+    public String toString()
+    {
+        return String.valueOf( getRepository() );
+    }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java b/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java
index 83f664d..60736a3 100644
--- a/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java
@@ -96,7 +96,7 @@ public class MavenProjectTest
         File f = getFileForClasspathResource( "canonical-pom.xml" );
         MavenProject projectToClone = getProject( f );
 
-        MavenProject clonedProject = (MavenProject) projectToClone.clone();
+        MavenProject clonedProject = projectToClone.clone();
         assertEquals( "maven-core", clonedProject.getArtifactId() );
         Map<?, ?> clonedMap = clonedProject.getManagedVersionMap();
         assertNotNull( "ManagedVersionMap not copied", clonedMap );
@@ -118,7 +118,7 @@ public class MavenProjectTest
         assertNotNull( "No ManagedVersionMap", map );
         assertTrue( "ManagedVersionMap is empty", !map.isEmpty() );
 
-        MavenProject clonedProject = (MavenProject) projectToClone.clone();
+        MavenProject clonedProject = projectToClone.clone();
         assertEquals( "maven-core", clonedProject.getArtifactId() );
         Map<?, ?> clonedMap = clonedProject.getManagedVersionMap();
         assertNotNull( "ManagedVersionMap not copied", clonedMap );
@@ -146,17 +146,19 @@ public class MavenProjectTest
         assertEquals( "..", pathAdjustment );
     }
     
-    public void testCloneWithDistributionManagement() throws Exception
+    public void testCloneWithDistributionManagement()
+        throws Exception
     {
         
         File f = getFileForClasspathResource( "distributionManagement-pom.xml" );
         MavenProject projectToClone = getProject( f );
 
-        MavenProject clonedProject = (MavenProject) projectToClone.clone();
+        MavenProject clonedProject = projectToClone.clone();
         assertNotNull( "clonedProject - distributionManagement", clonedProject.getDistributionManagementArtifactRepository() );
     }
 
-    public void testCloneWithActiveProfile() throws Exception
+    public void testCloneWithActiveProfile()
+        throws Exception
     {
 
         File f = getFileForClasspathResource( "withActiveByDefaultProfile-pom.xml" );
@@ -165,7 +167,7 @@ public class MavenProjectTest
 
         assertEquals( "Expecting 1 active profile", 1, activeProfilesOrig.size() );
 
-        MavenProject clonedProject = (MavenProject) projectToClone.clone();
+        MavenProject clonedProject = projectToClone.clone();
 
         List<Profile> activeProfilesClone = clonedProject.getActiveProfiles();
 
@@ -174,4 +176,20 @@ public class MavenProjectTest
         assertNotSame( "The list of active profiles should have been cloned too but is same", activeProfilesOrig,
                        activeProfilesClone );
     }
+
+    public void testUndefinedOutputDirectory()
+        throws Exception
+    {
+        MavenProject p = new MavenProject();
+        assertNoNulls( p.getCompileClasspathElements() );
+        assertNoNulls( p.getSystemClasspathElements() );
+        assertNoNulls( p.getRuntimeClasspathElements() );
+        assertNoNulls( p.getTestClasspathElements() );
+    }
+
+    private void assertNoNulls( List<String> elements )
+    {
+        assertFalse( elements.contains( null ) );
+    }
+
 }
diff --git a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
index 574efbc..06ee6c9 100644
--- a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
@@ -32,9 +32,12 @@ import org.apache.maven.model.PluginExecution;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.project.harness.PomTestWrapper;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
+import org.eclipse.aether.repository.LocalRepository;
 
 public class PomConstructionTest
     extends PlexusTestCase
@@ -51,6 +54,13 @@ public class PomConstructionTest
     
     private File testDirectory;
 
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
     protected void setUp()
         throws Exception
     {
@@ -396,7 +406,7 @@ public class PomConstructionTest
     public void testConsecutiveEmptyElements()
         throws Exception
     {
-        PomTestWrapper pom = buildPom( "consecutive_empty_elements" );
+        buildPom( "consecutive_empty_elements" );
     }
 
     public void testOrderOfGoalsFromPluginExecutionWithoutPluginManagement()
@@ -1083,9 +1093,10 @@ public class PomConstructionTest
     {
         PomTestWrapper pom = buildPom( "reporting-plugin-config/sub" );
 
-        assertEquals( 2, ( (List<?>) pom.getValue( "reporting/plugins[1]/configuration/stringParams" ) ).size() );
+        assertEquals( 3, ( (List<?>) pom.getValue( "reporting/plugins[1]/configuration/stringParams" ) ).size() );
         assertEquals( "parentParam", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[1]" ) );
         assertEquals( "childParam", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[2]" ) );
+        assertEquals( "  preserve space  ", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[3]" ) );
         assertEquals( "true", pom.getValue( "reporting/plugins[1]/configuration/booleanParam" ) );
     }    
     
@@ -1490,14 +1501,14 @@ public class PomConstructionTest
     public void testDependencyScope()
 	    throws Exception
 	{
-	    PomTestWrapper pom = buildPom( "dependency-scope/sub" );
+	    buildPom( "dependency-scope/sub" );
 	}   
  
     //This will fail on a validation error if incorrect
     public void testDependencyManagementWithInterpolation()
 	    throws Exception
 	{
-	    PomTestWrapper pom = buildPom( "dependency-management-with-interpolation/sub" );
+	    buildPom( "dependency-management-with-interpolation/sub" );
 	}   
 
     public void testInterpolationWithSystemProperty()
@@ -1514,6 +1525,7 @@ public class PomConstructionTest
         throws Exception
     {
         PomTestWrapper pom = buildPom( "plugin-exec-inheritance/wo-merge" );
+        @SuppressWarnings( "unchecked" )
         List<PluginExecution> executions =
             (List<PluginExecution>) pom.getValue( "build/pluginsAsMap[@name='org.apache.maven.its.plugins:maven-it-plugin-log-file']/executions" );
         assertEquals( 1, executions.size() );
@@ -1524,6 +1536,7 @@ public class PomConstructionTest
         throws Exception
     {
         PomTestWrapper pom = buildPom( "plugin-exec-inheritance/w-merge" );
+        @SuppressWarnings( "unchecked" )
         List<PluginExecution> executions =
             (List<PluginExecution>) pom.getValue( "build/pluginsAsMap[@name='org.apache.maven.its.plugins:maven-it-plugin-log-file']/executions" );
         assertEquals( 1, executions.size() );
@@ -1684,6 +1697,7 @@ public class PomConstructionTest
         throws Exception
     {
         PomTestWrapper pom = buildPom( "plugin-exec-order-and-default-exec" );
+        @SuppressWarnings( "unchecked" )
         List<PluginExecution> executions =
             (List<PluginExecution>) pom.getValue( "build/plugins[@artifactId='maven-resources-plugin']/executions" );
         assertNotNull( executions );
@@ -1698,6 +1712,7 @@ public class PomConstructionTest
         throws Exception
     {
         PomTestWrapper pom = buildPom( "plugin-exec-order-with-lifecycle" );
+        @SuppressWarnings( "unchecked" )
         List<Plugin> plugins = (List<Plugin>) pom.getValue( "build/plugins" );
         int resourcesPlugin = -1;
         int customPlugin = -1;
@@ -1735,7 +1750,9 @@ public class PomConstructionTest
         expected.add( "maven-it-plugin-touch" );
 
         List<String> actual = new ArrayList<String>();
-        for ( Plugin plugin : (List<Plugin>) pom.getValue( "build/plugins" ) )
+        @SuppressWarnings( "unchecked" )
+        List<Plugin> plugins = (List<Plugin>) pom.getValue( "build/plugins" );
+        for ( Plugin plugin : plugins )
         {
             actual.add( plugin.getArtifactId() );
         }
@@ -1762,7 +1779,9 @@ public class PomConstructionTest
         expected.add( "maven-it-plugin-touch" );
 
         List<String> actual = new ArrayList<String>();
-        for ( Plugin plugin : (List<Plugin>) pom.getValue( "build/plugins" ) )
+        @SuppressWarnings( "unchecked" )
+        List<Plugin> plugins = (List<Plugin>) pom.getValue( "build/plugins" );
+        for ( Plugin plugin : plugins )
         {
             actual.add( plugin.getArtifactId() );
         }
@@ -1799,20 +1818,20 @@ public class PomConstructionTest
     }
     
     private PomTestWrapper buildPom( String pomPath, String... profileIds )
-        throws ProjectBuildingException
+        throws Exception
     {
         return buildPom( pomPath, null, profileIds );
     }
 
     private PomTestWrapper buildPom( String pomPath, Properties executionProperties, String... profileIds )
-        throws ProjectBuildingException
+        throws Exception
     {
         return buildPom( pomPath, false, executionProperties, profileIds );
     }
 
     private PomTestWrapper buildPom( String pomPath, boolean lenientValidation, Properties executionProperties,
                                      String... profileIds )
-        throws ProjectBuildingException
+        throws Exception
     {
         File pomFile = new File( testDirectory, pomPath );
         if ( pomFile.isDirectory() )
@@ -1831,10 +1850,10 @@ public class PomConstructionTest
         config.setUserProperties( executionProperties );
         config.setValidationLevel( lenientValidation ? ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0
                         : ModelBuildingRequest.VALIDATION_LEVEL_STRICT );
-        MavenRepositorySystemSession repoSession = new MavenRepositorySystemSession();
-        repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager(
-                                                                                 new File(
-                                                                                           config.getLocalRepository().getBasedir() ) ) );
+
+        DefaultRepositorySystemSession repoSession = MavenRepositorySystemUtils.newSession();
+        LocalRepository localRepo = new LocalRepository( config.getLocalRepository().getBasedir() );
+        repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( repoSession, localRepo ) );
         config.setRepositorySession( repoSession );
 
         return new PomTestWrapper( pomFile, projectBuilder.build( pomFile, config ).getProject() );
diff --git a/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java
index 9a47053..fc12b3e 100644
--- a/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java
@@ -20,11 +20,12 @@ package org.apache.maven.project;
  */
 
 import java.io.File;
-import java.util.List;
 import java.util.Properties;
 
 import org.apache.maven.AbstractCoreMavenComponentTestCase;
 import org.apache.maven.execution.MavenSession;
+import org.apache.maven.model.building.FileModelSource;
+import org.apache.maven.model.building.ModelSource;
 
 public class ProjectBuilderTest
     extends AbstractCoreMavenComponentTestCase
@@ -48,6 +49,20 @@ public class ProjectBuilderTest
         // Here we will actually not have any artifacts because the ProjectDependenciesResolver is not involved here. So
         // right now it's not valid to ask for artifacts unless plugins require the artifacts.
         
-        List<String> elements = project.getCompileClasspathElements();
+        project.getCompileClasspathElements();
+    }
+
+    public void testBuildFromModelSource()
+        throws Exception
+    {
+        File pomFile = new File( "src/test/resources/projects/modelsource/module01/pom.xml" );
+        MavenSession mavenSession = createMavenSession( pomFile );
+        ProjectBuildingRequest configuration = new DefaultProjectBuildingRequest();
+        configuration.setRepositorySession( mavenSession.getRepositorySession() );
+        ModelSource modelSource = new FileModelSource( pomFile );
+        ProjectBuildingResult result =
+            lookup( org.apache.maven.project.ProjectBuilder.class ).build( modelSource, configuration );
+
+        assertNotNull( result.getProject().getParentFile() );
     }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java b/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java
index bacedd6..9a7a72c 100644
--- a/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java
+++ b/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java
@@ -26,11 +26,11 @@ import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.metadata.ResolutionGroup;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.project.artifact.MavenMetadataSource;
 import org.codehaus.plexus.component.annotations.Component;
 
- at Component(role=ArtifactMetadataSource.class,hint="classpath")
+ at SuppressWarnings( "deprecation" )
+ at Component( role = ArtifactMetadataSource.class, hint = "classpath" )
 public class TestMetadataSource
     extends MavenMetadataSource
 {
diff --git a/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java b/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java
index 8433e43..ba37803 100644
--- a/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java
@@ -57,11 +57,13 @@ public class DefaultMavenMetadataCacheTest
         throws Exception
     {
         Artifact a1 = repositorySystem.createArtifact( "testGroup", "testArtifact", "1.2.3", "jar" );
+        @SuppressWarnings( "deprecation" )
         ArtifactRepository lr1 = new DelegatingLocalArtifactRepository( repositorySystem.createDefaultLocalRepository() );
         ArtifactRepository rr1 = repositorySystem.createDefaultRemoteRepository();
         a1.setDependencyFilter( new ExcludesArtifactFilter( Arrays.asList( "foo" ) ) );
 
         Artifact a2 = repositorySystem.createArtifact( "testGroup", "testArtifact", "1.2.3", "jar" );
+        @SuppressWarnings( "deprecation" )
         ArtifactRepository lr2 = new DelegatingLocalArtifactRepository( repositorySystem.createDefaultLocalRepository() );
         ArtifactRepository rr2 = repositorySystem.createDefaultRemoteRepository();
         a2.setDependencyFilter( new ExcludesArtifactFilter( Arrays.asList( "foo" ) ) );
diff --git a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
index c75055c..8b6454d 100644
--- a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
@@ -20,7 +20,6 @@ package org.apache.maven.project.canonical;
  */
 
 import java.io.File;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.model.Plugin;
@@ -52,17 +51,15 @@ public class CanonicalProjectBuilderTest
         // Plugins
         // ----------------------------------------------------------------------
 
-        List plugins = project.getBuildPlugins();
+        List<Plugin> plugins = project.getBuildPlugins();
 
         // Plugin0 [plexus]
 
         String key = "org.apache.maven.plugins:maven-plexus-plugin";
 
         Plugin plugin = null;
-        for ( Iterator it = plugins.iterator(); it.hasNext(); )
+        for ( Plugin check : plugins )
         {
-            Plugin check = (Plugin) it.next();
-
             if ( key.equals( check.getKey() ) )
             {
                 plugin = check;
@@ -87,11 +84,11 @@ public class CanonicalProjectBuilderTest
         // Goal specific configuration
         // ----------------------------------------------------------------------
 
-        List executions = plugin.getExecutions();
+        List<PluginExecution> executions = plugin.getExecutions();
 
-        PluginExecution execution = (PluginExecution) executions.get( 0 );
+        PluginExecution execution = executions.get( 0 );
 
-        String g0 = (String) execution.getGoals().get( 0 );
+        String g0 = execution.getGoals().get( 0 );
 
         assertEquals( "plexus:runtime", g0 );
 
diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
index a628edc..59ce300 100644
--- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
+++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
@@ -78,14 +78,14 @@ class Xpp3DomNodePointer
     @Override
     public Object getValue()
     {
-        return getValue(node);
+        return getValue( node );
     }
 
     private static Object getValue( Xpp3Dom node )
     {
         if ( node.getValue() != null )
         {
-            return node.getValue().trim();
+            return node.getValue();
         }
         else
         {
diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
index d2a25b1..91ace4f 100644
--- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
+++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
@@ -26,15 +26,15 @@ import java.net.URL;
 import java.util.Collection;
 
 import org.codehaus.plexus.util.FileUtils;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.spi.connector.ArtifactDownload;
-import org.sonatype.aether.spi.connector.ArtifactUpload;
-import org.sonatype.aether.spi.connector.MetadataDownload;
-import org.sonatype.aether.spi.connector.MetadataUpload;
-import org.sonatype.aether.spi.connector.RepositoryConnector;
-import org.sonatype.aether.transfer.ArtifactNotFoundException;
-import org.sonatype.aether.transfer.ArtifactTransferException;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.spi.connector.ArtifactDownload;
+import org.eclipse.aether.spi.connector.ArtifactUpload;
+import org.eclipse.aether.spi.connector.MetadataDownload;
+import org.eclipse.aether.spi.connector.MetadataUpload;
+import org.eclipse.aether.spi.connector.RepositoryConnector;
+import org.eclipse.aether.transfer.ArtifactNotFoundException;
+import org.eclipse.aether.transfer.ArtifactTransferException;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java
index 008a83c..17fd43f 100644
--- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java
+++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java
@@ -20,11 +20,11 @@ package org.apache.maven.repository;
  */
 
 import org.codehaus.plexus.component.annotations.Component;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.repository.RemoteRepository;
-import org.sonatype.aether.spi.connector.RepositoryConnector;
-import org.sonatype.aether.spi.connector.RepositoryConnectorFactory;
-import org.sonatype.aether.transfer.NoRepositoryConnectorException;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.spi.connector.RepositoryConnector;
+import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
+import org.eclipse.aether.transfer.NoRepositoryConnectorException;
 
 /**
  * @author Benjamin Bentmann
@@ -40,7 +40,7 @@ public class TestRepositoryConnectorFactory
         return new TestRepositoryConnector( repository );
     }
 
-    public int getPriority()
+    public float getPriority()
     {
         return 0;
     }
diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java
index c90f08a..2a9b176 100644
--- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java
+++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java
@@ -48,7 +48,7 @@ import org.apache.maven.settings.Server;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.FileUtils;
-import org.sonatype.aether.RepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java b/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java
index d17dd23..41b21ce 100644
--- a/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java
+++ b/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java
@@ -31,13 +31,16 @@ import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.project.harness.PomTestWrapper;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
 import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
+import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
+import org.eclipse.aether.repository.LocalRepository;
 
 public class PomConstructionWithSettingsTest
     extends PlexusTestCase
@@ -52,6 +55,13 @@ public class PomConstructionWithSettingsTest
 
     private File testDirectory;
 
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration )
+    {
+        super.customizeContainerConfiguration( containerConfiguration );
+        containerConfiguration.setAutoWiring( true );
+    }
+
     protected void setUp()
         throws Exception
     {
@@ -113,10 +123,10 @@ public class PomConstructionWithSettingsTest
         config.setLocalRepository( repositorySystem.createArtifactRepository( "local", localRepoUrl,
                                                                               new DefaultRepositoryLayout(), null, null ) );
         config.setActiveProfileIds( settings.getActiveProfiles() );
-        MavenRepositorySystemSession repoSession = new MavenRepositorySystemSession();
-        repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager(
-                                                                                 new File(
-                                                                                           config.getLocalRepository().getBasedir() ) ) );
+
+        DefaultRepositorySystemSession repoSession = MavenRepositorySystemUtils.newSession();
+        LocalRepository localRepo = new LocalRepository( config.getLocalRepository().getBasedir() );
+        repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( repoSession, localRepo ) );
         config.setRepositorySession( repoSession );
 
         return new PomTestWrapper( pomFile, projectBuilder.build( pomFile, config ).getProject() );
diff --git a/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java b/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java
index 6caf182..f2231b3 100644
--- a/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java
+++ b/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java
@@ -19,10 +19,13 @@ package org.apache.maven.settings;
  * under the License.
  */
 
-import java.util.List;
-
 import junit.framework.TestCase;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Random;
+
 public class SettingsUtilsTest
     extends TestCase
 {
@@ -38,7 +41,7 @@ public class SettingsUtilsTest
 
         SettingsUtils.merge( dominant, recessive, Settings.GLOBAL_LEVEL );
 
-        List pluginGroups = dominant.getPluginGroups();
+        List<String> pluginGroups = dominant.getPluginGroups();
 
         assertNotNull( pluginGroups );
         assertEquals( 3, pluginGroups.size() );
@@ -47,4 +50,77 @@ public class SettingsUtilsTest
         assertEquals( "org.codehaus.plexus", pluginGroups.get( 2 ) );
     }
 
+    public void testRoundTripProfiles()
+    {
+        Random entropy = new Random();
+        Profile p = new Profile();
+        p.setId( "id" + Long.toHexString( entropy.nextLong() ) );
+        Activation a = new Activation();
+        a.setActiveByDefault( entropy.nextBoolean() );
+        a.setJdk( "jdk" + Long.toHexString( entropy.nextLong() ) );
+        ActivationFile af = new ActivationFile();
+        af.setExists( "exists" + Long.toHexString( entropy.nextLong() ) );
+        af.setMissing( "missing" + Long.toHexString( entropy.nextLong() ) );
+        a.setFile( af );
+        ActivationProperty ap = new ActivationProperty();
+        ap.setName( "name" + Long.toHexString( entropy.nextLong() ) );
+        ap.setValue( "value" + Long.toHexString( entropy.nextLong() ) );
+        a.setProperty( ap );
+        ActivationOS ao = new ActivationOS();
+        ao.setArch( "arch" + Long.toHexString( entropy.nextLong() ) );
+        ao.setFamily( "family" + Long.toHexString( entropy.nextLong() ) );
+        ao.setName( "name" + Long.toHexString( entropy.nextLong() ) );
+        ao.setVersion( "version" + Long.toHexString( entropy.nextLong() ) );
+        a.setOs( ao );
+        p.setActivation( a );
+        Properties props = new Properties();
+        int count = entropy.nextInt( 10 );
+        for ( int i = 0; i < count; i++ )
+        {
+            props.setProperty( "name" + Long.toHexString( entropy.nextLong() ),
+                               "value" + Long.toHexString( entropy.nextLong() ) );
+        }
+        p.setProperties( props );
+        count = entropy.nextInt( 3 );
+        List<Repository> repos = new ArrayList<Repository>();
+        for ( int i = 0; i < count; i++ )
+        {
+            Repository r = new Repository();
+            r.setId( "id" + Long.toHexString( entropy.nextLong() ) );
+            r.setName( "name" + Long.toHexString( entropy.nextLong() ) );
+            r.setUrl( "url" + Long.toHexString( entropy.nextLong() ) );
+            repos.add( r );
+        }
+        p.setRepositories( repos );
+        count = entropy.nextInt( 3 );
+        repos = new ArrayList<Repository>();
+        for ( int i = 0; i < count; i++ )
+        {
+            Repository r = new Repository();
+            r.setId( "id" + Long.toHexString( entropy.nextLong() ) );
+            r.setName( "name" + Long.toHexString( entropy.nextLong() ) );
+            r.setUrl( "url" + Long.toHexString( entropy.nextLong() ) );
+            repos.add( r );
+        }
+        p.setPluginRepositories( repos );
+
+        Profile clone = SettingsUtils.convertToSettingsProfile( SettingsUtils.convertFromSettingsProfile( p ) );
+
+        assertEquals( p.getId(), clone.getId() );
+        assertEquals( p.getActivation().getJdk(), clone.getActivation().getJdk() );
+        assertEquals( p.getActivation().getFile().getExists(), clone.getActivation().getFile().getExists() );
+        assertEquals( p.getActivation().getFile().getMissing(), clone.getActivation().getFile().getMissing() );
+        assertEquals( p.getActivation().getProperty().getName(), clone.getActivation().getProperty().getName() );
+        assertEquals( p.getActivation().getProperty().getValue(), clone.getActivation().getProperty().getValue() );
+        assertEquals( p.getActivation().getOs().getArch(), clone.getActivation().getOs().getArch() );
+        assertEquals( p.getActivation().getOs().getFamily(), clone.getActivation().getOs().getFamily() );
+        assertEquals( p.getActivation().getOs().getName(), clone.getActivation().getOs().getName() );
+        assertEquals( p.getActivation().getOs().getVersion(), clone.getActivation().getOs().getVersion() );
+        assertEquals( p.getProperties(), clone.getProperties() );
+        assertEquals( p.getRepositories().size(), clone.getRepositories().size() );
+        // TODO deep compare the lists
+        assertEquals( p.getPluginRepositories().size(), clone.getPluginRepositories().size() );
+        // TODO deep compare the lists
+    }
+
 }
diff --git a/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml b/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
index e6018dd..b076827 100644
--- a/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
+++ b/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
@@ -36,8 +36,9 @@
         <artifactId>maven-it-plugin-configuration</artifactId>
         <version>2.1-SNAPSHOT</version>
         <configuration>
-            <stringParams combine.children="append">
-            <stringParam>childParam</stringParam>
+          <stringParams combine.children="append">
+            <stringParam>  childParam  </stringParam>
+            <stringParam xml:space="preserve">  preserve space  </stringParam>
           </stringParams>
         </configuration>
       </plugin>
diff --git a/maven-core/src/test/resources/projects/modelsource/module01/pom.xml b/maven-core/src/test/resources/projects/modelsource/module01/pom.xml
new file mode 100644
index 0000000..cfaf9e8
--- /dev/null
+++ b/maven-core/src/test/resources/projects/modelsource/module01/pom.xml
@@ -0,0 +1,12 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>test.readparent</groupId>
+    <artifactId>local-parent</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>module01</artifactId>
+</project>
diff --git a/maven-core/src/test/resources/projects/modelsource/pom.xml b/maven-core/src/test/resources/projects/modelsource/pom.xml
new file mode 100644
index 0000000..0fe2937
--- /dev/null
+++ b/maven-core/src/test/resources/projects/modelsource/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>test.readparent</groupId>
+  <artifactId>local-parent</artifactId>
+  <packaging>pom</packaging>
+  <version>1.0</version>
+
+  <modules>
+    <module>module</module>
+  </modules>
+
+</project>
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 42b1229..01f6179 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -16,13 +16,19 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-embedder</artifactId>
 
   <name>Maven Embedder</name>
-  <description>Maven embeddable component, with CLI support.</description>
+  <description>Maven embeddable component, with CLI and logging support.</description>
+
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
 
   <dependencies>
     <dependency>
@@ -55,8 +61,8 @@
       <artifactId>plexus-classworlds</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-inject-plexus</artifactId>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -70,6 +76,20 @@
       <groupId>org.sonatype.plexus</groupId>
       <artifactId>plexus-cipher</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <optional>true</optional>
+    </dependency>      
+    <dependency>
+      <groupId>ch.qos.logback</groupId>
+      <artifactId>logback-classic</artifactId>
+      <optional>true</optional>
+    </dependency>      
     <!-- CLI -->
     <dependency>
       <groupId>commons-cli</groupId>
@@ -84,6 +104,22 @@
         <filtering>true</filtering>
       </resource>
     </resources>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <excludes combine.children="append">
+              <exclude>src/main/resources/META-INF/MANIFEST.MF</exclude>
+              <exclude>src/test/*-projects/**</exclude>
+              <exclude>src/test/*-project/**</exclude>
+              <exclude>src/test/plugin-version-references/**</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
       <plugin>
         <groupId>org.codehaus.plexus</groupId>
diff --git a/maven-embedder/src/examples/simple-project/src/main/java/org/apache/maven/embedder/App.java b/maven-embedder/src/examples/simple-project/src/main/java/org/apache/maven/embedder/App.java
index 37a62af..a3cf2a3 100644
--- a/maven-embedder/src/examples/simple-project/src/main/java/org/apache/maven/embedder/App.java
+++ b/maven-embedder/src/examples/simple-project/src/main/java/org/apache/maven/embedder/App.java
@@ -1,5 +1,20 @@
 package org.apache.maven.embedder;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 /**
  * Hello world!
  *
diff --git a/maven-embedder/src/examples/simple-project/src/test/java/org/apache/maven/embedder/AppTest.java b/maven-embedder/src/examples/simple-project/src/test/java/org/apache/maven/embedder/AppTest.java
index 0588d30..cf7f8fc 100644
--- a/maven-embedder/src/examples/simple-project/src/test/java/org/apache/maven/embedder/AppTest.java
+++ b/maven-embedder/src/examples/simple-project/src/test/java/org/apache/maven/embedder/AppTest.java
@@ -1,5 +1,20 @@
 package org.apache.maven.embedder;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
index 2ec0f62..dfa317b 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
@@ -97,14 +97,16 @@ public class CLIManager
 
     public static final String THREADS = "T";
 
-    private Options options;
+    public static final String LEGACY_LOCAL_REPOSITORY = "llr";
+
+    protected Options options;
 
     @SuppressWarnings( "static-access" )
     public CLIManager()
     {
         options = new Options();
         options.addOption( OptionBuilder.withLongOpt( "help" ).withDescription( "Display help information" ).create( HELP ) );
-        options.addOption( OptionBuilder.withLongOpt( "file" ).hasArg().withDescription( "Force the use of an alternate POM file." ).create( ALTERNATE_POM_FILE ) );
+        options.addOption( OptionBuilder.withLongOpt( "file" ).hasArg().withDescription( "Force the use of an alternate POM file (or directory with pom.xml)." ).create( ALTERNATE_POM_FILE ) );
         options.addOption( OptionBuilder.withLongOpt( "define" ).hasArg().withDescription( "Define a system property" ).create( SET_SYSTEM_PROPERTY ) );
         options.addOption( OptionBuilder.withLongOpt( "offline" ).withDescription( "Work offline" ).create( OFFLINE ) );
         options.addOption( OptionBuilder.withLongOpt( "version" ).withDescription( "Display version information" ).create( VERSION ) );
@@ -133,9 +135,9 @@ public class CLIManager
         options.addOption( OptionBuilder.withLongOpt( "encrypt-master-password" ).hasArg().withDescription( "Encrypt master security password" ).create( ENCRYPT_MASTER_PASSWORD ) );
         options.addOption( OptionBuilder.withLongOpt( "encrypt-password" ).hasArg().withDescription( "Encrypt server password" ).create( ENCRYPT_PASSWORD ) );
         options.addOption( OptionBuilder.withLongOpt( "threads" ).hasArg().withDescription( "Thread count, for instance 2.0C where C is core multiplied" ).create( THREADS ) );
+        options.addOption( OptionBuilder.withLongOpt( "legacy-local-repository" ).withDescription( "Use Maven 2 Legacy Local Repository behaviour, ie no use of _remote.repositories. Can also be activated by using -Dmaven.legacyLocalRepo=true" ).create( LEGACY_LOCAL_REPOSITORY ) );
 
         // Adding this back in for compatibility with the verifier that hard codes this option.
-
         options.addOption( OptionBuilder.withLongOpt( "no-plugin-registry" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "npr" ) );
         options.addOption( OptionBuilder.withLongOpt( "check-plugin-updates" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "cpu" ) );
         options.addOption( OptionBuilder.withLongOpt( "update-plugins" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "up" ) );
@@ -159,10 +161,8 @@ public class CLIManager
 
         StringBuilder currentArg = null;
 
-        for ( int i = 0; i < args.length; i++ )
+        for ( String arg : args )
         {
-            String arg = args[i];
-
             boolean addedToBuffer = false;
 
             if ( arg.startsWith( "\"" ) )
@@ -262,5 +262,4 @@ public class CLIManager
 
         pw.flush();
     }
-
 }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index bca4883..0ed30dc 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -21,17 +21,14 @@ package org.apache.maven.cli;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintStream;
-import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
 import java.util.Properties;
-import java.util.TimeZone;
 
-import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.Os;
+import org.slf4j.Logger;
 
 /**
  * Utility class used to report errors, statistics, application version info, etc.
@@ -50,24 +47,22 @@ public final class CLIReportingUtils
     
     public static final String BUILD_VERSION_PROPERTY = "version";
 
-    public static void showVersion( PrintStream stdout )
+    public static String showVersion()
     {
+        final String LS = System.getProperty( "line.separator" );
         Properties properties = getBuildProperties();
-        stdout.println( createMavenVersionString( properties ) );
-        String shortName = reduce( properties.getProperty( "distributionShortName" ) );
-
-        stdout.println( shortName + " home: " + System.getProperty( "maven.home", "<unknown maven home>" ) );
-
-        stdout.println( "Java version: " + System.getProperty( "java.version", "<unknown java version>" )
-            + ", vendor: " + System.getProperty( "java.vendor", "<unknown vendor>" ) );
-
-        stdout.println( "Java home: " + System.getProperty( "java.home", "<unknown java home>" ) );
-
-        stdout.println( "Default locale: " + Locale.getDefault() + ", platform encoding: "
-            + System.getProperty( "file.encoding", "<unknown encoding>" ) );
-
-        stdout.println( "OS name: \"" + Os.OS_NAME + "\", version: \"" + Os.OS_VERSION + "\", arch: \"" + Os.OS_ARCH
+        StringBuffer version = new StringBuffer();
+        version.append( createMavenVersionString( properties ) ).append( LS );
+        version.append( reduce( properties.getProperty( "distributionShortName" ) + " home: "
+                            + System.getProperty( "maven.home", "<unknown maven home>" ) ) ).append( LS );
+        version.append( "Java version: " + System.getProperty( "java.version", "<unknown java version>" )
+                            + ", vendor: " + System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( LS );
+        version.append( "Java home: " + System.getProperty( "java.home", "<unknown java home>" ) ).append( LS );
+        version.append( "Default locale: " + Locale.getDefault() + ", platform encoding: "
+                            + System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( LS );
+        version.append( "OS name: \"" + Os.OS_NAME + "\", version: \"" + Os.OS_VERSION + "\", arch: \"" + Os.OS_ARCH
             + "\", family: \"" + Os.OS_FAMILY + "\"" );
+        return version.toString();
     }
 
     /**
@@ -88,11 +83,11 @@ public final class CLIReportingUtils
         if ( rev != null || timestamp != null )
         {
             msg += " (";
-            msg += ( rev != null ? "r" + rev : "" );
+            msg += ( rev != null ? rev : "" );
             if ( timestamp != null )
             {
                 SimpleDateFormat fmt = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ssZ" );
-                String ts = fmt.format( new Date( Long.valueOf( timestamp ).longValue() ) );
+                String ts = fmt.format( new Date( Long.valueOf( timestamp ) ) );
                 msg += ( rev != null ? "; " : "" ) + ts;
             }
             msg += ")";
@@ -105,75 +100,6 @@ public final class CLIReportingUtils
         return ( s != null ? ( s.startsWith( "${" ) && s.endsWith( "}" ) ? null : s ) : null );
     }
 
-
-    private static void stats( Date start, Logger logger )
-    {
-        Date finish = new Date();
-
-        long time = finish.getTime() - start.getTime();
-
-        logger.info( "Total time: " + formatTime( time ) );
-
-        logger.info( "Finished at: " + finish );
-
-        //noinspection CallToSystemGC
-        System.gc();
-
-        Runtime r = Runtime.getRuntime();
-
-        logger.info( "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" + r.totalMemory() / MB + "M" );
-    }
-
-    private static String formatTime( long ms )
-    {
-        long secs = ms / MS_PER_SEC;
-
-        long min = secs / SEC_PER_MIN;
-
-        secs = secs % SEC_PER_MIN;
-
-        String msg = "";
-
-        if ( min > 1 )
-        {
-            msg = min + " minutes ";
-        }
-        else if ( min == 1 )
-        {
-            msg = "1 minute ";
-        }
-
-        if ( secs > 1 )
-        {
-            msg += secs + " seconds";
-        }
-        else if ( secs == 1 )
-        {
-            msg += "1 second";
-        }
-        else if ( min == 0 )
-        {
-            msg += "< 1 second";
-        }
-        return msg;
-    }
-
-    private static String getFormattedTime( long time )
-    {
-        String pattern = "s.SSS's'";
-        if ( time / 60000L > 0 )
-        {
-            pattern = "m:s" + pattern;
-            if ( time / 3600000L > 0 )
-            {
-                pattern = "H:m" + pattern;
-            }
-        }
-        DateFormat fmt = new SimpleDateFormat( pattern );
-        fmt.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
-        return fmt.format( new Date( time ) );
-    }
-
     static Properties getBuildProperties()
     {
         Properties properties = new Properties();
@@ -201,11 +127,6 @@ public final class CLIReportingUtils
 
     public static void showError( Logger logger, String message, Throwable e, boolean showStackTrace )
     {
-        if ( logger == null )
-        {
-            logger = new PrintStreamLogger( System.out );
-        }
-
         if ( showStackTrace )
         {
             logger.error( message, e );
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 5acd54a..1c142c4 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -21,6 +21,7 @@ package org.apache.maven.cli;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -36,6 +37,15 @@ import org.apache.commons.cli.UnrecognizedOptionException;
 import org.apache.maven.BuildAbort;
 import org.apache.maven.InternalErrorException;
 import org.apache.maven.Maven;
+import org.apache.maven.cli.event.DefaultEventSpyContext;
+import org.apache.maven.cli.event.ExecutionEventLogger;
+import org.apache.maven.cli.logging.Slf4jConfiguration;
+import org.apache.maven.cli.logging.Slf4jConfigurationFactory;
+import org.apache.maven.cli.logging.Slf4jLoggerManager;
+import org.apache.maven.cli.logging.Slf4jStdoutLogger;
+import org.apache.maven.cli.transfer.ConsoleMavenTransferListener;
+import org.apache.maven.cli.transfer.QuietMavenTransferListener;
+import org.apache.maven.cli.transfer.Slf4jMavenTransferListener;
 import org.apache.maven.eventspy.internal.EventSpyDispatcher;
 import org.apache.maven.exception.DefaultExceptionHandler;
 import org.apache.maven.exception.ExceptionHandler;
@@ -59,19 +69,25 @@ import org.apache.maven.settings.building.SettingsSource;
 import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.DefaultContainerConfiguration;
 import org.codehaus.plexus.DefaultPlexusContainer;
+import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.classworlds.ClassWorld;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.LoggerManager;
 import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.transfer.TransferListener;
+import org.eclipse.aether.transfer.TransferListener;
+import org.slf4j.ILoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
 import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
 import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
 import org.sonatype.plexus.components.sec.dispatcher.SecUtil;
 import org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity;
 
+import com.google.inject.AbstractModule;
+
 // TODO: push all common bits back to plexus cli and prepare for transition to Guice. We don't need 50 ways to make CLIs
 
 /**
@@ -99,11 +115,12 @@ public class MavenCli
 
     private ClassWorld classWorld;
 
-    // Per-instance container supports fast embedded execution of core ITs
-    private DefaultPlexusContainer container;
-
-    private Logger logger;
+    private LoggerManager plexusLoggerManager;
 
+    private ILoggerFactory slf4jLoggerFactory;
+    
+    private Logger slf4jLogger;
+    
     private EventSpyDispatcher eventSpyDispatcher;
 
     private ModelProcessor modelProcessor;
@@ -180,22 +197,23 @@ public class MavenCli
     // TODO: need to externalize CliRequest
     public int doMain( CliRequest cliRequest )
     {
+        PlexusContainer localContainer = null;
         try
         {
             initialize( cliRequest );
-            // Need to process cli options first to get possible logging options
             cli( cliRequest );
             logging( cliRequest );
             version( cliRequest );
             properties( cliRequest );
-            container( cliRequest );
+            localContainer = container( cliRequest );
             commands( cliRequest );
             settings( cliRequest );
             populateRequest( cliRequest );
             encryption( cliRequest );
+            repository( cliRequest );
             return execute( cliRequest );
         }
-        catch( ExitException e )
+        catch ( ExitException e )
         {
             return e.exitCode;
         }
@@ -206,21 +224,21 @@ public class MavenCli
         }
         catch ( BuildAbort e )
         {
-            CLIReportingUtils.showError( logger, "ABORTED", e, cliRequest.showErrors );
+            CLIReportingUtils.showError( slf4jLogger, "ABORTED", e, cliRequest.showErrors );
 
             return 2;
         }
         catch ( Exception e )
         {
-            CLIReportingUtils.showError( logger, "Error executing Maven.", e, cliRequest.showErrors );
+            CLIReportingUtils.showError( slf4jLogger, "Error executing Maven.", e, cliRequest.showErrors );
 
             return 1;
         }
         finally
         {
-            if ( cliRequest.fileStream != null )
+            if ( localContainer != null )
             {
-                cliRequest.fileStream.close();
+                localContainer.dispose();
             }
         }
     }
@@ -244,30 +262,67 @@ public class MavenCli
         }
     }
 
-    //
-    // Logging needs to be handled in a standard way at the container level.
-    //
+    private void cli( CliRequest cliRequest )
+        throws Exception
+    {
+        //
+        // Parsing errors can happen during the processing of the arguments and we prefer not having to check if the logger is null
+        // and construct this so we can use an SLF4J logger everywhere.
+        //
+        slf4jLogger = new Slf4jStdoutLogger();
+
+        CLIManager cliManager = new CLIManager();
+
+        try
+        {
+            cliRequest.commandLine = cliManager.parse( cliRequest.args );
+        }
+        catch ( ParseException e )
+        {
+            System.err.println( "Unable to parse command line options: " + e.getMessage() );
+            cliManager.displayHelp( System.out );
+            throw e;
+        }
+
+        if ( cliRequest.commandLine.hasOption( CLIManager.HELP ) )
+        {
+            cliManager.displayHelp( System.out );
+            throw new ExitException( 0 );
+        }
+
+        if ( cliRequest.commandLine.hasOption( CLIManager.VERSION ) )
+        {
+            System.out.println( CLIReportingUtils.showVersion() );
+            throw new ExitException( 0 );
+        }
+    }    
+
+    /**
+     * configure logging
+     */
     private void logging( CliRequest cliRequest )
     {
         cliRequest.debug = cliRequest.commandLine.hasOption( CLIManager.DEBUG );
         cliRequest.quiet = !cliRequest.debug && cliRequest.commandLine.hasOption( CLIManager.QUIET );
         cliRequest.showErrors = cliRequest.debug || cliRequest.commandLine.hasOption( CLIManager.ERRORS );
 
+        slf4jLoggerFactory = LoggerFactory.getILoggerFactory();
+        Slf4jConfiguration slf4jConfiguration = Slf4jConfigurationFactory.getConfiguration( slf4jLoggerFactory );
+
         if ( cliRequest.debug )
         {
             cliRequest.request.setLoggingLevel( MavenExecutionRequest.LOGGING_LEVEL_DEBUG );
+            slf4jConfiguration.setRootLoggerLevel( Slf4jConfiguration.Level.DEBUG );
         }
         else if ( cliRequest.quiet )
         {
-            // TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
-            // Ideally, we could use Warn across the board
             cliRequest.request.setLoggingLevel( MavenExecutionRequest.LOGGING_LEVEL_ERROR );
-            // TODO:Additionally, we can't change the mojo level because the component key includes the version and
-            // it isn't known ahead of time. This seems worth changing.
+            slf4jConfiguration.setRootLoggerLevel( Slf4jConfiguration.Level.ERROR );
         }
         else
         {
             cliRequest.request.setLoggingLevel( MavenExecutionRequest.LOGGING_LEVEL_INFO );
+            slf4jConfiguration.setRootLoggerLevel( Slf4jConfiguration.Level.INFO );
         }
 
         if ( cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
@@ -275,59 +330,32 @@ public class MavenCli
             File logFile = new File( cliRequest.commandLine.getOptionValue( CLIManager.LOG_FILE ) );
             logFile = resolveFile( logFile, cliRequest.workingDirectory );
 
+            // redirect stdout and stderr to file
             try
             {
-                cliRequest.fileStream = new PrintStream( logFile );
-
-                System.setOut( cliRequest.fileStream );
-                System.setErr( cliRequest.fileStream );
+                PrintStream ps = new PrintStream( new FileOutputStream( logFile ) );
+                System.setOut( ps );
+                System.setErr( ps );
             }
             catch ( FileNotFoundException e )
             {
-                System.err.println( e );
+                //
+                // Ignore
+                //
             }
         }
-    }
 
-    //
-    // Every bit of information taken from the CLI should be processed here.
-    //
-    private void cli( CliRequest cliRequest )
-        throws Exception
-    {
-        CLIManager cliManager = new CLIManager();
+        slf4jConfiguration.activate();
 
-        try
-        {
-            cliRequest.commandLine = cliManager.parse( cliRequest.args );
-        }
-        catch ( ParseException e )
-        {
-            System.err.println( "Unable to parse command line options: " + e.getMessage() );
-            cliManager.displayHelp( System.out );
-            throw e;
-        }
-
-        // TODO: these should be moved out of here. Wrong place.
-        //
-        if ( cliRequest.commandLine.hasOption( CLIManager.HELP ) )
-        {
-            cliManager.displayHelp( System.out );
-            throw new ExitException( 0 );
-        }
-
-        if ( cliRequest.commandLine.hasOption( CLIManager.VERSION ) )
-        {
-            CLIReportingUtils.showVersion( System.out );
-            throw new ExitException( 0 );
-        }
+        plexusLoggerManager = new Slf4jLoggerManager();
+        slf4jLogger = slf4jLoggerFactory.getLogger( this.getClass().getName() );
     }
 
     private void version( CliRequest cliRequest )
     {
         if ( cliRequest.debug || cliRequest.commandLine.hasOption( CLIManager.SHOW_VERSION ) )
         {
-            CLIReportingUtils.showVersion( System.out );
+            System.out.println( CLIReportingUtils.showVersion() );
         }
     }
 
@@ -335,16 +363,16 @@ public class MavenCli
     {
         if ( cliRequest.showErrors )
         {
-            logger.info( "Error stacktraces are turned on." );
+            slf4jLogger.info( "Error stacktraces are turned on." );
         }
 
         if ( MavenExecutionRequest.CHECKSUM_POLICY_WARN.equals( cliRequest.request.getGlobalChecksumPolicy() ) )
         {
-            logger.info( "Disabling strict checksum verification on all artifact downloads." );
+            slf4jLogger.info( "Disabling strict checksum verification on all artifact downloads." );
         }
         else if ( MavenExecutionRequest.CHECKSUM_POLICY_FAIL.equals( cliRequest.request.getGlobalChecksumPolicy() ) )
         {
-            logger.info( "Enabling strict checksum verification on all artifact downloads." );
+            slf4jLogger.info( "Enabling strict checksum verification on all artifact downloads." );
         }
     }
 
@@ -353,7 +381,7 @@ public class MavenCli
         populateProperties( cliRequest.commandLine, cliRequest.systemProperties, cliRequest.userProperties );
     }
 
-    private void container( CliRequest cliRequest )
+    private PlexusContainer container( CliRequest cliRequest )
         throws Exception
     {
         if ( cliRequest.classWorld == null )
@@ -361,31 +389,29 @@ public class MavenCli
             cliRequest.classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );
         }
 
-        DefaultPlexusContainer container = this.container;
+        DefaultPlexusContainer container = null;
 
-        if ( container == null )
-        {
-            logger = setupLogger( cliRequest );
+        ContainerConfiguration cc = new DefaultContainerConfiguration()
+            .setClassWorld( cliRequest.classWorld )
+            .setRealm( setupContainerRealm( cliRequest ) )
+            .setClassPathScanning( PlexusConstants.SCANNING_INDEX )
+            .setAutoWiring( true )
+            .setName( "maven" );
 
-            ContainerConfiguration cc = new DefaultContainerConfiguration()
-                .setClassWorld( cliRequest.classWorld )
-                .setRealm( setupContainerRealm( cliRequest ) )
-                .setName( "maven" );
-
-            container = new DefaultPlexusContainer( cc );
+        container = new DefaultPlexusContainer( cc, new AbstractModule()
+        {
+            protected void configure()
+            {
+                bind( ILoggerFactory.class ).toInstance( slf4jLoggerFactory );
+            }
+        } );
 
-            // NOTE: To avoid inconsistencies, we'll use the TCCL exclusively for lookups
-            container.setLookupRealm( null );
+        // NOTE: To avoid inconsistencies, we'll use the TCCL exclusively for lookups
+        container.setLookupRealm( null );
 
-            container.setLoggerManager( new MavenLoggerManager( logger ) );
+        container.setLoggerManager( plexusLoggerManager );
 
-            customizeContainer( container );
-
-            if ( cliRequest.classWorld == classWorld )
-            {
-                this.container = container;
-            }
-        }
+        customizeContainer( container );
 
         container.getLoggerManager().setThresholds( cliRequest.request.getLoggingLevel() );
 
@@ -403,7 +429,7 @@ public class MavenCli
         eventSpyDispatcher.init( eventSpyContext );
 
         // refresh logger in case container got customized by spy
-        logger = container.getLoggerManager().getLoggerForComponent( MavenCli.class.getName(), null );
+        slf4jLogger = slf4jLoggerFactory.getLogger( this.getClass().getName() );
 
         maven = container.lookup( Maven.class );
 
@@ -414,21 +440,8 @@ public class MavenCli
         settingsBuilder = container.lookup( SettingsBuilder.class );
 
         dispatcher = (DefaultSecDispatcher) container.lookup( SecDispatcher.class, "maven" );
-    }
-
-    private PrintStreamLogger setupLogger( CliRequest cliRequest )
-    {
-        PrintStreamLogger logger = new PrintStreamLogger( new PrintStreamLogger.Provider()
-        {
-            public PrintStream getStream()
-            {
-                return System.out;
-            }
-        } );
 
-        logger.setThreshold( cliRequest.request.getLoggingLevel() );
-
-        return logger;
+        return container;
     }
 
     private ClassRealm setupContainerRealm( CliRequest cliRequest )
@@ -456,13 +469,13 @@ public class MavenCli
 
                 ClassRealm extRealm = cliRequest.classWorld.newRealm( "maven.ext", null );
 
-                logger.debug( "Populating class realm " + extRealm.getId() );
+                slf4jLogger.debug( "Populating class realm " + extRealm.getId() );
 
                 for ( String jar : jars )
                 {
                     File file = resolveFile( new File( jar ), cliRequest.workingDirectory );
 
-                    logger.debug( "  Included " + file );
+                    slf4jLogger.debug( "  Included " + file );
 
                     extRealm.addURL( file.toURI().toURL() );
                 }
@@ -476,10 +489,6 @@ public class MavenCli
         return containerRealm;
     }
 
-    protected void customizeContainer( PlexusContainer container )
-    {
-    }
-
     //
     // This should probably be a separate tool and not be baked into Maven.
     //
@@ -530,6 +539,15 @@ public class MavenCli
         }
     }
 
+    private void repository( CliRequest cliRequest )
+        throws Exception
+    {
+        if ( cliRequest.commandLine.hasOption( CLIManager.LEGACY_LOCAL_REPOSITORY ) || Boolean.getBoolean( "maven.legacyLocalRepo" ) )
+        {
+           cliRequest.request.setUseLegacyLocalRepository( true );
+        }
+    }
+
     private int execute( CliRequest cliRequest )
     {
         eventSpyDispatcher.onEvent( cliRequest.request );
@@ -560,39 +578,39 @@ public class MavenCli
                 }
             }
 
-            logger.error( "" );
+            slf4jLogger.error( "" );
 
             if ( !cliRequest.showErrors )
             {
-                logger.error( "To see the full stack trace of the errors, re-run Maven with the -e switch." );
+                slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the -e switch." );
             }
-            if ( !logger.isDebugEnabled() )
+            if ( !slf4jLogger.isDebugEnabled() )
             {
-                logger.error( "Re-run Maven using the -X switch to enable full debug logging." );
+                slf4jLogger.error( "Re-run Maven using the -X switch to enable full debug logging." );
             }
 
             if ( !references.isEmpty() )
             {
-                logger.error( "" );
-                logger.error( "For more information about the errors and possible solutions"
+                slf4jLogger.error( "" );
+                slf4jLogger.error( "For more information about the errors and possible solutions"
                               + ", please read the following articles:" );
 
                 for ( Map.Entry<String, String> entry : references.entrySet() )
                 {
-                    logger.error( entry.getValue() + " " + entry.getKey() );
+                    slf4jLogger.error( entry.getValue() + " " + entry.getKey() );
                 }
             }
 
             if ( project != null && !project.equals( result.getTopologicallySortedProjects().get( 0 ) ) )
             {
-                logger.error( "" );
-                logger.error( "After correcting the problems, you can resume the build with the command" );
-                logger.error( "  mvn <goals> -rf :" + project.getArtifactId() );
+                slf4jLogger.error( "" );
+                slf4jLogger.error( "After correcting the problems, you can resume the build with the command" );
+                slf4jLogger.error( "  mvn <goals> -rf :" + project.getArtifactId() );
             }
 
             if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( cliRequest.request.getReactorFailureBehavior() ) )
             {
-                logger.info( "Build failures were ignored." );
+                slf4jLogger.info( "Build failures were ignored." );
 
                 return 0;
             }
@@ -644,11 +662,11 @@ public class MavenCli
 
             if ( i == lines.length - 1 && ( showErrors || ( summary.getException() instanceof InternalErrorException ) ) )
             {
-                logger.error( line, summary.getException() );
+                slf4jLogger.error( line, summary.getException() );
             }
             else
             {
-                logger.error( line );
+                slf4jLogger.error( line );
             }
         }
 
@@ -660,12 +678,6 @@ public class MavenCli
         }
     }
 
-    protected ModelProcessor createModelProcessor( PlexusContainer container )
-        throws ComponentLookupException
-    {
-        return container.lookup( ModelProcessor.class );
-    }
-
     private void settings( CliRequest cliRequest )
         throws Exception
     {
@@ -717,9 +729,9 @@ public class MavenCli
 
         eventSpyDispatcher.onEvent( settingsRequest );
 
-        logger.debug( "Reading global settings from "
+        slf4jLogger.debug( "Reading global settings from "
             + getSettingsLocation( settingsRequest.getGlobalSettingsSource(), settingsRequest.getGlobalSettingsFile() ) );
-        logger.debug( "Reading user settings from "
+        slf4jLogger.debug( "Reading user settings from "
             + getSettingsLocation( settingsRequest.getUserSettingsSource(), settingsRequest.getUserSettingsFile() ) );
 
         SettingsBuildingResult settingsResult = settingsBuilder.build( settingsRequest );
@@ -728,17 +740,17 @@ public class MavenCli
 
         executionRequestPopulator.populateFromSettings( cliRequest.request, settingsResult.getEffectiveSettings() );
 
-        if ( !settingsResult.getProblems().isEmpty() && logger.isWarnEnabled() )
+        if ( !settingsResult.getProblems().isEmpty() && slf4jLogger.isWarnEnabled() )
         {
-            logger.warn( "" );
-            logger.warn( "Some problems were encountered while building the effective settings" );
+            slf4jLogger.warn( "" );
+            slf4jLogger.warn( "Some problems were encountered while building the effective settings" );
 
             for ( SettingsProblem problem : settingsResult.getProblems() )
             {
-                logger.warn( problem.getMessage() + " @ " + problem.getLocation() );
+                slf4jLogger.warn( problem.getMessage() + " @ " + problem.getLocation() );
             }
 
-            logger.warn( "" );
+            slf4jLogger.warn( "" );
         }
     }
 
@@ -764,7 +776,7 @@ public class MavenCli
         {
             if ( commandLine.hasOption( deprecatedOption ) )
             {
-                logger.warn( "Command line option -" + deprecatedOption
+                slf4jLogger.warn( "Command line option -" + deprecatedOption
                     + " is deprecated and will be removed in future Maven versions." );
             }
         }
@@ -789,7 +801,7 @@ public class MavenCli
         //
         // ----------------------------------------------------------------------
 
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings( "unchecked" )
         List<String> goals = commandLine.getArgList();
 
         boolean recursive = true;
@@ -853,9 +865,9 @@ public class MavenCli
             String[] profileOptionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES );
             if ( profileOptionValues != null )
             {
-                for ( int i = 0; i < profileOptionValues.length; ++i )
+                for ( String profileOptionValue : profileOptionValues )
                 {
-                    StringTokenizer profileTokens = new StringTokenizer( profileOptionValues[i], "," );
+                    StringTokenizer profileTokens = new StringTokenizer( profileOptionValue, "," );
 
                     while ( profileTokens.hasMoreTokens() )
                     {
@@ -883,17 +895,21 @@ public class MavenCli
         if ( quiet )
         {
             transferListener = new QuietMavenTransferListener();
-        }
-        else if ( request.isInteractiveMode() )
+        }        
+        else if ( request.isInteractiveMode() && !cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
         {
-            transferListener = new ConsoleMavenTransferListener( System.out );
+            //
+            // If we're logging to a file then we don't want the console transfer listener as it will spew
+            // download progress all over the place
+            //
+            transferListener = getConsoleTransferListener();
         }
         else
         {
-            transferListener = new BatchModeMavenTransferListener( System.out );
+            transferListener = getBatchTransferListener();
         }
 
-        ExecutionListener executionListener = new ExecutionEventLogger( logger );
+        ExecutionListener executionListener = new ExecutionEventLogger();
         executionListener = eventSpyDispatcher.chainListener( executionListener );
 
         String alternatePomFile = null;
@@ -931,6 +947,10 @@ public class MavenCli
         if ( alternatePomFile != null )
         {
             File pom = resolveFile( new File( alternatePomFile ), workingDirectory );
+            if ( pom.isDirectory() )
+            {
+                pom = new File( pom, "pom.xml" );
+            }
 
             request.setPom( pom );
         }
@@ -958,9 +978,9 @@ public class MavenCli
         {
             String[] values = commandLine.getOptionValues( CLIManager.PROJECT_LIST );
             List<String> projects = new ArrayList<String>();
-            for ( int i = 0; i < values.length; i++ )
+            for ( String value : values )
             {
-                String[] tmp = StringUtils.split( values[i], "," );
+                String[] tmp = StringUtils.split( value, "," );
                 projects.addAll( Arrays.asList( tmp ) );
             }
             request.setSelectedProjects( projects );
@@ -1056,9 +1076,9 @@ public class MavenCli
 
             if ( defStrs != null )
             {
-                for ( int i = 0; i < defStrs.length; ++i )
+                for ( String defStr : defStrs )
                 {
-                    setCliProperty( defStrs[i], userProperties );
+                    setCliProperty( defStr, userProperties );
                 }
             }
         }
@@ -1119,7 +1139,6 @@ public class MavenCli
         boolean debug;
         boolean quiet;
         boolean showErrors = true;
-        PrintStream fileStream;
         Properties userProperties = new Properties();
         Properties systemProperties = new Properties();
         MavenExecutionRequest request;
@@ -1144,5 +1163,28 @@ public class MavenCli
         }
 
     }
+    
+    //
+    // Customizations available via the CLI
+    //
+    
+    protected TransferListener getConsoleTransferListener() 
+    {
+        return new ConsoleMavenTransferListener( System.out );
+    }
+    
+    protected TransferListener getBatchTransferListener()
+    {
+        return new Slf4jMavenTransferListener();
+    }
+    
+    protected void customizeContainer( PlexusContainer container )
+    {
+    }
 
+    protected ModelProcessor createModelProcessor( PlexusContainer container )
+        throws ComponentLookupException
+    {
+        return container.lookup( ModelProcessor.class );
+    }        
 }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenLoggerManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenLoggerManager.java
deleted file mode 100644
index 0d512ae..0000000
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenLoggerManager.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package org.apache.maven.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Locale;
-
-import org.codehaus.plexus.logging.AbstractLoggerManager;
-import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.logging.LoggerManager;
-import org.codehaus.plexus.logging.console.ConsoleLogger;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-
-/**
- * This is a simple logger manager that will only write the logging statements to the console.
- * <p/>
- * Sample configuration:
- * <pre>
- * <logging>
- *   <implementation>org.codehaus.plexus.logging.ConsoleLoggerManager</implementation>
- *   <logger>
- *     <threshold>DEBUG</threshold>
- *   </logger>
- * </logging>
- * </pre>
- *
- * @author Jason van Zyl
- * @author <a href="mailto:trygvis at inamo.no">Trygve Laugstøl</a>
- */
-public class MavenLoggerManager
-    extends AbstractLoggerManager
-    implements LoggerManager, Initializable
-{
-    /**
-     * Message of this level or higher will be logged.
-     * <p/>
-     * This field is set by the plexus container thus the name is 'threshold'. The field
-     * currentThreshold contains the current setting of the threshold.
-     */
-    private String threshold = "info";
-
-    private int currentThreshold;
-
-    private Logger logger;
-
-    public MavenLoggerManager( Logger logger )
-    {
-        this.logger = logger;
-    }
-
-    public void initialize()
-    {
-        debug( "Initializing ConsoleLoggerManager: " + this.hashCode() + "." );
-
-        currentThreshold = parseThreshold( threshold );
-
-        if ( currentThreshold == -1 )
-        {
-            debug( "Could not parse the threshold level: '" + threshold + "', setting to debug." );
-            currentThreshold = Logger.LEVEL_DEBUG;
-        }
-    }
-
-    public void setThreshold( int currentThreshold )
-    {
-        this.currentThreshold = currentThreshold;
-    }
-
-    public void setThresholds( int currentThreshold )
-    {
-        this.currentThreshold = currentThreshold;
-
-        logger.setThreshold( currentThreshold );
-    }
-
-    /** @return Returns the threshold. */
-    public int getThreshold()
-    {
-        return currentThreshold;
-    }
-
-    public void setThreshold( String role,
-                              String roleHint,
-                              int threshold )
-    {
-    }
-
-    public int getThreshold( String role,
-                             String roleHint )
-    {
-        return currentThreshold;
-    }
-
-    public Logger getLoggerForComponent( String role,
-                                         String roleHint )
-    {
-        return logger;
-    }
-
-    public void returnComponentLogger( String role,
-                                       String roleHint )
-    {
-    }
-
-    public int getActiveLoggerCount()
-    {
-        return 1;
-    }
-
-    private int parseThreshold( String text )
-    {
-        text = text.trim().toLowerCase( Locale.ENGLISH );
-
-        if ( text.equals( "debug" ) )
-        {
-            return ConsoleLogger.LEVEL_DEBUG;
-        }
-        else if ( text.equals( "info" ) )
-        {
-            return ConsoleLogger.LEVEL_INFO;
-        }
-        else if ( text.equals( "warn" ) )
-        {
-            return ConsoleLogger.LEVEL_WARN;
-        }
-        else if ( text.equals( "error" ) )
-        {
-            return ConsoleLogger.LEVEL_ERROR;
-        }
-        else if ( text.equals( "fatal" ) )
-        {
-            return ConsoleLogger.LEVEL_FATAL;
-        }
-
-        return -1;
-    }
-
-    /**
-     * Remove this method and all references when this code is verified.
-     *
-     * @param msg
-     */
-    private void debug( String msg )
-    {
-    }
-}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/PrintStreamLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/PrintStreamLogger.java
deleted file mode 100644
index 577ee3e..0000000
--- a/maven-embedder/src/main/java/org/apache/maven/cli/PrintStreamLogger.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.apache.maven.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.PrintStream;
-
-import org.apache.maven.Maven;
-import org.codehaus.plexus.logging.AbstractLogger;
-import org.codehaus.plexus.logging.Logger;
-
-/**
- * Logs to a user-supplied {@link PrintStream}.
- * 
- * @author Benjamin Bentmann
- */
-public class PrintStreamLogger
-    extends AbstractLogger
-{
-
-    static interface Provider
-    {
-        PrintStream getStream();
-    }
-
-    private Provider provider;
-
-    private static final String FATAL_ERROR = "[FATAL] ";
-
-    private static final String ERROR = "[ERROR] ";
-
-    private static final String WARNING = "[WARNING] ";
-
-    private static final String INFO = "[INFO] ";
-
-    private static final String DEBUG = "[DEBUG] ";
-
-    public PrintStreamLogger( Provider provider )
-    {
-        super( Logger.LEVEL_INFO, Maven.class.getName() );
-
-        if ( provider == null )
-        {
-            throw new IllegalArgumentException( "output stream provider missing" );
-        }
-        this.provider = provider;
-    }
-
-    public PrintStreamLogger( PrintStream out )
-    {
-        super( Logger.LEVEL_INFO, Maven.class.getName() );
-
-        setStream( out );
-    }
-
-    public void setStream( final PrintStream out )
-    {
-        if ( out == null )
-        {
-            throw new IllegalArgumentException( "output stream missing" );
-        }
-
-        this.provider = new Provider()
-        {
-            public PrintStream getStream()
-            {
-                return out;
-            }
-        };
-    }
-
-    public void debug( String message, Throwable throwable )
-    {
-        if ( isDebugEnabled() )
-        {
-            PrintStream out = provider.getStream();
-
-            out.print( DEBUG );
-            out.println( message );
-
-            if ( null != throwable )
-            {
-                throwable.printStackTrace( out );
-            }
-        }
-    }
-
-    public void info( String message, Throwable throwable )
-    {
-        if ( isInfoEnabled() )
-        {
-            PrintStream out = provider.getStream();
-
-            out.print( INFO );
-            out.println( message );
-
-            if ( null != throwable )
-            {
-                throwable.printStackTrace( out );
-            }
-        }
-    }
-
-    public void warn( String message, Throwable throwable )
-    {
-        if ( isWarnEnabled() )
-        {
-            PrintStream out = provider.getStream();
-
-            out.print( WARNING );
-            out.println( message );
-
-            if ( null != throwable )
-            {
-                throwable.printStackTrace( out );
-            }
-        }
-    }
-
-    public void error( String message, Throwable throwable )
-    {
-        if ( isErrorEnabled() )
-        {
-            PrintStream out = provider.getStream();
-
-            out.print( ERROR );
-            out.println( message );
-
-            if ( null != throwable )
-            {
-                throwable.printStackTrace( out );
-            }
-        }
-    }
-
-    public void fatalError( String message, Throwable throwable )
-    {
-        if ( isFatalErrorEnabled() )
-        {
-            PrintStream out = provider.getStream();
-
-            out.print( FATAL_ERROR );
-            out.println( message );
-
-            if ( null != throwable )
-            {
-                throwable.printStackTrace( out );
-            }
-        }
-    }
-
-    public void close()
-    {
-        PrintStream out = provider.getStream();
-
-        if ( out == System.out || out == System.err )
-        {
-            out.flush();
-        }
-        else
-        {
-            out.close();
-        }
-    }
-
-    public Logger getChildLogger( String arg0 )
-    {
-        return this;
-    }
-
-}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/DefaultEventSpyContext.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java
similarity index 96%
copy from maven-embedder/src/main/java/org/apache/maven/cli/DefaultEventSpyContext.java
copy to maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java
index 1c09afb..7c7976a 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/DefaultEventSpyContext.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
similarity index 97%
rename from maven-embedder/src/main/java/org/apache/maven/cli/ExecutionEventLogger.java
rename to maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index c1c2150..f55141d 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -30,10 +30,11 @@ import org.apache.maven.execution.MavenExecutionResult;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.logging.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
- * Logs execution events to a user-supplied logger.
+ * Logs execution events to logger, eventually user-supplied.
  *
  * @author Benjamin Bentmann
  */
@@ -44,6 +45,12 @@ public class ExecutionEventLogger
 
     private static final int LINE_LENGTH = 72;
 
+    public ExecutionEventLogger()
+    {
+        logger = LoggerFactory.getLogger( ExecutionEventLogger.class );
+    }
+
+    // TODO should we deprecate?
     public ExecutionEventLogger( Logger logger )
     {
         if ( logger == null )
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/BaseSlf4jConfiguration.java
similarity index 61%
copy from maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
copy to maven-embedder/src/main/java/org/apache/maven/cli/logging/BaseSlf4jConfiguration.java
index 6646458..44c79f4 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/BaseSlf4jConfiguration.java
@@ -1,4 +1,4 @@
-package org.apache.maven.eventspy;
+package org.apache.maven.cli.logging;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,26 +19,27 @@ package org.apache.maven.eventspy;
  * under the License.
  */
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
- * A skeleton eventspy that does nothing other than helping implementors.
+ * Abstract implementation.
+ * 
+ * @author Hervé Boutemy
+ * @since 3.1.0
  */
-public abstract class AbstractEventSpy
-    implements EventSpy
+public class BaseSlf4jConfiguration
+    implements Slf4jConfiguration
 {
+    private final Logger logger = LoggerFactory.getLogger( BaseSlf4jConfiguration.class );
 
-    public void init( Context context )
-        throws Exception
+    public void setRootLoggerLevel( Level level )
     {
+        logger.warn( "setRootLoggerLevel: operation not supported" );
     }
 
-    public void onEvent( Object event )
-        throws Exception
+    public void activate()
     {
+        logger.warn( "reset(): operation not supported" );
     }
-
-    public void close()
-        throws Exception
-    {
-    }
-
 }
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java
similarity index 60%
copy from maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
copy to maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java
index 6646458..c7b8900 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java
@@ -1,4 +1,4 @@
-package org.apache.maven.eventspy;
+package org.apache.maven.cli.logging;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,25 +20,28 @@ package org.apache.maven.eventspy;
  */
 
 /**
- * A skeleton eventspy that does nothing other than helping implementors.
+ * Interface for configuration operations on loggers, which are not available in slf4j, then require per-slf4f-binding
+ * implementation.
+ * 
+ * @author Hervé Boutemy
+ * @since 3.1.0
  */
-public abstract class AbstractEventSpy
-    implements EventSpy
+public interface Slf4jConfiguration
 {
-
-    public void init( Context context )
-        throws Exception
-    {
-    }
-
-    public void onEvent( Object event )
-        throws Exception
+    public static enum Level
     {
+        DEBUG, INFO, ERROR
     }
 
-    public void close()
-        throws Exception
-    {
-    }
+    /**
+     * Set root logging level.
+     *
+     * @param level the level
+     */
+    void setRootLoggerLevel( Level level );
 
+    /**
+     * Activate logging implementation configuration (if necessary).
+     */
+    void activate();
 }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
new file mode 100644
index 0000000..a5a79a8
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
@@ -0,0 +1,83 @@
+package org.apache.maven.cli.logging;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.codehaus.plexus.util.PropertyUtils;
+import org.slf4j.ILoggerFactory;
+
+/**
+ * Slf4jConfiguration factory, loading implementations from <code>META-INF/maven/slf4j-configuration.properties</code>
+ * configuration files in class loader: key is the class name of the ILoggerFactory, value is the class name of
+ * the corresponding Slf4jConfiguration.
+ *
+ * @author Hervé Boutemy
+ * @since 3.1.0
+ */
+public class Slf4jConfigurationFactory
+{
+    public static final String RESOURCE = "META-INF/maven/slf4j-configuration.properties";
+
+    public static Slf4jConfiguration getConfiguration( ILoggerFactory loggerFactory )
+    {
+        try
+        {
+            Enumeration<URL> resources = Slf4jConfigurationFactory.class.getClassLoader().getResources( RESOURCE );
+
+            String key = loggerFactory.getClass().getCanonicalName();
+
+            while ( resources.hasMoreElements() )
+            {
+                URL resource = resources.nextElement();
+
+                Properties conf = PropertyUtils.loadProperties( resource.openStream() );
+
+                String impl = conf.getProperty( key );
+
+                if ( impl != null )
+                {
+                    return (Slf4jConfiguration) Class.forName( impl ).newInstance();
+                }
+            }
+        }
+        catch ( IOException e )
+        {
+            e.printStackTrace();
+        }
+        catch ( InstantiationException e )
+        {
+            e.printStackTrace();
+        }
+        catch ( IllegalAccessException e )
+        {
+            e.printStackTrace();
+        }
+        catch ( ClassNotFoundException e )
+        {
+            e.printStackTrace();
+        }
+
+        return new BaseSlf4jConfiguration();
+    }
+}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLogger.java
new file mode 100644
index 0000000..3f06f37
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLogger.java
@@ -0,0 +1,145 @@
+package org.apache.maven.cli.logging;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.plexus.logging.Logger;
+
+/**
+ * Adapt an SLF4J logger to a Plexus logger, ignoring Plexus logger API parts that are not classical and
+ * probably not really used.
+ * 
+ * @author Jason van Zyl
+ * @since 3.1.0
+ */
+public class Slf4jLogger
+    implements Logger
+{
+
+    private org.slf4j.Logger logger;
+
+    public Slf4jLogger( org.slf4j.Logger logger )
+    {
+        this.logger = logger;
+    }
+
+    public void debug( String message )
+    {
+        logger.debug( message );
+    }
+
+    public void debug( String message, Throwable throwable )
+    {
+        logger.debug( message, throwable );
+    }
+
+    public boolean isDebugEnabled()
+    {
+        return logger.isDebugEnabled();
+    }
+
+    public void info( String message )
+    {
+        logger.info( message );
+    }
+
+    public void info( String message, Throwable throwable )
+    {
+        logger.info( message, throwable );
+    }
+
+    public boolean isInfoEnabled()
+    {
+        return logger.isInfoEnabled();
+    }
+
+    public void warn( String message )
+    {
+        logger.warn( message );
+    }
+
+    public void warn( String message, Throwable throwable )
+    {
+        logger.warn( message, throwable );
+    }
+
+    public boolean isWarnEnabled()
+    {
+        return logger.isWarnEnabled();
+    }
+
+    public void error( String message )
+    {
+        logger.error( message );
+    }
+
+    public void error( String message, Throwable throwable )
+    {
+        logger.error( message, throwable );
+    }
+
+    public boolean isErrorEnabled()
+    {
+        return logger.isErrorEnabled();
+    }
+
+    public void fatalError( String message )
+    {
+        logger.error( message );
+    }
+
+    public void fatalError( String message, Throwable throwable )
+    {
+        logger.error( message, throwable );
+    }
+
+    public boolean isFatalErrorEnabled()
+    {
+        return logger.isErrorEnabled();
+    }
+
+    /**
+     * <b>Warning</b>: ignored (always return <code>0 == Logger.LEVEL_DEBUG</code>).
+     */
+    public int getThreshold()
+    {
+        return 0;
+    }
+
+    /**
+     * <b>Warning</b>: ignored.
+     */
+    public void setThreshold( int threshold )
+    {
+    }
+
+    /**
+     * <b>Warning</b>: ignored (always return <code>null</code>).
+     */
+    public Logger getChildLogger( String name )
+    {
+        return null;
+    }
+
+    public String getName()
+    {
+        return logger.getName();
+    }
+
+}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
new file mode 100644
index 0000000..f30ea8f
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
@@ -0,0 +1,110 @@
+package org.apache.maven.cli.logging;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.LoggerManager;
+import org.slf4j.ILoggerFactory;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Use an SLF4J {@link org.slf4j.ILoggerFactory} as a backing for a Plexus {@link org.codehaus.plexus.logging.LoggerManager},
+ * ignoring Plexus logger API parts that are not classical and probably not really used.
+ *
+ * @author Jason van Zyl
+ * @since 3.1
+ */
+public class Slf4jLoggerManager
+    implements LoggerManager
+{
+
+    private ILoggerFactory loggerFactory;
+
+    public Slf4jLoggerManager()
+    {
+        loggerFactory = LoggerFactory.getILoggerFactory();
+    }
+
+    public Logger getLoggerForComponent( String role )
+    {
+        return new Slf4jLogger( loggerFactory.getLogger( role ) );
+    }
+
+    /**
+     * The logger name for a component with a non-null hint is <code>role.hint</code>.
+     * <b>Warning</b>: this does not conform to logger name as class name convention.
+     * (and what about <code>null</code> and <code>default</code> hint equivalence?)
+     */
+    public Logger getLoggerForComponent( String role, String hint )
+    {
+        return ( null == hint
+            ? getLoggerForComponent( role )
+            : new Slf4jLogger( loggerFactory.getLogger( role + '.' + hint ) ) );
+    }
+
+    //
+    // Trying to give loggers back is a bad idea. Ceki said so :-)
+    // notice to self: what was this method supposed to do?
+    //
+    /**
+     * <b>Warning</b>: ignored.
+     */
+    public void returnComponentLogger( String role )
+    {
+    }
+
+    /**
+     * <b>Warning</b>: ignored.
+     */
+    public void returnComponentLogger( String role, String hint )
+    {
+    }
+
+    /**
+     * <b>Warning</b>: ignored (always return <code>0</code>).
+     */
+    public int getThreshold()
+    {
+        return 0;
+    }
+
+    /**
+     * <b>Warning</b>: ignored.
+     */
+    public void setThreshold( int threshold )
+    {
+    }
+
+    /**
+     * <b>Warning</b>: ignored.
+     */
+    public void setThresholds( int threshold )
+    {
+    }
+
+    /**
+     * <b>Warning</b>: ignored (always return <code>0</code>).
+     */
+    public int getActiveLoggerCount()
+    {
+        return 0;
+    }
+
+}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java
new file mode 100644
index 0000000..d32ea83
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java
@@ -0,0 +1,306 @@
+package org.apache.maven.cli.logging;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.PrintStream;
+
+import org.slf4j.Logger;
+import org.slf4j.Marker;
+
+/**
+ * @since 3.1.0
+ */
+public class Slf4jStdoutLogger
+    implements Logger
+{
+    private static final String ERROR = "[ERROR] ";
+
+    private PrintStream out = System.out;
+
+    //
+    // These are the only methods we need in our primordial logger
+    //    
+    public void error( String msg )
+    {
+        out.print( ERROR );
+        out.println( msg );
+    }
+
+    public void error( String msg, Throwable t )
+    {
+        error( msg );
+
+        if ( null != t )
+        {
+            t.printStackTrace( out );
+        }        
+    }    
+
+    //
+    // Don't need any of this
+    //    
+    public String getName()
+    {
+        return null;
+    }
+
+    public boolean isTraceEnabled()
+    {
+        return false;
+    }
+
+    public void trace( String msg )
+    {
+    }
+
+    public void trace( String format, Object arg )
+    {
+    }
+
+    public void trace( String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void trace( String format, Object... arguments )
+    {
+    }
+
+    public void trace( String msg, Throwable t )
+    {
+    }
+
+    public boolean isTraceEnabled( Marker marker )
+    {
+        return false;
+    }
+
+    public void trace( Marker marker, String msg )
+    {
+    }
+
+    public void trace( Marker marker, String format, Object arg )
+    {
+    }
+
+    public void trace( Marker marker, String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void trace( Marker marker, String format, Object... argArray )
+    {
+    }
+
+    public void trace( Marker marker, String msg, Throwable t )
+    {
+    }
+
+    public boolean isDebugEnabled()
+    {
+        return false;
+    }
+
+    public void debug( String msg )
+    {
+    }
+
+    public void debug( String format, Object arg )
+    {
+    }
+
+    public void debug( String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void debug( String format, Object... arguments )
+    {
+    }
+
+    public void debug( String msg, Throwable t )
+    {
+    }
+
+    public boolean isDebugEnabled( Marker marker )
+    {
+        return false;
+    }
+
+    public void debug( Marker marker, String msg )
+    {
+    }
+
+    public void debug( Marker marker, String format, Object arg )
+    {
+    }
+
+    public void debug( Marker marker, String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void debug( Marker marker, String format, Object... arguments )
+    {
+    }
+
+    public void debug( Marker marker, String msg, Throwable t )
+    {
+    }
+
+    public boolean isInfoEnabled()
+    {
+        return false;
+    }
+
+    public void info( String msg )
+    {
+    }
+
+    public void info( String format, Object arg )
+    {
+    }
+
+    public void info( String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void info( String format, Object... arguments )
+    {
+    }
+
+    public void info( String msg, Throwable t )
+    {
+    }
+
+    public boolean isInfoEnabled( Marker marker )
+    {
+        return false;
+    }
+
+    public void info( Marker marker, String msg )
+    {
+    }
+
+    public void info( Marker marker, String format, Object arg )
+    {
+    }
+
+    public void info( Marker marker, String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void info( Marker marker, String format, Object... arguments )
+    {
+    }
+
+    public void info( Marker marker, String msg, Throwable t )
+    {
+    }
+
+    public boolean isWarnEnabled()
+    {
+        return false;
+    }
+
+    public void warn( String msg )
+    {
+    }
+
+    public void warn( String format, Object arg )
+    {
+    }
+
+    public void warn( String format, Object... arguments )
+    {
+    }
+
+    public void warn( String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void warn( String msg, Throwable t )
+    {
+    }
+
+    public boolean isWarnEnabled( Marker marker )
+    {
+        return false;
+    }
+
+    public void warn( Marker marker, String msg )
+    {
+    }
+
+    public void warn( Marker marker, String format, Object arg )
+    {
+    }
+
+    public void warn( Marker marker, String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void warn( Marker marker, String format, Object... arguments )
+    {
+    }
+
+    public void warn( Marker marker, String msg, Throwable t )
+    {
+    }
+
+    public boolean isErrorEnabled()
+    {
+        return false;
+    }
+
+    public void error( String format, Object arg )
+    {
+    }
+
+    public void error( String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void error( String format, Object... arguments )
+    {
+    }
+
+    public boolean isErrorEnabled( Marker marker )
+    {
+        return false;
+    }
+
+    public void error( Marker marker, String msg )
+    {
+    }
+
+    public void error( Marker marker, String format, Object arg )
+    {
+    }
+
+    public void error( Marker marker, String format, Object arg1, Object arg2 )
+    {
+    }
+
+    public void error( Marker marker, String format, Object... arguments )
+    {
+    }
+
+    public void error( Marker marker, String msg, Throwable t )
+    {
+    }
+
+}
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Log4j2Configuration.java
similarity index 52%
copy from maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
copy to maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Log4j2Configuration.java
index 6646458..7bbc29b 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Log4j2Configuration.java
@@ -1,4 +1,4 @@
-package org.apache.maven.eventspy;
+package org.apache.maven.cli.logging.impl;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,26 +19,41 @@ package org.apache.maven.eventspy;
  * under the License.
  */
 
+import org.apache.maven.cli.logging.BaseSlf4jConfiguration;
+
 /**
- * A skeleton eventspy that does nothing other than helping implementors.
+ * Configuration for slf4j-log4j2.
+ * 
+ * @author Hervé Boutemy
+ * @since 3.1.0
  */
-public abstract class AbstractEventSpy
-    implements EventSpy
+public class Log4j2Configuration
+    extends BaseSlf4jConfiguration
 {
-
-    public void init( Context context )
-        throws Exception
+    @Override
+    public void setRootLoggerLevel( Level level )
     {
-    }
+        String value = "info";
+        switch ( level )
+        {
+            case DEBUG:
+                value = "debug";
+                break;
+            
+            case INFO:
+                value = "info";
+                break;
 
-    public void onEvent( Object event )
-        throws Exception
-    {
+            default:
+                value = "error";
+                break;
+        }
+        System.setProperty( "maven.logging.root.level", value );
     }
 
-    public void close()
-        throws Exception
+    @Override
+    public void activate()
     {
+        // no op
     }
-
 }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java
new file mode 100644
index 0000000..62480f6
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java
@@ -0,0 +1,61 @@
+package org.apache.maven.cli.logging.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.cli.logging.BaseSlf4jConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Configuration for slf4j-logback.
+ * 
+ * @author Hervé Boutemy
+ * @since 3.1.0
+ */
+public class LogbackConfiguration
+    extends BaseSlf4jConfiguration
+{
+    @Override
+    public void setRootLoggerLevel( Level level )
+    {
+        ch.qos.logback.classic.Level value = ch.qos.logback.classic.Level.INFO;
+        switch ( level )
+        {
+            case DEBUG:
+                value = ch.qos.logback.classic.Level.DEBUG;
+                break;
+            
+            case INFO:
+                value = ch.qos.logback.classic.Level.INFO;
+                break;
+
+            default:
+                value = ch.qos.logback.classic.Level.ERROR;
+                break;
+        }
+        ( (ch.qos.logback.classic.Logger) LoggerFactory.getLogger( Logger.ROOT_LOGGER_NAME ) ).setLevel( value );
+    }
+
+    @Override
+    public void activate()
+    {
+        // no op
+    }
+}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java
new file mode 100644
index 0000000..ce7063f
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java
@@ -0,0 +1,63 @@
+package org.apache.maven.cli.logging.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.cli.logging.BaseSlf4jConfiguration;
+import org.slf4j.MavenSlf4jFriend;
+import org.slf4j.impl.MavenSlf4jSimpleFriend;
+
+/**
+ * Configuration for slf4j-simple.
+ * 
+ * @author Hervé Boutemy
+ * @since 3.1.0
+ */
+public class Slf4jSimpleConfiguration
+    extends BaseSlf4jConfiguration
+{
+    @Override
+    public void setRootLoggerLevel( Level level )
+    {
+        String value = "info";
+        switch ( level )
+        {
+            case DEBUG:
+                value = "debug";
+                break;
+            
+            case INFO:
+                value = "info";
+                break;
+
+            default:
+                value = "error";
+                break;
+        }
+        System.setProperty( "org.slf4j.simpleLogger.defaultLogLevel", value );
+    }
+
+    @Override
+    public void activate()
+    {
+        // property for root logger level or System.out redirection need to be taken into account
+        MavenSlf4jFriend.reset();
+        MavenSlf4jSimpleFriend.init();
+    }
+}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
similarity index 90%
copy from maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java
copy to maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
index 08a44e7..58b1a5d 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.transfer;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -24,10 +24,10 @@ import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.util.Locale;
 
-import org.sonatype.aether.transfer.AbstractTransferListener;
-import org.sonatype.aether.transfer.TransferCancelledException;
-import org.sonatype.aether.transfer.TransferEvent;
-import org.sonatype.aether.transfer.TransferResource;
+import org.eclipse.aether.transfer.AbstractTransferListener;
+import org.eclipse.aether.transfer.TransferCancelledException;
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transfer.TransferResource;
 
 public abstract class AbstractMavenTransferListener
     extends AbstractTransferListener
@@ -37,7 +37,7 @@ public abstract class AbstractMavenTransferListener
 
     protected AbstractMavenTransferListener( PrintStream out )
     {
-        this.out = ( out != null ) ? out : System.out;
+        this.out = out;
     }
 
     @Override
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/BatchModeMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java
similarity index 96%
rename from maven-embedder/src/main/java/org/apache/maven/cli/BatchModeMavenTransferListener.java
rename to maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java
index 7a165cd..0e20f17 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/BatchModeMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.transfer;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/ConsoleMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
similarity index 90%
rename from maven-embedder/src/main/java/org/apache/maven/cli/ConsoleMavenTransferListener.java
rename to maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
index c848719..bfc84c0 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/ConsoleMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.transfer;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -23,9 +23,9 @@ import java.io.PrintStream;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.sonatype.aether.transfer.TransferCancelledException;
-import org.sonatype.aether.transfer.TransferEvent;
-import org.sonatype.aether.transfer.TransferResource;
+import org.eclipse.aether.transfer.TransferCancelledException;
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transfer.TransferResource;
 
 /**
  * Console download progress meter.
@@ -50,7 +50,7 @@ public class ConsoleMavenTransferListener
         throws TransferCancelledException
     {
         TransferResource resource = event.getResource();
-        downloads.put( resource, Long.valueOf( event.getTransferredBytes() ) );
+        downloads.put( resource, event.getTransferredBytes() );
 
         StringBuilder buffer = new StringBuilder( 64 );
 
@@ -70,7 +70,7 @@ public class ConsoleMavenTransferListener
         pad( buffer, pad );
         buffer.append( '\r' );
 
-        out.print( buffer );
+        out.print( buffer.toString() );
     }
 
     private String getStatus( long complete, long total )
@@ -127,7 +127,7 @@ public class ConsoleMavenTransferListener
         StringBuilder buffer = new StringBuilder( 64 );
         pad( buffer, lastLength );
         buffer.append( '\r' );
-        out.print( buffer );
+        out.print( buffer.toString() );
     }
 
 }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/QuietMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/QuietMavenTransferListener.java
similarity index 90%
rename from maven-embedder/src/main/java/org/apache/maven/cli/QuietMavenTransferListener.java
rename to maven-embedder/src/main/java/org/apache/maven/cli/transfer/QuietMavenTransferListener.java
index b9748a3..fd9f52c 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/QuietMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/QuietMavenTransferListener.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.transfer;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,7 +19,7 @@ package org.apache.maven.cli;
  * under the License.
  */
 
-import org.sonatype.aether.transfer.AbstractTransferListener;
+import org.eclipse.aether.transfer.AbstractTransferListener;
 
 /**
  * @author Benjamin Bentmann
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
similarity index 70%
rename from maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java
rename to maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
index 08a44e7..6560fe5 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.apache.maven.cli.transfer;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,25 +19,32 @@ package org.apache.maven.cli;
  * under the License.
  */
 
-import java.io.PrintStream;
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.util.Locale;
 
-import org.sonatype.aether.transfer.AbstractTransferListener;
-import org.sonatype.aether.transfer.TransferCancelledException;
-import org.sonatype.aether.transfer.TransferEvent;
-import org.sonatype.aether.transfer.TransferResource;
+import org.eclipse.aether.transfer.AbstractTransferListener;
+import org.eclipse.aether.transfer.TransferCancelledException;
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transfer.TransferResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-public abstract class AbstractMavenTransferListener
+public class Slf4jMavenTransferListener
     extends AbstractTransferListener
 {
 
-    protected PrintStream out;
+    protected final Logger out;
 
-    protected AbstractMavenTransferListener( PrintStream out )
+    public Slf4jMavenTransferListener()
     {
-        this.out = ( out != null ) ? out : System.out;
+        this.out = LoggerFactory.getLogger( Slf4jMavenTransferListener.class );
+    }
+
+    // TODO should we deprecate?
+    public Slf4jMavenTransferListener( Logger out )
+    {
+        this.out = out;
     }
 
     @Override
@@ -45,7 +52,7 @@ public abstract class AbstractMavenTransferListener
     {
         String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
 
-        out.println( message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
+        out.info( message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
     }
 
     @Override
@@ -54,8 +61,7 @@ public abstract class AbstractMavenTransferListener
     {
         TransferResource resource = event.getResource();
 
-        out.println( "[WARNING] " + event.getException().getMessage() + " for " + resource.getRepositoryUrl()
-            + resource.getResourceName() );
+        out.warn( event.getException().getMessage() + " for " + resource.getRepositoryUrl() + resource.getResourceName() );
     }
 
     @Override
@@ -77,7 +83,7 @@ public abstract class AbstractMavenTransferListener
                 throughput = " at " + format.format( kbPerSec ) + " KB/sec";
             }
 
-            out.println( type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
+            out.info( type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
                 + throughput + ")" );
         }
     }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/DefaultEventSpyContext.java b/maven-embedder/src/main/java/org/slf4j/MavenSlf4jFriend.java
similarity index 71%
rename from maven-embedder/src/main/java/org/apache/maven/cli/DefaultEventSpyContext.java
rename to maven-embedder/src/main/java/org/slf4j/MavenSlf4jFriend.java
index 1c09afb..8a43053 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/DefaultEventSpyContext.java
+++ b/maven-embedder/src/main/java/org/slf4j/MavenSlf4jFriend.java
@@ -1,4 +1,4 @@
-package org.apache.maven.cli;
+package org.slf4j;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,20 +19,17 @@ package org.apache.maven.cli;
  * under the License.
  */
 
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.maven.eventspy.EventSpy;
-
-public class DefaultEventSpyContext
-    implements EventSpy.Context
+/**
+ * Utility for Maven to access Slf4j internals through package access.
+ * Use with precaution, since this is not normally intended for production use.
+ */
+public class MavenSlf4jFriend
 {
-
-    private final Map<String, Object> data = new HashMap<String, Object>();
-
-    public Map<String, Object> getData()
+    /**
+     * Reset Slf4j internal state.
+     */
+    public static void reset()
     {
-        return data;
+        LoggerFactory.reset();
     }
-
 }
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java
similarity index 59%
copy from maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
copy to maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java
index 6646458..bffd18c 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java
@@ -1,4 +1,4 @@
-package org.apache.maven.eventspy;
+package org.slf4j.impl;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,26 +19,22 @@ package org.apache.maven.eventspy;
  * under the License.
  */
 
+import org.slf4j.ILoggerFactory;
+import org.slf4j.LoggerFactory;
+
 /**
- * A skeleton eventspy that does nothing other than helping implementors.
+ * Utility for Maven to access Slf4j-Simple internals through package access.
+ * Use with precaution, since this is not normally intended for production use.
  */
-public abstract class AbstractEventSpy
-    implements EventSpy
+public class MavenSlf4jSimpleFriend
 {
-
-    public void init( Context context )
-        throws Exception
-    {
-    }
-
-    public void onEvent( Object event )
-        throws Exception
+    public static void init()
     {
+        SimpleLogger.init();
+        ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();
+        if ( loggerFactory instanceof SimpleLoggerFactory )
+        {
+            ( (SimpleLoggerFactory) loggerFactory ).reset();
+        }
     }
-
-    public void close()
-        throws Exception
-    {
-    }
-
 }
diff --git a/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties b/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
new file mode 100644
index 0000000..cd1a5d1
--- /dev/null
+++ b/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# key = Slf4j effective logger factory implementation
+# value = corresponding o.a.m.cli.logging.Slf4jConfiguration class
+org.slf4j.impl.SimpleLoggerFactory org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration
+org.slf4j.helpers.Log4JLoggerFactory org.apache.maven.cli.logging.impl.Log4j2Configuration
+ch.qos.logback.classic.LoggerContext org.apache.maven.cli.logging.impl.LogbackConfiguration
diff --git a/maven-embedder/src/site/apt/cli.apt.vm b/maven-embedder/src/site/apt/cli.apt.vm
new file mode 100644
index 0000000..b5dcae7
--- /dev/null
+++ b/maven-embedder/src/site/apt/cli.apt.vm
@@ -0,0 +1,28 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
+ Maven CLI Options Reference
+ -----
+ Hervé Boutemy
+ -----
+ 2012-04-29
+ -----
+
+Maven CLI Options Reference
+
+%{snippet|file=${project.basedir}/target/test-classes/options.html|verbatim=false}
diff --git a/maven-embedder/src/site/apt/index.apt.vm b/maven-embedder/src/site/apt/index.apt.vm
new file mode 100644
index 0000000..408d83f
--- /dev/null
+++ b/maven-embedder/src/site/apt/index.apt.vm
@@ -0,0 +1,34 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
+ ${project.name}
+ -----
+ Hervé Boutemy
+ -----
+ 2012-04-29
+ -----
+
+${project.name}
+
+ ${project.description}
+
+* References
+
+ * {{{./cli.html}CLI options}},
+
+ * {{{./logging.html}logging API}}.
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
new file mode 100644
index 0000000..b903f8c
--- /dev/null
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -0,0 +1,112 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+ -----
+ Maven Logging
+ -----
+ Hervé Boutemy
+ -----
+ 2013-08-02
+ -----
+
+Maven Logging
+
+ End-user logging documentation is available {{{/maven-logging.html}in Maven site}}.
+ This documentation is focused on internal implementation details.
+
+* Logging API
+
+ Maven uses
+ {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/package-summary.html}Plexus
+ Container logging API}}, like any other Plexus components, ie 
+ {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/LoggerManager.html}LoggerManager}}
+ / {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/Logger.html}Logger}}.
+
+ Starting with Maven 3.1.0:
+ 
+  *  Maven supports SLF4J API logging API too, ie {{{http://slf4j.org/apidocs/org/slf4j/LoggerFactory.html}LoggerFactory}} /
+     {{{http://slf4j.org/apidocs/org/slf4j/Logger.html}Logger}},
+
+  *  instead of implementing Plexus logging API itself with basic output to console, Maven implements it using SLF4J API in
+     {{{./apidocs/org/apache/maven/cli/logging/Slf4jLoggerManager.html}Slf4jLoggerManager}}
+     / {{{./apidocs/org/apache/maven/cli/logging/Slf4jLogger.html}Slf4jLogger}}.
+
+
+* Logging Implementation
+
+ Maven 3.1.0 ships bundled with {{{http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html}SLF4J simple logger}},
+ but is ready to use other logging implementations: SLF4J is responsible for loading the implementation, referred to as
+ {{{http://www.slf4j.org/manual.html#swapping}"SLF4J bindings"}}.
+
+ Logging configuration loading is actually done by logging implementation, without any Maven extensions to support merging
+ Maven installation configuration with per-user configuration for example:
+ `${maven.home}/conf/logging` directory was added to core's classpath (see `${maven.home}/bin/m2.conf`). See your implementation
+ documentation for details on file names, formats, and so on.
+
+ During Maven initialization, Maven tweaks default root logging level to match CLI verbosity choice. Since such feature isn't available
+ in SLF4J API, logging implementation specific extensions need to be added into Maven to support these CLI options: see
+ {{{./apidocs/org/apache/maven/cli/logging/Slf4jConfigurationFactory.html}Slf4jConfigurationFactory}} /
+ {{{./apidocs/org/apache/maven/cli/logging/Slf4jConfiguration.html}Slf4jConfiguration}}.
+
+* Getting Logger Instance
+
+ Plexus Logger and LoggerManager can be injected in Plexus component using Plexus annotations
+
++------+
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
+
+ at Component( role = MyComponent.class )
+public class DefaultMyComponent
+    implements MyComponent
+{
+    @Requirement
+    private Logger logger;
+
+    @Requirement
+    private LoggerManager loggerManager;
+}
++------+
+
+ Starting with Maven 3.1.0, SLF4J Logger can be used directly too, without Plexus. Of course, this will only work when run under
+ Maven 3.1.0, then this technique can be used safely only in Maven core components or in plugins/component not requiring
+ compatibility with previous Maven versions.
+ 
++-----+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MyClass
+{
+   final Logger logger = LoggerFactory.getLogger( MyClass.class );
+}
++-----+
+
+* Logger Name
+
+ Before Maven 3.1.0, with logging implementation done in Maven, logger name wasn't used by basic console logging implementation:
+ they are as-is, without clear convention on when to pass logger from class to class or when to create a new logger.
+
+ Starting with Maven 3.1.0, logging implementation can be of greatest use if logger names are well defined. This definition still
+ needs to be defined and implemented:
+
+ * classical "class name" pattern?
+
+ * Maven-specific name hierarchy?
+
+ * a mix (some with class name, some with Maven-specific hierarchy)?
diff --git a/maven-embedder/src/site/site.xml b/maven-embedder/src/site/site.xml
index 3a16bf9..71dc6c8 100644
--- a/maven-embedder/src/site/site.xml
+++ b/maven-embedder/src/site/site.xml
@@ -30,6 +30,10 @@ under the License.
       <!--item name="FAQ" href="faq.html"/-->
     </menu>
 
+    <menu name="Reference">
+      <item name="CLI options" href="cli.html"/>
+    </menu>
+
     <menu ref="parent"/>
     <menu ref="reports"/>
   </body>
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerTest.java
new file mode 100644
index 0000000..716127b
--- /dev/null
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerTest.java
@@ -0,0 +1,108 @@
+package org.apache.maven.cli;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.apache.commons.cli.Option;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Pseudo test to generate documentation fragment about supported CLI options.
+ * TODO such documentation generation code should not be necessary as unit test but should be run
+ * during site generation (Velocity? Doxia macro?) 
+ */
+public class CLIManagerTest
+    extends PlexusTestCase
+{
+    private final static String LS = System.getProperty( "line.separator" );
+
+    private static class OptionComparator
+        implements Comparator<Option>
+    {
+        public int compare( Option opt1, Option opt2 )
+        {
+            return opt1.getOpt().compareToIgnoreCase( opt2.getOpt() );
+        }
+    }
+
+    private static class CLIManagerExtension
+        extends CLIManager
+    {
+        public Collection<Option> getOptions()
+        {
+            @SuppressWarnings( "unchecked" )
+            List<Option> optList = new ArrayList<Option>( options.getOptions() );
+            Collections.sort( optList, new OptionComparator() );
+            return optList;
+        }
+    }
+
+    public String getOptionsAsHtml()
+    {
+        StringBuilder sb = new StringBuilder();
+        boolean a = true;
+        sb.append( "<table border='1' class='zebra-striped'><tr class='a'><th><b>Options</b></th><th><b>Description</b></th></tr>" );
+        for ( Option option : new CLIManagerExtension().getOptions() )
+        {
+            a = !a;
+            sb.append( "<tr class='" + ( a ? 'a' : 'b' ) + "'><td><code>-<a name='" );
+            sb.append( option.getOpt() );
+            sb.append( "'>" );
+            sb.append( option.getOpt() );
+            sb.append( "</a>,--<a name='" );
+            sb.append( option.getLongOpt() );
+            sb.append( "'>" );
+            sb.append( option.getLongOpt() );
+            sb.append( "</a>" );
+            if ( option.hasArg() )
+            {
+                if ( option.hasArgName() )
+                {
+                    sb.append( " <" ).append( option.getArgName() ).append( ">" );
+                }
+                else
+                {
+                    sb.append( ' ' );
+                }
+            }
+            sb.append( "</code></td><td>" );
+            sb.append( option.getDescription() );
+            sb.append( "</td></tr>" );
+            sb.append( LS );
+        }
+        sb.append( "</table>" );
+        return sb.toString();
+    }
+
+    public void testOptionsAsHtml()
+        throws IOException
+    {
+        File options = getTestFile( "target/test-classes/options.html" );
+        FileUtils.fileWrite( options, "UTF-8", getOptionsAsHtml() );
+    }
+}
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
new file mode 100644
index 0000000..e0671a3
--- /dev/null
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
@@ -0,0 +1,61 @@
+package org.apache.maven.cli.event;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import junit.framework.TestCase;
+
+public class ExecutionEventLoggerTest
+    extends TestCase
+{
+
+    private static String getFormattedTime( long time )
+        throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException,
+        InvocationTargetException
+    {
+        Method method = ExecutionEventLogger.class.getDeclaredMethod( "getFormattedTime", long.class );
+        boolean accessible = method.isAccessible();
+        try
+        {
+            method.setAccessible( true );
+            return (String) method.invoke( null, time );
+        }
+        finally
+        {
+            method.setAccessible( accessible );
+        }
+    }
+
+    public void testGetFormattedTime()
+        throws Exception
+    {
+        assertEquals( "0.001s", getFormattedTime( 1 ) );
+        assertEquals( "0.999s", getFormattedTime( 1000 - 1 ) );
+        assertEquals( "1.000s", getFormattedTime( 1000 ) );
+        assertEquals( "59.999s", getFormattedTime( 60 * 1000 - 1 ) );
+        assertEquals( "1:00.000s", getFormattedTime( 60 * 1000 ) );
+        assertEquals( "59:59.999s", getFormattedTime( 60 * 60 * 1000 - 1 ) );
+        assertEquals( "1:00:00.000s", getFormattedTime( 60 * 60 * 1000 ) );
+        assertEquals( "23:59:59.999s", getFormattedTime( 24 * 60 * 60 * 1000 - 1 ) );
+        assertEquals( "24:00:00.000s", getFormattedTime( 24 * 60 * 60 * 1000 ) );
+    }
+}
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index 8eabf05..9150460 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-model-builder</artifactId>
@@ -24,6 +24,12 @@
   <name>Maven Model Builder</name>
   <description>The effective model builder, with inheritance, profile activation, interpolation, ...</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -43,8 +49,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-inject-plexus</artifactId>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index 8f08904..09718ec 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -42,6 +42,7 @@ import org.apache.maven.model.PluginManagement;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.Repository;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
 import org.apache.maven.model.composition.DependencyManagementImporter;
 import org.apache.maven.model.inheritance.InheritanceAssembler;
 import org.apache.maven.model.interpolation.ModelInterpolator;
@@ -229,12 +230,6 @@ public class DefaultModelBuilder
     public ModelBuildingResult build( ModelBuildingRequest request )
         throws ModelBuildingException
     {
-        return build( request, new LinkedHashSet<String>() );
-    }
-
-    private ModelBuildingResult build( ModelBuildingRequest request, Collection<String> importIds )
-        throws ModelBuildingException
-    {
         DefaultModelBuildingResult result = new DefaultModelBuildingResult();
 
         DefaultModelProblemCollector problems = new DefaultModelProblemCollector( result );
@@ -262,8 +257,8 @@ public class DefaultModelBuilder
 
         problems.setRootModel( inputModel );
 
-        ModelData resultData = new ModelData( inputModel );
-        ModelData superData = new ModelData( getSuperModel() );
+        ModelData resultData = new ModelData( request.getModelSource(), inputModel );
+        ModelData superData = new ModelData( null, getSuperModel() );
 
         Collection<String> parentIds = new LinkedHashSet<String>();
         parentIds.add( ModelProblemUtils.toId( inputModel ) );
@@ -283,6 +278,8 @@ public class DefaultModelBuilder
 
             modelNormalizer.mergeDuplicates( tmpModel, request, problems );
 
+            profileActivationContext.setProjectProperties( tmpModel.getProperties() );
+
             List<Profile> activePomProfiles =
                 profileSelector.getActiveProfiles( rawModel.getProfiles(), profileActivationContext, problems );
             currentData.setActiveProfiles( activePomProfiles );
@@ -307,7 +304,7 @@ public class DefaultModelBuilder
 
             configureResolver( request.getModelResolver(), tmpModel, problems );
 
-            currentData = readParent( tmpModel, request, problems );
+            currentData = readParent( tmpModel, currentData.getSource(), request, problems );
 
             if ( currentData == null )
             {
@@ -322,7 +319,7 @@ public class DefaultModelBuilder
                 }
                 message += currentData.getId();
 
-                problems.add( ModelProblem.Severity.FATAL, message, null, null );
+                problems.add( new ModelProblemCollectorRequest( ModelProblem.Severity.FATAL, ModelProblem.Version.BASE ).setMessage( message ) );
                 throw problems.newModelBuildingException();
             }
         }
@@ -414,7 +411,7 @@ public class DefaultModelBuilder
 
         modelValidator.validateEffectiveModel( resultModel, request, problems );
 
-        if ( problems.hasErrors() )
+        if ( hasModelErrors( problems ) )
         {
             throw problems.newModelBuildingException();
         }
@@ -447,7 +444,7 @@ public class DefaultModelBuilder
             InputSource source = request.isLocationTracking() ? new InputSource() : null;
 
             Map<String, Object> options = new HashMap<String, Object>();
-            options.put( ModelProcessor.IS_STRICT, Boolean.valueOf( strict ) );
+            options.put( ModelProcessor.IS_STRICT, strict );
             options.put( ModelProcessor.INPUT_SOURCE, source );
             options.put( ModelProcessor.SOURCE, modelSource );
 
@@ -476,13 +473,15 @@ public class DefaultModelBuilder
 
                 if ( pomFile != null )
                 {
-                    problems.add( Severity.ERROR, "Malformed POM " + modelSource.getLocation() + ": " + e.getMessage(),
-                                  null, e );
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.V20 )
+                            .setMessage( "Malformed POM " + modelSource.getLocation() + ": " + e.getMessage() )
+                            .setException( e ) );
                 }
                 else
                 {
-                    problems.add( Severity.WARNING, "Malformed POM " + modelSource.getLocation() + ": "
-                        + e.getMessage(), null, e );
+                    problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 )
+                            .setMessage( "Malformed POM " + modelSource.getLocation() + ": " + e.getMessage() )
+                            .setException( e ) );
                 }
             }
 
@@ -494,8 +493,9 @@ public class DefaultModelBuilder
         }
         catch ( ModelParseException e )
         {
-            problems.add( Severity.FATAL, "Non-parseable POM " + modelSource.getLocation() + ": " + e.getMessage(),
-                          null, e );
+            problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE )
+                    .setMessage( "Non-parseable POM " + modelSource.getLocation() + ": " + e.getMessage() )
+                    .setException( e ) );
             throw problems.newModelBuildingException();
         }
         catch ( IOException e )
@@ -513,7 +513,9 @@ public class DefaultModelBuilder
                     msg = e.getClass().getSimpleName();
                 }
             }
-            problems.add( Severity.FATAL, "Non-readable POM " + modelSource.getLocation() + ": " + msg, null, e );
+            problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE )
+                    .setMessage( "Non-readable POM " + modelSource.getLocation() + ": " + msg )
+                    .setException( e ) );
             throw problems.newModelBuildingException();
         }
 
@@ -522,7 +524,7 @@ public class DefaultModelBuilder
         problems.setSource( model );
         modelValidator.validateRawModel( model, request, problems );
 
-        if ( problems.hasFatalErrors() )
+        if ( hasFatalErrors( problems ) )
         {
             throw problems.newModelBuildingException();
         }
@@ -562,8 +564,10 @@ public class DefaultModelBuilder
             }
             catch ( InvalidRepositoryException e )
             {
-                problems.add( Severity.ERROR, "Invalid repository " + repository.getId() + ": " + e.getMessage(),
-                              repository.getLocation( "" ), e );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "Invalid repository " + repository.getId() + ": " + e.getMessage() )
+                        .setLocation( repository.getLocation( "" ) )
+                        .setException( e ) );
             }
         }
     }
@@ -615,8 +619,9 @@ public class DefaultModelBuilder
             if ( versions.get( key ) == null && managedVersions.get( key ) == null )
             {
                 InputLocation location = plugins.get( key ).getLocation( "" );
-                problems.add( Severity.WARNING, "'build.plugins.plugin.version' for " + key + " is missing.", location,
-                              null );
+                problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 )
+                        .setMessage( "'build.plugins.plugin.version' for " + key + " is missing." )
+                        .setLocation( location ) );
             }
         }
     }
@@ -639,7 +644,7 @@ public class DefaultModelBuilder
         return result;
     }
 
-    private ModelData readParent( Model childModel, ModelBuildingRequest request,
+    private ModelData readParent( Model childModel, ModelSource childSource, ModelBuildingRequest request,
                                   DefaultModelProblemCollector problems )
         throws ModelBuildingException
     {
@@ -657,7 +662,7 @@ public class DefaultModelBuilder
 
             if ( parentData == null )
             {
-                parentData = readParentLocally( childModel, request, problems );
+                parentData = readParentLocally( childModel, childSource, request, problems );
 
                 if ( parentData == null )
                 {
@@ -678,9 +683,10 @@ public class DefaultModelBuilder
                 File pomFile = parentData.getModel().getPomFile();
                 if ( pomFile != null )
                 {
-                    File expectedParentFile = getParentPomFile( childModel );
+                    ModelSource expectedParentSource = getParentPomFile( childModel, childSource );
 
-                    if ( !pomFile.equals( expectedParentFile ) )
+                    if ( expectedParentSource instanceof ModelSource2
+                        && !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) )
                     {
                         parentData = readParentExternally( childModel, request, problems );
                     }
@@ -691,9 +697,10 @@ public class DefaultModelBuilder
 
             if ( !"pom".equals( parentModel.getPackaging() ) )
             {
-                problems.add( Severity.ERROR, "Invalid packaging for parent POM "
-                    + ModelProblemUtils.toSourceHint( parentModel ) + ", must be \"pom\" but is \""
-                    + parentModel.getPackaging() + "\"", parentModel.getLocation( "packaging" ), null );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "Invalid packaging for parent POM " + ModelProblemUtils.toSourceHint( parentModel )
+                                     + ", must be \"pom\" but is \"" + parentModel.getPackaging() + "\"" )
+                        .setLocation( parentModel.getLocation( "packaging" ) ) );
             }
         }
         else
@@ -704,18 +711,24 @@ public class DefaultModelBuilder
         return parentData;
     }
 
-    private ModelData readParentLocally( Model childModel, ModelBuildingRequest request,
+    private ModelData readParentLocally( Model childModel, ModelSource childSource, ModelBuildingRequest request,
                                          DefaultModelProblemCollector problems )
         throws ModelBuildingException
     {
-        File pomFile = getParentPomFile( childModel );
+        ModelSource candidateSource = getParentPomFile( childModel, childSource );
 
-        if ( pomFile == null || !pomFile.isFile() )
+        if ( candidateSource == null )
         {
             return null;
         }
 
-        Model candidateModel = readModel( null, pomFile, request, problems );
+        File pomFile = null;
+        if ( candidateSource instanceof FileModelSource )
+        {
+            pomFile = ( (FileModelSource) candidateSource ).getPomFile();
+        }
+
+        Model candidateModel = readModel( candidateSource, pomFile, request, problems );
 
         String groupId = candidateModel.getGroupId();
         if ( groupId == null && candidateModel.getParent() != null )
@@ -745,7 +758,9 @@ public class DefaultModelBuilder
             buffer.append( ", please verify your project structure" );
 
             problems.setSource( childModel );
-            problems.add( Severity.WARNING, buffer.toString(), parent.getLocation( "" ), null );
+            problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE )
+                    .setMessage( buffer.toString() )
+                    .setLocation( parent.getLocation( "" ) ) );
             return null;
         }
         if ( version == null || !version.equals( parent.getVersion() ) )
@@ -753,16 +768,14 @@ public class DefaultModelBuilder
             return null;
         }
 
-        ModelData parentData = new ModelData( candidateModel, groupId, artifactId, version );
+        ModelData parentData = new ModelData( candidateSource, candidateModel, groupId, artifactId, version );
 
         return parentData;
     }
 
-    private File getParentPomFile( Model childModel )
+    private ModelSource getParentPomFile( Model childModel, ModelSource source )
     {
-        File projectDirectory = childModel.getProjectDirectory();
-
-        if ( projectDirectory == null )
+        if ( !( source instanceof ModelSource2 ) )
         {
             return null;
         }
@@ -774,16 +787,7 @@ public class DefaultModelBuilder
             return null;
         }
 
-        parentPath = parentPath.replace( '\\', File.separatorChar ).replace( '/', File.separatorChar );
-
-        File pomFile = new File( new File( projectDirectory, parentPath ).toURI().normalize() );
-
-        if ( pomFile.isDirectory() )
-        {
-            pomFile = modelProcessor.locatePom( pomFile );
-        }
-
-        return pomFile;
+        return ( (ModelSource2) source ).getRelatedSource( parentPath );
     }
 
     private ModelData readParentExternally( Model childModel, ModelBuildingRequest request,
@@ -837,7 +841,10 @@ public class DefaultModelBuilder
                 }
             }
 
-            problems.add( Severity.FATAL, buffer.toString(), parent.getLocation( "" ), e );
+            problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE )
+                    .setMessage( buffer.toString() )
+                    .setLocation( parent.getLocation( "" ) )
+                    .setException( e ) );
             throw problems.newModelBuildingException();
         }
 
@@ -856,7 +863,7 @@ public class DefaultModelBuilder
 
         Model parentModel = readModel( modelSource, null, lenientRequest, problems );
 
-        ModelData parentData = new ModelData( parentModel, groupId, artifactId, version );
+        ModelData parentData = new ModelData( modelSource, parentModel, groupId, artifactId, version );
 
         return parentData;
     }
@@ -903,20 +910,26 @@ public class DefaultModelBuilder
 
             if ( groupId == null || groupId.length() <= 0 )
             {
-                problems.add( Severity.ERROR, "'dependencyManagement.dependencies.dependency.groupId' for "
-                    + dependency.getManagementKey() + " is missing.", dependency.getLocation( "" ), null );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "'dependencyManagement.dependencies.dependency.groupId' for "
+                                        + dependency.getManagementKey() + " is missing." )
+                        .setLocation( dependency.getLocation( "" ) ) );
                 continue;
             }
             if ( artifactId == null || artifactId.length() <= 0 )
             {
-                problems.add( Severity.ERROR, "'dependencyManagement.dependencies.dependency.artifactId' for "
-                    + dependency.getManagementKey() + " is missing.", dependency.getLocation( "" ), null );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "'dependencyManagement.dependencies.dependency.artifactId' for "
+                                        + dependency.getManagementKey() + " is missing." )
+                        .setLocation( dependency.getLocation( "" ) ) );
                 continue;
             }
             if ( version == null || version.length() <= 0 )
             {
-                problems.add( Severity.ERROR, "'dependencyManagement.dependencies.dependency.version' for "
-                    + dependency.getManagementKey() + " is missing.", dependency.getLocation( "" ), null );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "'dependencyManagement.dependencies.dependency.version' for "
+                                        + dependency.getManagementKey() + " is missing." )
+                        .setLocation( dependency.getLocation( "" ) ) );
                 continue;
             }
 
@@ -930,7 +943,7 @@ public class DefaultModelBuilder
                     message += modelId + " -> ";
                 }
                 message += imported;
-                problems.add( Severity.ERROR, message, null, null );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).setMessage( message ) );
 
                 continue;
             }
@@ -962,7 +975,10 @@ public class DefaultModelBuilder
                     }
                     buffer.append( ": " ).append( e.getMessage() );
 
-                    problems.add( Severity.ERROR, buffer.toString(), dependency.getLocation( "" ), e );
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                            .setMessage( buffer.toString() )
+                            .setLocation( dependency.getLocation( "" ) )
+                            .setException( e ) );
                     continue;
                 }
 
@@ -982,7 +998,7 @@ public class DefaultModelBuilder
                 ModelBuildingResult importResult;
                 try
                 {
-                    importResult = build( importRequest, importIds );
+                    importResult = build( importRequest );
                 }
                 catch ( ModelBuildingException e )
                 {
@@ -1061,4 +1077,32 @@ public class DefaultModelBuilder
             && ( version == null || message.contains( version ) );
     }
 
+    protected boolean hasModelErrors( ModelProblemCollectorExt problems )
+    {
+        if ( problems instanceof DefaultModelProblemCollector )
+        {
+            return ( (DefaultModelProblemCollector) problems ).hasErrors();
+        }
+        else
+        {
+            // the default execution path only knows the DefaultModelProblemCollector,
+            // only reason it's not in signature is because it's package private
+            throw new IllegalStateException();
+        }
+    }
+
+    protected boolean hasFatalErrors( ModelProblemCollectorExt problems )
+    {
+        if ( problems instanceof DefaultModelProblemCollector )
+        {
+            return ( (DefaultModelProblemCollector) problems ).hasFatalErrors();
+        }
+        else
+        {
+            // the default execution path only knows the DefaultModelProblemCollector,
+            // only reason it's not in signature is because it's package private
+            throw new IllegalStateException();
+        }
+    }
+
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
index 4dff1c4..4719b88 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
@@ -109,8 +109,12 @@ public class DefaultModelBuildingRequest
         return this;
     }
 
-    public ModelSource getModelSource()
+    public synchronized ModelSource getModelSource()
     {
+        if ( modelSource == null && pomFile != null )
+        {
+            modelSource = new FileModelSource( pomFile );
+        }
         return modelSource;
     }
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
index f58b00c..0d68aae 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
@@ -46,6 +46,9 @@ public class DefaultModelProblem
 
     private final Severity severity;
 
+    private final Version version;
+
+
     /**
      * Creates a new problem with the specified message and exception.
      * 
@@ -57,10 +60,11 @@ public class DefaultModelProblem
      * @param columnNumber The one-based index of the column containing the error or {@code -1} if unknown.
      * @param exception The exception that caused this problem, may be {@code null}.
      */
-    public DefaultModelProblem( String message, Severity severity, Model source, int lineNumber, int columnNumber,
+    //mkleint: does this need to be public?
+    public DefaultModelProblem( String message, Severity severity, Version version, Model source, int lineNumber, int columnNumber,
                                 Exception exception )
     {
-        this( message, severity, ModelProblemUtils.toPath( source ), lineNumber, columnNumber,
+        this( message, severity, version, ModelProblemUtils.toPath( source ), lineNumber, columnNumber,
               ModelProblemUtils.toId( source ), exception );
     }
 
@@ -70,13 +74,15 @@ public class DefaultModelProblem
      * @param message The message describing the problem, may be {@code null}.
      * @param severity The severity level of the problem, may be {@code null} to default to
      *            {@link ModelProblem.Severity#ERROR}.
+     * @param version The version since the problem is relevant
      * @param source A hint about the source of the problem like a file path, may be {@code null}.
      * @param lineNumber The one-based index of the line containing the problem or {@code -1} if unknown.
      * @param columnNumber The one-based index of the column containing the problem or {@code -1} if unknown.
      * @param modelId The identifier of the model that exhibits the problem, may be {@code null}.
      * @param exception The exception that caused this problem, may be {@code null}.
      */
-    public DefaultModelProblem( String message, Severity severity, String source, int lineNumber, int columnNumber,
+    //mkleint: does this need to be public?
+    public DefaultModelProblem( String message, Severity severity, Version version, String source, int lineNumber, int columnNumber,
                                 String modelId, Exception exception )
     {
         this.message = message;
@@ -86,6 +92,7 @@ public class DefaultModelProblem
         this.columnNumber = columnNumber;
         this.modelId = ( modelId != null ) ? modelId : "";
         this.exception = exception;
+        this.version = version;
     }
 
     public String getSource()
@@ -139,6 +146,12 @@ public class DefaultModelProblem
         return severity;
     }
 
+    public Version getVersion()
+    {
+        return version;
+    }
+    
+
     @Override
     public String toString()
     {
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
index 4791065..114afeb 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
@@ -23,9 +23,7 @@ import java.util.EnumSet;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.maven.model.InputLocation;
 import org.apache.maven.model.Model;
-import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.io.ModelParseException;
 
 /**
@@ -38,7 +36,7 @@ import org.apache.maven.model.io.ModelParseException;
  * @author Benjamin Bentmann
  */
 class DefaultModelProblemCollector
-    implements ModelProblemCollector
+    implements ModelProblemCollectorExt
 {
 
     private final ModelBuildingResult result;
@@ -142,21 +140,21 @@ class DefaultModelProblemCollector
         }
     }
 
-    public void add( Severity severity, String message, InputLocation location, Exception cause )
+    public void add( ModelProblemCollectorRequest req )
     {
         int line = -1;
         int column = -1;
         String source = null;
         String modelId = null;
 
-        if ( location != null )
+        if ( req.getLocation() != null )
         {
-            line = location.getLineNumber();
-            column = location.getColumnNumber();
-            if ( location.getSource() != null )
+            line = req.getLocation().getLineNumber();
+            column = req.getLocation().getColumnNumber();
+            if ( req.getLocation().getSource() != null )
             {
-                modelId = location.getSource().getModelId();
-                source = location.getSource().getLocation();
+                modelId = req.getLocation().getSource().getModelId();
+                source = req.getLocation().getSource().getLocation();
             }
         }
 
@@ -166,14 +164,16 @@ class DefaultModelProblemCollector
             source = getSource();
         }
 
-        if ( line <= 0 && column <= 0 && cause instanceof ModelParseException )
+        if ( line <= 0 && column <= 0 && req.getException() instanceof ModelParseException )
         {
-            ModelParseException e = (ModelParseException) cause;
+            ModelParseException e = (ModelParseException) req.getException();
             line = e.getLineNumber();
             column = e.getColumnNumber();
         }
 
-        ModelProblem problem = new DefaultModelProblem( message, severity, source, line, column, modelId, cause );
+        ModelProblem problem =
+            new DefaultModelProblem( req.getMessage(), req.getSeverity(), req.getVersion(), source, line, column,
+                                     modelId, req.getException() );
 
         add( problem );
     }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java
index f07e850..12c7813 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java
@@ -23,6 +23,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
 
 /**
  * Wraps an ordinary {@link File} as a model source.
@@ -30,10 +31,9 @@ import java.io.InputStream;
  * @author Benjamin Bentmann
  */
 public class FileModelSource
-    implements ModelSource
+    implements ModelSource2
 {
-
-    private File pomFile;
+    private final File pomFile;
 
     /**
      * Creates a new model source backed by the specified file.
@@ -76,4 +76,28 @@ public class FileModelSource
         return getLocation();
     }
 
+    public ModelSource2 getRelatedSource( String relPath )
+    {
+        relPath = relPath.replace( '\\', File.separatorChar ).replace( '/', File.separatorChar );
+
+        File relatedPom = new File( pomFile.getParentFile(), relPath );
+
+        if ( relatedPom.isDirectory() )
+        {
+            // TODO figure out how to reuse ModelLocator.locatePom(File) here
+            relatedPom = new File( relatedPom, "pom.xml" );
+        }
+
+        if ( relatedPom.isFile() && relatedPom.canRead() )
+        {
+            return new FileModelSource( new File( relatedPom.toURI().normalize() ) );
+        }
+
+        return null;
+    }
+
+    public URI getLocationURI()
+    {
+        return pomFile.toURI();
+    }
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCacheTag.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCacheTag.java
index 90c64d6..14cb827 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCacheTag.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCacheTag.java
@@ -83,7 +83,7 @@ interface ModelCacheTag<T>
         public ModelData intoCache( ModelData data )
         {
             Model model = ( data.getModel() != null ) ? data.getModel().clone() : null;
-            return new ModelData( model, data.getGroupId(), data.getArtifactId(), data.getVersion() );
+            return new ModelData( data.getSource(), model, data.getGroupId(), data.getArtifactId(), data.getVersion() );
         }
 
         public ModelData fromCache( ModelData data )
@@ -112,12 +112,12 @@ interface ModelCacheTag<T>
         public DependencyManagement intoCache( DependencyManagement data )
         {
             return ( data != null ) ? data.clone() : null;
-        };
+        }
 
         public DependencyManagement fromCache( DependencyManagement data )
         {
             return intoCache( data );
-        };
+        }
 
     };
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java
index 9a3ceaa..e4c7527 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java
@@ -32,6 +32,7 @@ import org.apache.maven.model.Profile;
  */
 class ModelData
 {
+    private final ModelSource source;
 
     private Model model;
 
@@ -50,8 +51,9 @@ class ModelData
      * 
      * @param model The model to wrap, may be {@code null}.
      */
-    public ModelData( Model model )
+    public ModelData( ModelSource source, Model model )
     {
+        this.source = source;
         this.model = model;
     }
 
@@ -63,14 +65,20 @@ class ModelData
      * @param artifactId The effective artifact identifier of the model, may be {@code null}.
      * @param version The effective version of the model, may be {@code null}.
      */
-    public ModelData( Model model, String groupId, String artifactId, String version )
+    public ModelData( ModelSource source, Model model, String groupId, String artifactId, String version )
     {
+        this.source = source;
         this.model = model;
         setGroupId( groupId );
         setArtifactId( artifactId );
         setVersion( version );
     }
 
+    public ModelSource getSource()
+    {
+        return source;
+    }
+
     /**
      * Gets the model being wrapped.
      * 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java
index d104402..08a1483 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java
@@ -37,10 +37,19 @@ public interface ModelProblem
 
         FATAL, //
         ERROR, //
-        WARNING; //
+        WARNING //
 
     }
 
+    enum Version
+    {
+        //based on ModeBuildingResult.validationLevel
+        BASE,
+        V20,
+        V30,
+        V31
+    }
+
     /**
      * Gets the hint about the source of the problem. While the syntax of this hint is unspecified and depends on the
      * creator of the problem, the general expectation is that the hint provides sufficient information to the user to
@@ -99,4 +108,10 @@ public interface ModelProblem
      */
     Severity getSeverity();
 
+    /**
+     * Gets the applicable maven version/validation level of this problem
+     * @return The version, never {@code null}.
+     */
+    Version getVersion();
+
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java
index 908449b..961d40a 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java
@@ -19,8 +19,6 @@ package org.apache.maven.model.building;
  * under the License.
  */
 
-import org.apache.maven.model.InputLocation;
-
 /**
  * Collects problems that are encountered during model building. The primary purpose of this component is to account for
  * the fact that the problem reporter has/should not have information about the calling context and hence cannot provide
@@ -36,11 +34,8 @@ public interface ModelProblemCollector
     /**
      * Adds the specified problem.
      * 
-     * @param severity The severity of the problem, must not be {@code null}.
-     * @param message The detail message of the problem, may be {@code null}.
-     * @param location The location of the problem, may be {@code null}.
-     * @param cause The cause of the problem, may be {@code null}.
+     * @param req must not be null
      */
-    void add( ModelProblem.Severity severity, String message, InputLocation location, Exception cause );
+    void add( ModelProblemCollectorRequest req );
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorExt.java
similarity index 66%
copy from maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
copy to maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorExt.java
index 6646458..30143c6 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorExt.java
@@ -1,4 +1,4 @@
-package org.apache.maven.eventspy;
+package org.apache.maven.model.building;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,26 +19,19 @@ package org.apache.maven.eventspy;
  * under the License.
  */
 
+import java.util.List;
+
 /**
- * A skeleton eventspy that does nothing other than helping implementors.
+ * Extends the ModelproblemCollector by the capacity of returning the collected problems.
+ * @author Milos Kleint
  */
-public abstract class AbstractEventSpy
-    implements EventSpy
+public interface ModelProblemCollectorExt extends ModelProblemCollector
 {
-
-    public void init( Context context )
-        throws Exception
-    {
-    }
-
-    public void onEvent( Object event )
-        throws Exception
-    {
-    }
-
-    public void close()
-        throws Exception
-    {
-    }
+    
+    /**
+     * The collected problems.
+     * @return a list of model problems encountered, never {@code null}
+     */
+    List<ModelProblem> getProblems();
 
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java
new file mode 100644
index 0000000..60bfdde
--- /dev/null
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java
@@ -0,0 +1,101 @@
+package org.apache.maven.model.building;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.InputLocation;
+import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+
+/**
+ * Class to wrap request parameters to ModelProblemCollector.addProblem
+ *
+ * @author mkleint
+ */
+public final class ModelProblemCollectorRequest
+{
+
+    private final ModelProblem.Severity severity;
+    private final ModelProblem.Version version;
+    private Exception exception;
+    private String message;
+    private InputLocation location;
+    
+    /**
+     * Create a new request with mandatory parameters.
+     * @param severity
+     * @param version 
+     */
+    public ModelProblemCollectorRequest( Severity severity, Version version )
+    {
+        this.severity = severity;
+        this.version = version;
+        if ( severity == null )
+        {
+            throw new IllegalStateException( "No severity declared" );
+        }
+        if ( version == null )
+        {
+            throw new IllegalStateException( "No version declared." );
+        }
+    }
+
+    public Severity getSeverity()
+    {
+        return severity;
+    }
+
+    public Version getVersion()
+    {
+        return version;
+    }
+
+    public Exception getException()
+    {
+        return exception;
+    }
+
+    public ModelProblemCollectorRequest setException( Exception exception )
+    {
+        this.exception = exception;
+        return this;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public ModelProblemCollectorRequest setMessage( String message )
+    {
+        this.message = message;
+        return this;
+    }
+
+    public InputLocation getLocation()
+    {
+        return location;
+    }
+
+    public ModelProblemCollectorRequest setLocation( InputLocation location )
+    {
+        this.location = location;
+        return this;
+    }
+}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource.java
index 5246d79..65ce7ab 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource.java
@@ -24,8 +24,12 @@ import java.io.InputStream;
 
 /**
  * Provides access to the contents of a POM independently of the backing store (e.g. file system, database, memory).
+ * <p>
+ * This interface does not support loading of parent POM(s) from the same backing store, integrators are strongly
+ * encouraged to implement {@link ModelSource2} instead of implementing this interface directly.
  * 
  * @author Benjamin Bentmann
+ * @see ModelSource2
  */
 public interface ModelSource
 {
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource2.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource2.java
new file mode 100644
index 0000000..ea3872b
--- /dev/null
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSource2.java
@@ -0,0 +1,56 @@
+package org.apache.maven.model.building;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.URI;
+
+/**
+ * Provides access to the contents of a POM independently of the backing store (e.g. file system, database, memory).
+ * <p>
+ * Unlike {@link ModelSource}, this interface supports loading of parent POM(s) from the same backing store and allows
+ * construction of MavenProject instances without the need to have parent POM(s) available from local or remote
+ * repositories.
+ * <p>
+ * ModelSource2 instances are cached in {@link ModelBuildingRequest#getModelCache()}. Implementations must guarantee
+ * that the connection to the backing store remains active until request's {@link ModelCache} is discarded or flushed.
+ */
+public interface ModelSource2
+    extends ModelSource
+{
+    /**
+     * Returns model source identified by a path relative to this model source POM. Implementation <strong>MUST</strong>
+     * be able to accept <code>relPath</code> parameter values that
+     * <ul>
+     * <li>use either / or \ file path separator</li>
+     * <li>have .. parent directory references</li>
+     * <li>point either at file or directory, in the latter case POM file name 'pom.xml' needs to be used by the
+     * requested model source.</li>
+     * </ul>
+     * 
+     * @param relPath is the path of the requested model source relative to this model source POM.
+     * @return related model source or <code>null</code> if no such model source.
+     */
+    ModelSource2 getRelatedSource( String relPath );
+
+    /**
+     * Returns location of the POM, never <code>null</code>.
+     */
+    URI getLocationURI();
+}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
index a66be04..01ff9d7 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
@@ -58,12 +58,17 @@ public class DefaultInheritanceAssembler
 
     /**
      * Calculates the relative path from the base directory of the parent to the parent directory of the base directory
-     * of the child. The general idea is to adjust inherited URLs to match the project layout (in SCM). This calculation
-     * is only a heuristic based on our conventions. In detail, the algo relies on the following assumptions. The parent
-     * uses aggregation and refers to the child via the modules section. The module path to the child is considered to
-     * point at the POM rather than its base directory if the path ends with ".xml" (ignoring case). The name of the
-     * child's base directory matches the artifact id of the child. Note that for the sake of independence from the user
-     * environment, the filesystem is intentionally not used for the calculation.
+     * of the child. The general idea is to adjust inherited URLs to match the project layout (in SCM).
+     * 
+     * <p>This calculation is only a heuristic based on our conventions.
+     * In detail, the algo relies on the following assumptions: <ul>
+     * <li>The parent uses aggregation and refers to the child via the modules section</li>
+     * <li>The module path to the child is considered to
+     * point at the POM rather than its base directory if the path ends with ".xml" (ignoring case)</li>
+     * <li>The name of the child's base directory matches the artifact id of the child.</li>
+     * </ul>
+     * Note that for the sake of independence from the user
+     * environment, the filesystem is intentionally not used for the calculation.</p>
      *
      * @param child The child model, must not be <code>null</code>.
      * @param parent The parent model, may be <code>null</code>.
@@ -119,7 +124,7 @@ public class DefaultInheritanceAssembler
         return adjustment;
     }
 
-    private static class InheritanceModelMerger
+    protected static class InheritanceModelMerger
         extends MavenModelMerger
     {
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
index d677d0d..863eb44 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
@@ -45,6 +45,8 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Properties;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 
 /**
  * Use a regular expression search to find and resolve expressions within the POM.
@@ -66,7 +68,7 @@ public abstract class AbstractStringBasedModelInterpolator
      */
     private static final String BUILD_TIMESTAMP_FORMAT_PROPERTY = "maven.build.timestamp.format";
 
-    private static final List<String> PROJECT_PREFIXES = Arrays.asList( new String[]{ "pom.", "project." } );
+    private static final List<String> PROJECT_PREFIXES = Arrays.asList( "pom.", "project." );
 
     private static final Collection<String> TRANSLATED_PATH_EXPRESSIONS;
 
@@ -214,7 +216,7 @@ public abstract class AbstractStringBasedModelInterpolator
                                           List<? extends InterpolationPostProcessor> postProcessors,
                                           ModelProblemCollector problems )
     {
-        if ( src.indexOf( "${" ) < 0 )
+        if ( !src.contains( "${" ) )
         {
             return src;
         }
@@ -241,7 +243,8 @@ public abstract class AbstractStringBasedModelInterpolator
                 }
                 catch ( InterpolationException e )
                 {
-                    problems.add( Severity.ERROR, e.getMessage(), null, e );
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( e.getMessage() ).setException( e ) );
                 }
 
                 interpolator.clearFeedback();
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
index e65eeca..8167baf 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
@@ -23,6 +23,8 @@ import java.util.List;
 
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.codehaus.plexus.interpolation.ValueSource;
 
 /**
@@ -62,7 +64,7 @@ class ProblemDetectingValueSource
             {
                 msg += " Please use ${" + newPrefix + expression.substring( bannedPrefix.length() ) + "} instead.";
             }
-            problems.add( Severity.WARNING, msg, null, null );
+            problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 ).setMessage( msg ) );
         }
 
         return value;
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
index 1f3ada2..2ef7eb1 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
@@ -22,7 +22,9 @@ package org.apache.maven.model.interpolation;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
 import org.apache.maven.model.building.ModelProblemCollector;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.interpolation.InterpolationPostProcessor;
 import org.codehaus.plexus.interpolation.Interpolator;
@@ -47,10 +49,10 @@ public class StringSearchModelInterpolator
     extends AbstractStringBasedModelInterpolator
 {
 
-    private static final Map<Class<?>, Field[]> fieldsByClass =
-            new ConcurrentHashMap<Class<?>, Field[]>( 80, 0.75f, 2 );  // Empirical data from 3.x, actual =40
-    private static final Map<Class<?>, Boolean> fieldIsPrimitiveByClass =
-            new ConcurrentHashMap<Class<?>, Boolean>( 62, 0.75f, 2 ); // Empirical data from 3.x, actual 31
+    private static final Map<Class<?>, InterpolateObjectAction.CacheItem> CACHED_ENTRIES =
+        new ConcurrentHashMap<Class<?>, InterpolateObjectAction.CacheItem>( 80, 0.75f, 2 );
+    // Empirical data from 3.x, actual =40
+
 
     public Model interpolateModel( Model model, File projectDir, ModelBuildingRequest config,
                                    ModelProblemCollector problems )
@@ -66,8 +68,8 @@ public class StringSearchModelInterpolator
         try
         {
             List<? extends ValueSource> valueSources = createValueSources( model, projectDir, config, problems );
-            List<? extends InterpolationPostProcessor> postProcessors = createPostProcessors( model, projectDir,
-                                                                                              config );
+            List<? extends InterpolationPostProcessor> postProcessors =
+                createPostProcessors( model, projectDir, config );
 
             InterpolateObjectAction action =
                 new InterpolateObjectAction( obj, valueSources, postProcessors, this, problems );
@@ -93,9 +95,13 @@ public class StringSearchModelInterpolator
     {
 
         private final LinkedList<Object> interpolationTargets;
+
         private final StringSearchModelInterpolator modelInterpolator;
+
         private final List<? extends ValueSource> valueSources;
+
         private final List<? extends InterpolationPostProcessor> postProcessors;
+
         private final ModelProblemCollector problems;
 
         public InterpolateObjectAction( Object target, List<? extends ValueSource> valueSources,
@@ -126,6 +132,12 @@ public class StringSearchModelInterpolator
             return null;
         }
 
+
+        private String interpolate( String value )
+        {
+            return modelInterpolator.interpolateInternal( value, valueSources, postProcessors, problems );
+        }
+
         private void traverseObjectWithParents( Class<?> cls, Object target )
         {
             if ( cls == null )
@@ -133,263 +145,356 @@ public class StringSearchModelInterpolator
                 return;
             }
 
-            if ( cls.isArray() )
+            CacheItem cacheEntry = getCacheEntry( cls );
+            if ( cacheEntry.isArray() )
+            {
+                evaluateArray( target, this );
+            }
+            else if ( cacheEntry.isQualifiedForInterpolation )
             {
-                evaluateArray( target );
+                cacheEntry.interpolate( target, this );
+
+                traverseObjectWithParents( cls.getSuperclass(), target );
             }
-            else if ( isQualifiedForInterpolation( cls ) )
+        }
+
+
+        private CacheItem getCacheEntry( Class<?> cls )
+        {
+            CacheItem cacheItem = CACHED_ENTRIES.get( cls );
+            if ( cacheItem == null )
             {
-                for ( Field currentField : getFields( cls ) )
+                cacheItem = new CacheItem( cls );
+                CACHED_ENTRIES.put( cls, cacheItem );
+            }
+            return cacheItem;
+        }
+
+        private static void evaluateArray( Object target, InterpolateObjectAction ctx )
+        {
+            int len = Array.getLength( target );
+            for ( int i = 0; i < len; i++ )
+            {
+                Object value = Array.get( target, i );
+                if ( value != null )
                 {
-                    Class<?> type = currentField.getType();
-                    if ( isQualifiedForInterpolation( currentField, type ) )
+                    if ( String.class == value.getClass() )
                     {
-                        synchronized ( currentField )
+                        String interpolated = ctx.interpolate( (String) value );
+
+                        if ( !interpolated.equals( value ) )
                         {
-                            interpolateField( cls, target, currentField, type );
+                            Array.set( target, i, interpolated );
                         }
                     }
+                    else
+                    {
+                        ctx.interpolationTargets.add( value );
+                    }
                 }
-
-                traverseObjectWithParents( cls.getSuperclass(), target );
             }
         }
 
-        private void interpolateField( Class<?> cls, Object target, Field field, Class<?> type )
+        private static class CacheItem
         {
-            boolean isAccessible = field.isAccessible();
-            field.setAccessible( true );
-            try
+            private final boolean isArray;
+
+            private final boolean isQualifiedForInterpolation;
+
+            private final CacheField[] fields;
+
+            private boolean isQualifiedForInterpolation( Class<?> cls )
             {
-                if ( String.class == type )
-                {
-                    interpolateStringField( target, field );
-                }
-                else if ( Collection.class.isAssignableFrom( type ) )
+                return !cls.getName().startsWith( "java" );
+            }
+
+            private boolean isQualifiedForInterpolation( Field field, Class<?> fieldType )
+            {
+                if ( Map.class.equals( fieldType ) && "locations".equals( field.getName() ) )
                 {
-                    interpolateCollectionField( target, field );
+                    return false;
                 }
-                else if ( Map.class.isAssignableFrom( type ) )
+
+                //noinspection SimplifiableIfStatement
+                if ( fieldType.isPrimitive() )
                 {
-                    interpolateMapField( target, field );
+                    return false;
                 }
-                else
+
+                return !"parent".equals( field.getName() );
+            }
+
+            CacheItem( Class clazz )
+            {
+                this.isQualifiedForInterpolation = isQualifiedForInterpolation( clazz );
+                this.isArray = clazz.isArray();
+                List<CacheField> fields = new ArrayList<CacheField>();
+                for ( Field currentField : clazz.getDeclaredFields() )
                 {
-                    Object value = field.get( target );
-                    if ( value != null )
+                    Class<?> type = currentField.getType();
+                    if ( isQualifiedForInterpolation( currentField, type ) )
                     {
-                        if ( field.getType().isArray() )
+                        if ( String.class == type )
+                        {
+                            if ( !Modifier.isFinal( currentField.getModifiers() ) )
+                            {
+                                fields.add( new StringField( currentField ) );
+                            }
+                        }
+                        else if ( List.class.isAssignableFrom( type ) )
+                        {
+                            fields.add( new ListField( currentField ) );
+                        }
+                        else if ( Collection.class.isAssignableFrom( type ) )
+                        {
+                            throw new RuntimeException( "We dont interpolate into collections, use a list instead" );
+                        }
+                        else if ( Map.class.isAssignableFrom( type ) )
                         {
-                            evaluateArray( value );
+                            fields.add( new MapField( currentField ) );
                         }
                         else
                         {
-                            interpolationTargets.add( value );
+                            fields.add( new ObjectField( currentField ) );
                         }
                     }
+
                 }
+                this.fields = fields.toArray( new CacheField[fields.size()] );
+
             }
-            catch ( IllegalArgumentException e )
-            {
-                problems.add( Severity.ERROR, "Failed to interpolate field3: " + field + " on class: " + cls.getName(),
-                              null, e );
-            }
-            catch ( IllegalAccessException e )
-            {
-                problems.add( Severity.ERROR, "Failed to interpolate field4: " + field + " on class: " + cls.getName(),
-                              null, e );
-            }
-            finally
-            {
-                field.setAccessible( isAccessible );
-            }
-        }
 
-        private void interpolateStringField( Object target, Field field )
-            throws IllegalAccessException
-        {
-            String value = (String) field.get( target );
-            if ( value == null || Modifier.isFinal( field.getModifiers() ) )
+            public void interpolate( Object target, InterpolateObjectAction interpolateObjectAction )
             {
-                return;
+                for ( CacheField field : fields )
+                {
+                    field.interpolate( target, interpolateObjectAction );
+                }
             }
 
-            String interpolated =
-                modelInterpolator.interpolateInternal( value, valueSources, postProcessors, problems );
-
-            if ( !interpolated.equals( value ) )
+            public boolean isArray()
             {
-                field.set( target, interpolated );
+                return isArray;
             }
         }
 
-        private void interpolateCollectionField( Object target, Field field )
-            throws IllegalAccessException
+        abstract static class CacheField
         {
-            @SuppressWarnings( "unchecked" )
-            Collection<Object> c = (Collection<Object>) field.get( target );
-            if ( c == null || c.isEmpty() )
-            {
-                return;
-            }
+            protected final Field field;
 
-            List<Object> originalValues = new ArrayList<Object>( c );
-            try
-            {
-                c.clear();
-            }
-            catch ( UnsupportedOperationException e )
+            CacheField( Field field )
             {
-                return;
+                this.field = field;
             }
 
-            for ( Object value : originalValues )
+            void interpolate( Object target, InterpolateObjectAction interpolateObjectAction )
             {
-                if ( value == null )
+                synchronized ( field )
                 {
-                    // add the null back in...not sure what else to do...
-                    c.add( value );
-                }
-                else if ( String.class == value.getClass() )
-                {
-                    String interpolated =
-                        modelInterpolator.interpolateInternal( (String) value, valueSources, postProcessors, problems );
-
-                    if ( !interpolated.equals( value ) )
+                    boolean isAccessible = field.isAccessible();
+                    field.setAccessible( true );
+                    try
                     {
-                        c.add( interpolated );
+                        doInterpolate( target, interpolateObjectAction );
                     }
-                    else
+                    catch ( IllegalArgumentException e )
                     {
-                        c.add( value );
+                        interpolateObjectAction.problems.add(
+                            new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).setMessage(
+                                "Failed to interpolate field3: " + field + " on class: "
+                                    + field.getType().getName() ).setException(
+                                e ) ); // todo: Not entirely the same message
                     }
-                }
-                else
-                {
-                    c.add( value );
-                    if ( value.getClass().isArray() )
+                    catch ( IllegalAccessException e )
                     {
-                        evaluateArray( value );
+                        interpolateObjectAction.problems.add(
+                            new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).setMessage(
+                                "Failed to interpolate field4: " + field + " on class: "
+                                    + field.getType().getName() ).setException( e ) );
                     }
-                    else
+                    finally
                     {
-                        interpolationTargets.add( value );
+                        field.setAccessible( isAccessible );
                     }
                 }
+
+
             }
+
+            abstract void doInterpolate( Object target, InterpolateObjectAction ctx )
+                throws IllegalAccessException;
         }
 
-        private void interpolateMapField( Object target, Field field )
-            throws IllegalAccessException
+        static final class StringField
+            extends CacheField
         {
-            @SuppressWarnings( "unchecked" )
-            Map<Object, Object> m = (Map<Object, Object>) field.get( target );
-            if ( m == null || m.isEmpty() )
+            StringField( Field field )
             {
-                return;
+                super( field );
             }
 
-            for ( Map.Entry<Object, Object> entry : m.entrySet() )
+            @Override
+            void doInterpolate( Object target, InterpolateObjectAction ctx )
+                throws IllegalAccessException
             {
-                Object value = entry.getValue();
-
+                String value = (String) field.get( target );
                 if ( value == null )
                 {
-                    continue;
+                    return;
                 }
 
-                if ( String.class == value.getClass() )
+                String interpolated = ctx.interpolate( value );
+
+                if ( !interpolated.equals( value ) )
                 {
-                    String interpolated =
-                        modelInterpolator.interpolateInternal( (String) value, valueSources, postProcessors, problems );
+                    field.set( target, interpolated );
+                }
+            }
+        }
 
-                    if ( !interpolated.equals( value ) )
+        static final class ListField
+            extends CacheField
+        {
+            ListField( Field field )
+            {
+                super( field );
+            }
+
+            @Override
+            void doInterpolate( Object target, InterpolateObjectAction ctx )
+                throws IllegalAccessException
+            {
+                @SuppressWarnings( "unchecked" ) List<Object> c = (List<Object>) field.get( target );
+                if ( c == null )
+                {
+                    return;
+                }
+
+                int size = c.size();
+                Object value;
+                for ( int i = 0; i < size; i++ )
+                {
+
+                    value = c.get( i );
+
+                    if ( value != null )
                     {
-                        try
+                        if ( String.class == value.getClass() )
                         {
-                            entry.setValue( interpolated );
+                            String interpolated = ctx.interpolate( (String) value );
+
+                            if ( !interpolated.equals( value ) )
+                            {
+                                try
+                                {
+                                    c.set( i, interpolated );
+                                }
+                                catch ( UnsupportedOperationException e )
+                                {
+                                    return;
+                                }
+                            }
                         }
-                        catch ( UnsupportedOperationException e )
+                        else
                         {
-                            continue;
+                            if ( value.getClass().isArray() )
+                            {
+                                evaluateArray( value, ctx );
+                            }
+                            else
+                            {
+                                ctx.interpolationTargets.add( value );
+                            }
                         }
                     }
                 }
-                else if ( value.getClass().isArray() )
-                {
-                    evaluateArray( value );
-                }
-                else
-                {
-                    interpolationTargets.add( value );
-                }
             }
         }
 
-        private Field[] getFields( Class<?> cls )
+        static final class MapField
+            extends CacheField
         {
-            Field[] fields = fieldsByClass.get( cls );
-            if ( fields == null )
+            MapField( Field field )
             {
-                fields = cls.getDeclaredFields();
-                fieldsByClass.put( cls, fields );
+                super( field );
             }
-            return fields;
-        }
-
-        private boolean isQualifiedForInterpolation( Class<?> cls )
-        {
-            return !cls.getName().startsWith( "java" );
-        }
 
-        private boolean isQualifiedForInterpolation( Field field, Class<?> fieldType )
-        {
-            if ( Map.class.equals( fieldType ) && "locations".equals( field.getName() ) )
+            @Override
+            void doInterpolate( Object target, InterpolateObjectAction ctx )
+                throws IllegalAccessException
             {
-                return false;
-            }
+                @SuppressWarnings( "unchecked" ) Map<Object, Object> m = (Map<Object, Object>) field.get( target );
+                if ( m == null || m.isEmpty() )
+                {
+                    return;
+                }
 
-            Boolean primitive = fieldIsPrimitiveByClass.get( fieldType );
-            if ( primitive == null )
-            {
-                primitive = fieldType.isPrimitive();
-                fieldIsPrimitiveByClass.put( fieldType, primitive );
-            }
+                for ( Map.Entry<Object, Object> entry : m.entrySet() )
+                {
+                    Object value = entry.getValue();
 
-            if ( primitive )
-            {
-                return false;
-            }
+                    if ( value == null )
+                    {
+                        continue;
+                    }
 
-            return !"parent".equals( field.getName() );
+                    if ( String.class == value.getClass() )
+                    {
+                        String interpolated = ctx.interpolate( (String) value );
+
+                        if ( !interpolated.equals( value ) )
+                        {
+                            try
+                            {
+                                entry.setValue( interpolated );
+                            }
+                            catch ( UnsupportedOperationException ignore )
+                            {
+                            }
+                        }
+                    }
+                    else if ( value.getClass().isArray() )
+                    {
+                        evaluateArray( value, ctx );
+                    }
+                    else
+                    {
+                        ctx.interpolationTargets.add( value );
+                    }
+                }
+            }
         }
 
-        private void evaluateArray( Object target )
+        static final class ObjectField
+            extends CacheField
         {
-            int len = Array.getLength( target );
-            for ( int i = 0; i < len; i++ )
+            private final boolean isArray;
+
+            ObjectField( Field field )
             {
-                Object value = Array.get( target, i );
+                super( field );
+                this.isArray = field.getType().isArray();
+            }
+
+            @Override
+            void doInterpolate( Object target, InterpolateObjectAction ctx )
+                throws IllegalAccessException
+            {
+                Object value = field.get( target );
                 if ( value != null )
                 {
-                    if ( String.class == value.getClass() )
+                    if ( isArray )
                     {
-                        String interpolated =
-                            modelInterpolator.interpolateInternal( (String) value, valueSources, postProcessors,
-                                                                   problems );
-
-                        if ( !interpolated.equals( value ) )
-                        {
-                            Array.set( target, i, interpolated );
-                        }
+                        evaluateArray( value, ctx );
                     }
                     else
                     {
-                        interpolationTargets.add( value );
+                        ctx.interpolationTargets.add( value );
                     }
                 }
             }
         }
+
     }
 
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
index fbfd4b8..a13dcca 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
@@ -50,7 +50,7 @@ public class DefaultDependencyManagementInjector
         merger.mergeManagedDependencies( model );
     }
 
-    private static class ManagementModelMerger
+    protected static class ManagementModelMerger
         extends MavenModelMerger
     {
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
index 1d5809d..a13d4fd 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
@@ -53,7 +53,7 @@ public class DefaultPluginManagementInjector
         merger.mergeManagedBuildPlugins( model );
     }
 
-    private static class ManagementModelMerger
+    protected static class ManagementModelMerger
         extends MavenModelMerger
     {
 
@@ -131,7 +131,6 @@ public class DefaultPluginManagementInjector
                 target.setExecutions( new ArrayList<PluginExecution>( merged.values() ) );
             }
         }
-
     }
 
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
index 4b41858..0c35033 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
@@ -52,7 +52,8 @@ import org.apache.maven.model.Scm;
 import org.apache.maven.model.Site;
 
 /**
- * The domain-specific model merger for the Maven POM.
+ * The domain-specific model merger for the Maven POM, overriding generic code from parent class when necessary with
+ * more adapted algorithms.
  *
  * @author Benjamin Bentmann
  */
@@ -251,7 +252,7 @@ public class MavenModelMerger
             merged.addAll( tgt );
             for ( int i = 0, n = tgt.size(); i < n; i++ )
             {
-                indices.add( Integer.valueOf( i ) );
+                indices.add( i );
             }
             for ( int i = 0, n = src.size(); i < n; i++ )
             {
@@ -259,7 +260,7 @@ public class MavenModelMerger
                 if ( !excludes.contains( s ) )
                 {
                     merged.add( s );
-                    indices.add( Integer.valueOf( ~i ) );
+                    indices.add( ~i );
                 }
             }
             target.setModules( merged );
@@ -313,6 +314,46 @@ public class MavenModelMerger
         }
     }
 
+    protected void mergeModelBase_PluginRepositories( ModelBase target, ModelBase source, boolean sourceDominant,
+                                                      Map<Object, Object> context )
+    {
+        List<Repository> src = source.getPluginRepositories();
+        if ( !src.isEmpty() )
+        {
+            List<Repository> tgt = target.getPluginRepositories();
+            Map<Object, Repository> merged = new LinkedHashMap<Object, Repository>( ( src.size() + tgt.size() ) * 2 );
+
+            List<Repository> dominant, recessive;
+            if ( sourceDominant )
+            {
+                dominant = src;
+                recessive = tgt;
+            }
+            else
+            {
+                dominant = tgt;
+                recessive = src;
+            }
+
+            for ( Repository element : dominant )
+            {
+                Object key = getRepositoryKey( element );
+                merged.put( key, element );
+            }
+
+            for ( Repository element : recessive )
+            {
+                Object key = getRepositoryKey( element );
+                if ( !merged.containsKey( key ) )
+                {
+                    merged.put( key, element );
+                }
+            }
+
+            target.setPluginRepositories( new ArrayList<Repository>( merged.values() ) );
+        }
+    }
+
     /*
      * TODO: Whether duplicates should be removed looks like an option for the generated merger.
      */
@@ -591,45 +632,45 @@ public class MavenModelMerger
     }
 
     @Override
-    protected Object getPluginKey( Plugin object )
+    protected Object getPluginKey( Plugin plugin )
     {
-        return object.getKey();
+        return plugin.getKey();
     }
 
     @Override
-    protected Object getPluginExecutionKey( PluginExecution object )
+    protected Object getPluginExecutionKey( PluginExecution pluginExecution )
     {
-        return object.getId();
+        return pluginExecution.getId();
     }
 
     @Override
-    protected Object getReportPluginKey( ReportPlugin object )
+    protected Object getReportPluginKey( ReportPlugin reportPlugin )
     {
-        return object.getKey();
+        return reportPlugin.getKey();
     }
 
     @Override
-    protected Object getReportSetKey( ReportSet object )
+    protected Object getReportSetKey( ReportSet reportSet )
     {
-        return object.getId();
+        return reportSet.getId();
     }
 
     @Override
-    protected Object getRepositoryBaseKey( RepositoryBase object )
+    protected Object getRepositoryBaseKey( RepositoryBase repositoryBase )
     {
-        return object.getId();
+        return repositoryBase.getId();
     }
 
     @Override
-    protected Object getExtensionKey( Extension object )
+    protected Object getExtensionKey( Extension extension )
     {
-        return object.getGroupId() + ':' + object.getArtifactId();
+        return extension.getGroupId() + ':' + extension.getArtifactId();
     }
 
     @Override
-    protected Object getExclusionKey( Exclusion object )
+    protected Object getExclusionKey( Exclusion exclusion )
     {
-        return object.getGroupId() + ':' + object.getArtifactId();
+        return exclusion.getGroupId() + ':' + exclusion.getArtifactId();
     }
 
     private String appendPath( String parentPath, Map<Object, Object> context )
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
index df7ae5b..9163286 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
@@ -93,7 +93,7 @@ public class DefaultModelNormalizer
         }
     }
 
-    private static class DuplicateMerger
+    protected static class DuplicateMerger
         extends MavenModelMerger
     {
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
index a241c51..7079f88 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
@@ -28,7 +28,6 @@ import org.apache.maven.model.ReportSet;
 import org.apache.maven.model.Reporting;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblemCollector;
-import org.apache.maven.model.building.ModelProblem.Severity;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
@@ -101,14 +100,15 @@ public class DefaultReportingConverter
 
         boolean hasMavenProjectInfoReportsPlugin = false;
 
+        /* waiting for MSITE-484 before deprecating <reporting> section
         if ( !reporting.getPlugins().isEmpty()
             && request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 )
         {
 
-            problems.add( Severity.WARNING, "The <reporting> section is deprecated"
-                + ", please move the reports to the <configuration> section of the new Maven Site Plugin.",
-                          reporting.getLocation( "" ), null );
-        }
+            problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V31 )
+                    .setMessage( "The <reporting> section is deprecated, please move the reports to the <configuration> section of the new Maven Site Plugin." )
+                    .setLocation( reporting.getLocation( "" ) ) );
+        }*/
 
         for ( ReportPlugin plugin : reporting.getPlugins() )
         {
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java
index 7258b8b..4fd0825 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java
@@ -21,13 +21,15 @@ package org.apache.maven.model.profile;
 
 import java.io.File;
 import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
 /**
  * Describes the environmental context used to determine the activation status of profiles.
- * 
+ *
  * @author Benjamin Bentmann
  */
 public class DefaultProfileActivationContext
@@ -42,6 +44,8 @@ public class DefaultProfileActivationContext
 
     private Map<String, String> userProperties = Collections.emptyMap();
 
+    private Map<String, String> projectProperties = Collections.emptyMap();
+
     private File projectDirectory;
 
     public List<String> getActiveProfileIds()
@@ -51,7 +55,7 @@ public class DefaultProfileActivationContext
 
     /**
      * Sets the identifiers of those profiles that should be activated by explicit demand.
-     * 
+     *
      * @param activeProfileIds The identifiers of those profiles to activate, may be {@code null}.
      * @return This context, never {@code null}.
      */
@@ -76,7 +80,7 @@ public class DefaultProfileActivationContext
 
     /**
      * Sets the identifiers of those profiles that should be deactivated by explicit demand.
-     * 
+     *
      * @param inactiveProfileIds The identifiers of those profiles to deactivate, may be {@code null}.
      * @return This context, never {@code null}.
      */
@@ -102,7 +106,7 @@ public class DefaultProfileActivationContext
     /**
      * Sets the system properties to use for interpolation and profile activation. The system properties are collected
      * from the runtime environment like {@link System#getProperties()} and environment variables.
-     * 
+     *
      * @param systemProperties The system properties, may be {@code null}.
      * @return This context, never {@code null}.
      */
@@ -124,7 +128,7 @@ public class DefaultProfileActivationContext
     /**
      * Sets the system properties to use for interpolation and profile activation. The system properties are collected
      * from the runtime environment like {@link System#getProperties()} and environment variables.
-     * 
+     *
      * @param systemProperties The system properties, may be {@code null}.
      * @return This context, never {@code null}.
      */
@@ -151,7 +155,7 @@ public class DefaultProfileActivationContext
      * Sets the user properties to use for interpolation and profile activation. The user properties have been
      * configured directly by the user on his discretion, e.g. via the {@code -Dkey=value} parameter on the command
      * line.
-     * 
+     *
      * @param userProperties The user properties, may be {@code null}.
      * @return This context, never {@code null}.
      */
@@ -174,7 +178,7 @@ public class DefaultProfileActivationContext
      * Sets the user properties to use for interpolation and profile activation. The user properties have been
      * configured directly by the user on his discretion, e.g. via the {@code -Dkey=value} parameter on the command
      * line.
-     * 
+     *
      * @param userProperties The user properties, may be {@code null}.
      * @return This context, never {@code null}.
      */
@@ -199,9 +203,9 @@ public class DefaultProfileActivationContext
 
     /**
      * Sets the base directory of the current project.
-     * 
+     *
      * @param projectDirectory The base directory of the current project, may be {@code null} if profile activation
-     *            happens in the context of metadata retrieval rather than project building.
+     *                         happens in the context of metadata retrieval rather than project building.
      * @return This context, never {@code null}.
      */
     public DefaultProfileActivationContext setProjectDirectory( File projectDirectory )
@@ -211,4 +215,39 @@ public class DefaultProfileActivationContext
         return this;
     }
 
+    public Map<String, String> getProjectProperties()
+    {
+        return projectProperties;
+    }
+
+    public DefaultProfileActivationContext setProjectProperties( Properties projectProperties )
+    {
+        if ( projectProperties != null )
+        {
+
+            this.projectProperties = Collections.unmodifiableMap( toMap( projectProperties ) );
+        }
+        else
+        {
+            this.projectProperties = Collections.emptyMap();
+        }
+
+        return this;
+    }
+
+    private Map<String, String> toMap( Properties properties )
+    {
+        if ( properties == null )
+        {
+            return Collections.emptyMap();
+        }
+        Map<String, String> map = new HashMap<String, String>();
+        Enumeration keys = properties.keys();
+        while ( keys.hasMoreElements() )
+        {
+            String key = (String) keys.nextElement();
+            map.put( key, properties.getProperty( key ) );
+        }
+        return map;
+    }
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
index b7c8b19..38421bc 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
@@ -71,7 +71,7 @@ public class DefaultProfileInjector
         }
     }
 
-    private static class ProfileModelMerger
+    protected static class ProfileModelMerger
         extends MavenModelMerger
     {
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java
index bf3a8b6..c376c99 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java
@@ -28,6 +28,8 @@ import org.apache.maven.model.Activation;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.profile.activation.ProfileActivator;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
@@ -113,8 +115,10 @@ public class DefaultProfileSelector
             }
             catch ( RuntimeException e )
             {
-                problems.add( Severity.ERROR, "Failed to determine activation for profile " + profile.getId(),
-                              profile.getLocation( "" ), e );
+                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                        .setMessage( "Failed to determine activation for profile " + profile.getId() )
+                        .setLocation( profile.getLocation( "" ) )
+                        .setException( e ) );
                 return false;
             }
         }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileActivationContext.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileActivationContext.java
index 63540f2..fb9ea0c 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileActivationContext.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileActivationContext.java
@@ -69,4 +69,11 @@ public interface ProfileActivationContext
      */
     File getProjectDirectory();
 
+    /**
+     * Gets current calculated project properties
+     *
+     * @return The project properties, never {@code null}.
+     */
+    Map<String, String> getProjectProperties();
+
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
index e999ce4..bcad941 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
@@ -26,6 +26,8 @@ import org.apache.maven.model.ActivationFile;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.path.PathTranslator;
 import org.apache.maven.model.profile.ProfileActivationContext;
 import org.codehaus.plexus.component.annotations.Component;
@@ -39,6 +41,7 @@ import org.codehaus.plexus.util.StringUtils;
  * Determines profile activation based on the existence/absence of some file.
  * 
  * @author Benjamin Bentmann
+ * @see ActivationFile
  */
 @Component( role = ProfileActivator.class, hint = "file" )
 public class FileProfileActivator
@@ -110,11 +113,13 @@ public class FileProfileActivator
                 }
             } );
         }
-        else if ( path.indexOf( "${basedir}" ) >= 0 )
+        else if ( path.contains( "${basedir}" ) )
         {
             return false;
         }
 
+        interpolator.addValueSource( new MapBasedValueSource( context.getProjectProperties() ) );
+
         interpolator.addValueSource( new MapBasedValueSource( context.getUserProperties() ) );
 
         interpolator.addValueSource( new MapBasedValueSource( context.getSystemProperties() ) );
@@ -125,8 +130,10 @@ public class FileProfileActivator
         }
         catch ( Exception e )
         {
-            problems.add( Severity.ERROR, "Failed to interpolate file location " + path + " for profile "
-                + profile.getId() + ": " + e.getMessage(), file.getLocation( missing ? "missing" : "exists" ), e );
+            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                    .setMessage( "Failed to interpolate file location " + path + " for profile " + profile.getId() + ": " + e.getMessage() )
+                    .setLocation( file.getLocation( missing ? "missing" : "exists" ) )
+                    .setException( e ) );
             return false;
         }
 
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java
index f6743f6..62b6cfb 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java
@@ -27,6 +27,8 @@ import org.apache.maven.model.Activation;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.profile.ProfileActivationContext;
 import org.codehaus.plexus.component.annotations.Component;
 
@@ -34,6 +36,7 @@ import org.codehaus.plexus.component.annotations.Component;
  * Determines profile activation based on the version of the current Java runtime.
  * 
  * @author Benjamin Bentmann
+ * @see Activation#getJdk()
  */
 @Component( role = ProfileActivator.class, hint = "jdk-version" )
 public class JdkVersionProfileActivator
@@ -42,41 +45,42 @@ public class JdkVersionProfileActivator
 
     public boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems )
     {
-        boolean active = false;
-
         Activation activation = profile.getActivation();
 
-        if ( activation != null )
+        if ( activation == null )
         {
-            String jdk = activation.getJdk();
+            return false;
+        }
 
-            if ( jdk != null )
-            {
-                String version = context.getSystemProperties().get( "java.version" );
-
-                if ( version == null || version.length() <= 0 )
-                {
-                    problems.add( Severity.ERROR, "Failed to determine Java version for profile " + profile.getId(),
-                                  activation.getLocation( "jdk" ), null );
-                    return false;
-                }
-
-                if ( jdk.startsWith( "!" ) )
-                {
-                    active = !version.startsWith( jdk.substring( 1 ) );
-                }
-                else if ( isRange( jdk ) )
-                {
-                    active = isInRange( version, getRange( jdk ) );
-                }
-                else
-                {
-                    active = version.startsWith( jdk );
-                }
-            }
+        String jdk = activation.getJdk();
+
+        if ( jdk == null )
+        {
+            return false;
         }
 
-        return active;
+        String version = context.getSystemProperties().get( "java.version" );
+
+        if ( version == null || version.length() <= 0 )
+        {
+            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                    .setMessage( "Failed to determine Java version for profile " + profile.getId() )
+                    .setLocation( activation.getLocation( "jdk" ) ) );
+            return false;
+        }
+
+        if ( jdk.startsWith( "!" ) )
+        {
+            return !version.startsWith( jdk.substring( 1 ) );
+        }
+        else if ( isRange( jdk ) )
+        {
+            return isInRange( version, getRange( jdk ) );
+        }
+        else
+        {
+            return version.startsWith( jdk );
+        }
     }
 
     private static boolean isInRange( String value, List<RangeValue> range )
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java
index d1c507a..94d380c 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java
@@ -31,6 +31,7 @@ import org.codehaus.plexus.util.Os;
  * Determines profile activation based on the operating system of the current runtime platform.
  * 
  * @author Benjamin Bentmann
+ * @see ActivationOS
  */
 @Component( role = ProfileActivator.class, hint = "os" )
 public class OperatingSystemProfileActivator
@@ -39,35 +40,37 @@ public class OperatingSystemProfileActivator
 
     public boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems )
     {
-        boolean active = false;
-
         Activation activation = profile.getActivation();
 
-        if ( activation != null )
+        if ( activation == null )
+        {
+            return false;
+        }
+
+        ActivationOS os = activation.getOs();
+
+        if ( os == null )
+        {
+            return false;
+        }
+
+        boolean active = ensureAtLeastOneNonNull( os );
+
+        if ( active && os.getFamily() != null )
+        {
+            active = determineFamilyMatch( os.getFamily() );
+        }
+        if ( active && os.getName() != null )
+        {
+            active = determineNameMatch( os.getName() );
+        }
+        if ( active && os.getArch() != null )
+        {
+            active = determineArchMatch( os.getArch() );
+        }
+        if ( active && os.getVersion() != null )
         {
-            ActivationOS os = activation.getOs();
-
-            if ( os != null )
-            {
-                active = ensureAtLeastOneNonNull( os );
-
-                if ( active && os.getFamily() != null )
-                {
-                    active = determineFamilyMatch( os.getFamily() );
-                }
-                if ( active && os.getName() != null )
-                {
-                    active = determineNameMatch( os.getName() );
-                }
-                if ( active && os.getArch() != null )
-                {
-                    active = determineArchMatch( os.getArch() );
-                }
-                if ( active && os.getVersion() != null )
-                {
-                    active = determineVersionMatch( os.getVersion() );
-                }
-            }
+            active = determineVersionMatch( os.getVersion() );
         }
 
         return active;
@@ -91,14 +94,7 @@ public class OperatingSystemProfileActivator
 
         boolean result = Os.isVersion( test );
 
-        if ( reverse )
-        {
-            return !result;
-        }
-        else
-        {
-            return result;
-        }
+        return reverse ? !result : result;
     }
 
     private boolean determineArchMatch( String arch )
@@ -114,14 +110,7 @@ public class OperatingSystemProfileActivator
 
         boolean result = Os.isArch( test );
 
-        if ( reverse )
-        {
-            return !result;
-        }
-        else
-        {
-            return result;
-        }
+        return reverse ? !result : result;
     }
 
     private boolean determineNameMatch( String name )
@@ -137,14 +126,7 @@ public class OperatingSystemProfileActivator
 
         boolean result = Os.isName( test );
 
-        if ( reverse )
-        {
-            return !result;
-        }
-        else
-        {
-            return result;
-        }
+        return reverse ? !result : result;
     }
 
     private boolean determineFamilyMatch( String family )
@@ -160,14 +142,7 @@ public class OperatingSystemProfileActivator
 
         boolean result = Os.isFamily( test );
 
-        if ( reverse )
-        {
-            return !result;
-        }
-        else
-        {
-            return result;
-        }
+        return reverse ? !result : result;
     }
 
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java
index 242e665..374647f 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java
@@ -24,6 +24,8 @@ import org.apache.maven.model.ActivationProperty;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.profile.ProfileActivationContext;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.StringUtils;
@@ -32,6 +34,7 @@ import org.codehaus.plexus.util.StringUtils;
  * Determines profile activation based on the existence or value of some execution property.
  * 
  * @author Benjamin Bentmann
+ * @see ActivationProperty
  */
 @Component( role = ProfileActivator.class, hint = "property" )
 public class PropertyProfileActivator
@@ -40,77 +43,64 @@ public class PropertyProfileActivator
 
     public boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems )
     {
-        boolean active = false;
-
         Activation activation = profile.getActivation();
 
-        if ( activation != null )
+        if ( activation == null )
+        {
+            return false;
+        }
+
+        ActivationProperty property = activation.getProperty();
+
+        if ( property == null )
         {
-            ActivationProperty property = activation.getProperty();
+            return false;
+        }
 
-            if ( property != null )
+        String name = property.getName();
+        boolean reverseName = false;
+
+        if ( name != null && name.startsWith( "!" ) )
+        {
+            reverseName = true;
+            name = name.substring( 1 );
+        }
+
+        if ( name == null || name.length() <= 0 )
+        {
+            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                    .setMessage( "The property name is required to activate the profile " + profile.getId() )
+                    .setLocation( property.getLocation( "" ) ) );
+            return false;
+        }
+
+        String sysValue = context.getUserProperties().get( name );
+        if ( sysValue == null )
+        {
+            sysValue = context.getSystemProperties().get( name );
+        }
+
+        String propValue = property.getValue();
+        if ( StringUtils.isNotEmpty( propValue ) )
+        {
+            boolean reverseValue = false;
+            if ( propValue.startsWith( "!" ) )
             {
-                String name = property.getName();
-                boolean reverseName = false;
-
-                if ( name != null && name.startsWith( "!" ) )
-                {
-                    reverseName = true;
-                    name = name.substring( 1 );
-                }
-
-                if ( name == null || name.length() <= 0 )
-                {
-                    problems.add( Severity.ERROR, "The property name is required to activate the profile "
-                        + profile.getId(), property.getLocation( "" ), null );
-                    return false;
-                }
-
-                String sysValue = context.getUserProperties().get( name );
-                if ( sysValue == null )
-                {
-                    sysValue = context.getSystemProperties().get( name );
-                }
-
-                String propValue = property.getValue();
-                if ( StringUtils.isNotEmpty( propValue ) )
-                {
-                    boolean reverseValue = false;
-                    if ( propValue.startsWith( "!" ) )
-                    {
-                        reverseValue = true;
-                        propValue = propValue.substring( 1 );
-                    }
-
-                    // we have a value, so it has to match the system value...
-                    boolean result = propValue.equals( sysValue );
-
-                    if ( reverseValue )
-                    {
-                        active = !result;
-                    }
-                    else
-                    {
-                        active = result;
-                    }
-                }
-                else
-                {
-                    boolean result = StringUtils.isNotEmpty( sysValue );
-
-                    if ( reverseName )
-                    {
-                        active = !result;
-                    }
-                    else
-                    {
-                        active = result;
-                    }
-                }
+                reverseValue = true;
+                propValue = propValue.substring( 1 );
             }
+
+            // we have a value, so it has to match the system value...
+            boolean result = propValue.equals( sysValue );
+
+            return reverseValue ? !result : result;
         }
+        else
+        {
+            boolean result = StringUtils.isNotEmpty( sysValue );
 
-        return active;
+            return reverseName ? !result : result;
+        }
     }
 
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index d7a6ac9..67d255f 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -26,6 +26,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.regex.Pattern;
 
 import org.apache.maven.model.Build;
 import org.apache.maven.model.BuildBase;
@@ -47,7 +48,9 @@ import org.apache.maven.model.Repository;
 import org.apache.maven.model.Resource;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.building.ModelProblem.Version;
 import org.apache.maven.model.building.ModelProblemCollector;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -59,7 +62,7 @@ public class DefaultModelValidator
     implements ModelValidator
 {
 
-    private static final String ID_REGEX = "[A-Za-z0-9_\\-.]+";
+    private static final Pattern ID_REGEX = Pattern.compile( "[A-Za-z0-9_\\-.]+" );
 
     private static final String ILLEGAL_FS_CHARS = "\\/:\"<>|?*";
 
@@ -72,16 +75,16 @@ public class DefaultModelValidator
         Parent parent = model.getParent();
         if ( parent != null )
         {
-            validateStringNotEmpty( "parent.groupId", problems, Severity.FATAL, parent.getGroupId(), parent );
+            validateStringNotEmpty( "parent.groupId", problems, Severity.FATAL, Version.BASE, parent.getGroupId(), parent );
 
-            validateStringNotEmpty( "parent.artifactId", problems, Severity.FATAL, parent.getArtifactId(), parent );
+            validateStringNotEmpty( "parent.artifactId", problems, Severity.FATAL, Version.BASE, parent.getArtifactId(), parent );
 
-            validateStringNotEmpty( "parent.version", problems, Severity.FATAL, parent.getVersion(), parent );
+            validateStringNotEmpty( "parent.version", problems, Severity.FATAL, Version.BASE, parent.getVersion(), parent );
 
             if ( equals( parent.getGroupId(), model.getGroupId() )
                 && equals( parent.getArtifactId(), model.getArtifactId() ) )
             {
-                addViolation( problems, Severity.FATAL, "parent.artifactId", null, "must be changed"
+                addViolation( problems, Severity.FATAL, Version.BASE, "parent.artifactId", null, "must be changed"
                     + ", the parent element cannot have the same groupId:artifactId as the project.", parent );
             }
         }
@@ -90,45 +93,45 @@ public class DefaultModelValidator
         {
             Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
-            validateEnum( "modelVersion", problems, Severity.ERROR, model.getModelVersion(), null, model, "4.0.0" );
+            validateEnum( "modelVersion", problems, Severity.ERROR, Version.V20, model.getModelVersion(), null, model, "4.0.0" );
 
-            validateStringNoExpression( "groupId", problems, Severity.WARNING, model.getGroupId(), model );
+            validateStringNoExpression( "groupId", problems, Severity.WARNING, Version.V20, model.getGroupId(), model );
             if ( parent == null )
             {
-                validateStringNotEmpty( "groupId", problems, Severity.FATAL, model.getGroupId(), model );
+                validateStringNotEmpty( "groupId", problems, Severity.FATAL, Version.V20, model.getGroupId(), model );
             }
 
-            validateStringNoExpression( "artifactId", problems, Severity.WARNING, model.getArtifactId(), model );
-            validateStringNotEmpty( "artifactId", problems, Severity.FATAL, model.getArtifactId(), model );
+            validateStringNoExpression( "artifactId", problems, Severity.WARNING, Version.V20, model.getArtifactId(), model );
+            validateStringNotEmpty( "artifactId", problems, Severity.FATAL, Version.V20, model.getArtifactId(), model );
 
-            validateStringNoExpression( "version", problems, Severity.WARNING, model.getVersion(), model );
+            validateStringNoExpression( "version", problems, Severity.WARNING, Version.V20, model.getVersion(), model );
             if ( parent == null )
             {
-                validateStringNotEmpty( "version", problems, Severity.FATAL, model.getVersion(), model );
+                validateStringNotEmpty( "version", problems, Severity.FATAL, Version.V20, model.getVersion(), model );
             }
 
-            validateRawDependencies( problems, model.getDependencies(), "dependencies.dependency", request );
+            validate20RawDependencies( problems, model.getDependencies(), "dependencies.dependency", request );
 
             if ( model.getDependencyManagement() != null )
             {
-                validateRawDependencies( problems, model.getDependencyManagement().getDependencies(),
+                validate20RawDependencies( problems, model.getDependencyManagement().getDependencies(),
                                       "dependencyManagement.dependencies.dependency", request );
             }
 
-            validateRepositories( problems, model.getRepositories(), "repositories.repository", request );
+            validateRawRepositories( problems, model.getRepositories(), "repositories.repository", request );
 
-            validateRepositories( problems, model.getPluginRepositories(), "pluginRepositories.pluginRepository",
+            validateRawRepositories( problems, model.getPluginRepositories(), "pluginRepositories.pluginRepository",
                                   request );
 
             Build build = model.getBuild();
             if ( build != null )
             {
-                validateRawPlugins( problems, build.getPlugins(), "build.plugins.plugin", request );
+                validate20RawPlugins( problems, build.getPlugins(), "build.plugins.plugin", request );
 
                 PluginManagement mngt = build.getPluginManagement();
                 if ( mngt != null )
                 {
-                    validateRawPlugins( problems, mngt.getPlugins(), "build.pluginManagement.plugins.plugin",
+                    validate20RawPlugins( problems, mngt.getPlugins(), "build.pluginManagement.plugins.plugin",
                                         request );
                 }
             }
@@ -141,34 +144,34 @@ public class DefaultModelValidator
 
                 if ( !profileIds.add( profile.getId() ) )
                 {
-                    addViolation( problems, errOn30, "profiles.profile.id", null,
+                    addViolation( problems, errOn30, Version.V20, "profiles.profile.id", null,
                                   "must be unique but found duplicate profile with id " + profile.getId(), profile );
                 }
 
-                validateRawDependencies( problems, profile.getDependencies(), prefix + ".dependencies.dependency",
+                validate20RawDependencies( problems, profile.getDependencies(), prefix + ".dependencies.dependency",
                                          request );
 
                 if ( profile.getDependencyManagement() != null )
                 {
-                    validateRawDependencies( problems, profile.getDependencyManagement().getDependencies(), prefix
+                    validate20RawDependencies( problems, profile.getDependencyManagement().getDependencies(), prefix
                         + ".dependencyManagement.dependencies.dependency", request );
                 }
 
-                validateRepositories( problems, profile.getRepositories(), prefix + ".repositories.repository",
+                validateRawRepositories( problems, profile.getRepositories(), prefix + ".repositories.repository",
                                       request );
 
-                validateRepositories( problems, profile.getPluginRepositories(), prefix
+                validateRawRepositories( problems, profile.getPluginRepositories(), prefix
                     + ".pluginRepositories.pluginRepository", request );
 
                 BuildBase buildBase = profile.getBuild();
                 if ( buildBase != null )
                 {
-                    validateRawPlugins( problems, buildBase.getPlugins(), prefix + ".plugins.plugin", request );
+                    validate20RawPlugins( problems, buildBase.getPlugins(), prefix + ".plugins.plugin", request );
 
                     PluginManagement mngt = buildBase.getPluginManagement();
                     if ( mngt != null )
                     {
-                        validateRawPlugins( problems, mngt.getPlugins(), prefix + ".pluginManagement.plugins.plugin",
+                        validate20RawPlugins( problems, mngt.getPlugins(), prefix + ".pluginManagement.plugins.plugin",
                                             request );
                     }
                 }
@@ -176,7 +179,7 @@ public class DefaultModelValidator
         }
     }
 
-    private void validateRawPlugins( ModelProblemCollector problems, List<Plugin> plugins, String prefix,
+    private void validate20RawPlugins( ModelProblemCollector problems, List<Plugin> plugins, String prefix,
                                      ModelBuildingRequest request )
     {
         Severity errOn31 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
@@ -191,7 +194,7 @@ public class DefaultModelValidator
 
             if ( existing != null )
             {
-                addViolation( problems, errOn31, prefix + ".(groupId:artifactId)", null,
+                addViolation( problems, errOn31, Version.V20, prefix + ".(groupId:artifactId)", null,
                               "must be unique but found duplicate declaration of plugin " + key, plugin );
             }
             else
@@ -205,7 +208,7 @@ public class DefaultModelValidator
             {
                 if ( !executionIds.add( exec.getId() ) )
                 {
-                    addViolation( problems, Severity.ERROR, prefix + "[" + plugin.getKey()
+                    addViolation( problems, Severity.ERROR, Version.V20, prefix + "[" + plugin.getKey()
                         + "].executions.execution.id", null, "must be unique but found duplicate execution with id "
                         + exec.getId(), exec );
                 }
@@ -215,20 +218,21 @@ public class DefaultModelValidator
 
     public void validateEffectiveModel( Model model, ModelBuildingRequest request, ModelProblemCollector problems )
     {
-        validateStringNotEmpty( "modelVersion", problems, Severity.ERROR, model.getModelVersion(), model );
+        validateStringNotEmpty( "modelVersion", problems, Severity.ERROR, Version.BASE, model.getModelVersion(), model );
 
         validateId( "groupId", problems, model.getGroupId(), model );
 
         validateId( "artifactId", problems, model.getArtifactId(), model );
 
-        validateStringNotEmpty( "packaging", problems, Severity.ERROR, model.getPackaging(), model );
+        validateStringNotEmpty( "packaging", problems, Severity.ERROR, Version.BASE, model.getPackaging(), model );
 
         if ( !model.getModules().isEmpty() )
         {
             if ( !"pom".equals( model.getPackaging() ) )
             {
-                addViolation( problems, Severity.ERROR, "packaging", null, "with value '" + model.getPackaging()
-                    + "' is invalid. Aggregator projects " + "require 'pom' as packaging.", model );
+                addViolation( problems, Severity.ERROR, Version.BASE, "packaging", null,
+                              "with value '" + model.getPackaging() + "' is invalid. Aggregator projects "
+                                  + "require 'pom' as packaging.", model );
             }
 
             for ( int i = 0, n = model.getModules().size(); i < n; i++ )
@@ -236,14 +240,14 @@ public class DefaultModelValidator
                 String module = model.getModules().get( i );
                 if ( StringUtils.isBlank( module ) )
                 {
-                    addViolation( problems, Severity.WARNING, "modules.module[" + i + "]", null,
+                    addViolation( problems, Severity.WARNING, Version.BASE, "modules.module[" + i + "]", null,
                                   "has been specified without a path to the project directory.",
                                   model.getLocation( "modules" ) );
                 }
             }
         }
 
-        validateStringNotEmpty( "version", problems, Severity.ERROR, model.getVersion(), model );
+        validateStringNotEmpty( "version", problems, Severity.ERROR, Version.BASE, model.getVersion(), model );
 
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
@@ -263,43 +267,43 @@ public class DefaultModelValidator
                 String module = model.getModules().get( i );
                 if ( !modules.add( module ) )
                 {
-                    addViolation( problems, Severity.ERROR, "modules.module[" + i + "]", null,
+                    addViolation( problems, Severity.ERROR, Version.V20, "modules.module[" + i + "]", null,
                                   "specifies duplicate child module " + module, model.getLocation( "modules" ) );
                 }
             }
 
             Severity errOn31 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
 
-            validateBannedCharacters( "version", problems, errOn31, model.getVersion(), null, model,
+            validateBannedCharacters( "version", problems, errOn31, Version.V20, model.getVersion(), null, model,
                                       ILLEGAL_VERSION_CHARS );
-            validateProperSnapshotVersion( "version", problems, errOn31, model.getVersion(), null, model );
+            validate20ProperSnapshotVersion( "version", problems, errOn31, Version.V20, model.getVersion(), null, model );
 
             Build build = model.getBuild();
             if ( build != null )
             {
                 for ( Plugin p : build.getPlugins() )
                 {
-                    validateStringNotEmpty( "build.plugins.plugin.artifactId", problems, Severity.ERROR,
+                    validateStringNotEmpty( "build.plugins.plugin.artifactId", problems, Severity.ERROR, Version.V20,
                                             p.getArtifactId(), p );
 
-                    validateStringNotEmpty( "build.plugins.plugin.groupId", problems, Severity.ERROR, p.getGroupId(),
+                    validateStringNotEmpty( "build.plugins.plugin.groupId", problems, Severity.ERROR, Version.V20, p.getGroupId(),
                                             p );
 
-                    validatePluginVersion( "build.plugins.plugin.version", problems, p.getVersion(), p.getKey(), p,
+                    validate20PluginVersion( "build.plugins.plugin.version", problems, p.getVersion(), p.getKey(), p,
                                            request );
 
-                    validateBoolean( "build.plugins.plugin.inherited", problems, errOn30, p.getInherited(), p.getKey(),
+                    validateBoolean( "build.plugins.plugin.inherited", problems, errOn30, Version.V20, p.getInherited(), p.getKey(),
                                      p );
 
-                    validateBoolean( "build.plugins.plugin.extensions", problems, errOn30, p.getExtensions(),
+                    validateBoolean( "build.plugins.plugin.extensions", problems, errOn30, Version.V20, p.getExtensions(),
                                      p.getKey(), p );
 
-                    validateEffectivePluginDependencies( problems, p, request );
+                    validate20EffectivePluginDependencies( problems, p, request );
                 }
 
-                validateResources( problems, build.getResources(), "build.resources.resource", request );
+                validate20RawResources( problems, build.getResources(), "build.resources.resource", request );
 
-                validateResources( problems, build.getTestResources(), "build.testResources.testResource", request );
+                validate20RawResources( problems, build.getTestResources(), "build.testResources.testResource", request );
             }
 
             Reporting reporting = model.getReporting();
@@ -307,25 +311,22 @@ public class DefaultModelValidator
             {
                 for ( ReportPlugin p : reporting.getPlugins() )
                 {
-                    validateStringNotEmpty( "reporting.plugins.plugin.artifactId", problems, Severity.ERROR,
+                    validateStringNotEmpty( "reporting.plugins.plugin.artifactId", problems, Severity.ERROR, Version.V20,
                                             p.getArtifactId(), p );
 
-                    validateStringNotEmpty( "reporting.plugins.plugin.groupId", problems, Severity.ERROR,
+                    validateStringNotEmpty( "reporting.plugins.plugin.groupId", problems, Severity.ERROR, Version.V20,
                                             p.getGroupId(), p );
-
-                    validateStringNotEmpty( "reporting.plugins.plugin.version", problems, errOn31, p.getVersion(),
-                                            p.getKey(), p );
                 }
             }
 
             for ( Repository repository : model.getRepositories() )
             {
-                validateRepository( problems, repository, "repositories.repository", request );
+                validate20EffectiveRepository( problems, repository, "repositories.repository", request );
             }
 
             for ( Repository repository : model.getPluginRepositories() )
             {
-                validateRepository( problems, repository, "pluginRepositories.pluginRepository", request );
+                validate20EffectiveRepository( problems, repository, "pluginRepositories.pluginRepository", request );
             }
 
             DistributionManagement distMgmt = model.getDistributionManagement();
@@ -333,18 +334,18 @@ public class DefaultModelValidator
             {
                 if ( distMgmt.getStatus() != null )
                 {
-                    addViolation( problems, Severity.ERROR, "distributionManagement.status", null,
+                    addViolation( problems, Severity.ERROR, Version.V20, "distributionManagement.status", null,
                                   "must not be specified.", distMgmt );
                 }
 
-                validateRepository( problems, distMgmt.getRepository(), "distributionManagement.repository", request );
-                validateRepository( problems, distMgmt.getSnapshotRepository(),
+                validate20EffectiveRepository( problems, distMgmt.getRepository(), "distributionManagement.repository", request );
+                validate20EffectiveRepository( problems, distMgmt.getSnapshotRepository(),
                                     "distributionManagement.snapshotRepository", request );
             }
         }
     }
 
-    private void validateRawDependencies( ModelProblemCollector problems, List<Dependency> dependencies, String prefix,
+    private void validate20RawDependencies( ModelProblemCollector problems, List<Dependency> dependencies, String prefix,
                                           ModelBuildingRequest request )
     {
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
@@ -360,12 +361,12 @@ public class DefaultModelValidator
             {
                 if ( !"pom".equals( dependency.getType() ) )
                 {
-                    addViolation( problems, Severity.WARNING, prefix + ".type", key,
+                    addViolation( problems, Severity.WARNING, Version.V20, prefix + ".type", key,
                                   "must be 'pom' to import the managed dependencies.", dependency );
                 }
                 else if ( StringUtils.isNotEmpty( dependency.getClassifier() ) )
                 {
-                    addViolation( problems, errOn30, prefix + ".classifier", key,
+                    addViolation( problems, errOn30, Version.V20, prefix + ".classifier", key,
                                   "must be empty, imported POM cannot have a classifier.", dependency );
                 }
             }
@@ -376,12 +377,12 @@ public class DefaultModelValidator
                 {
                     if ( !hasExpression( sysPath ) )
                     {
-                        addViolation( problems, Severity.WARNING, prefix + ".systemPath", key,
+                        addViolation( problems, Severity.WARNING, Version.V20, prefix + ".systemPath", key,
                                       "should use a variable instead of a hard-coded path " + sysPath, dependency );
                     }
                     else if ( sysPath.contains( "${basedir}" ) || sysPath.contains( "${project.basedir}" ) )
                     {
-                        addViolation( problems, Severity.WARNING, prefix + ".systemPath", key,
+                        addViolation( problems, Severity.WARNING, Version.V20, prefix + ".systemPath", key,
                                       "should not point at files within the project directory, " + sysPath
                                           + " will be unresolvable by dependent projects", dependency );
                     }
@@ -406,7 +407,7 @@ public class DefaultModelValidator
                             + StringUtils.defaultString( dependency.getVersion(), "(?)" );
                 }
 
-                addViolation( problems, errOn31, prefix + ".(groupId:artifactId:type:classifier)", null,
+                addViolation( problems, errOn31, Version.V20, prefix + ".(groupId:artifactId:type:classifier)", null,
                               "must be unique: " + key + " -> " + msg, dependency );
             }
             else
@@ -429,24 +430,24 @@ public class DefaultModelValidator
 
             if ( request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )
             {
-                validateBoolean( prefix + "optional", problems, errOn30, d.getOptional(), d.getManagementKey(), d );
+                validateBoolean( prefix + "optional", problems, errOn30, Version.V20, d.getOptional(), d.getManagementKey(), d );
 
                 if ( !management )
                 {
-                    validateVersion( prefix + "version", problems, errOn30, d.getVersion(), d.getManagementKey(), d );
+                    validateVersion( prefix + "version", problems, errOn30, Version.V20, d.getVersion(), d.getManagementKey(), d );
 
                     /*
                      * TODO: Extensions like Flex Mojos use custom scopes like "merged", "internal", "external", etc.
                      * In order to don't break backward-compat with those, only warn but don't error out.
                      */
-                    validateEnum( prefix + "scope", problems, Severity.WARNING, d.getScope(), d.getManagementKey(), d,
+                    validateEnum( prefix + "scope", problems, Severity.WARNING, Version.V20, d.getScope(), d.getManagementKey(), d,
                                   "provided", "compile", "runtime", "test", "system" );
                 }
             }
         }
     }
 
-    private void validateEffectivePluginDependencies( ModelProblemCollector problems, Plugin plugin,
+    private void validate20EffectivePluginDependencies( ModelProblemCollector problems, Plugin plugin,
                                                       ModelBuildingRequest request )
     {
         List<Dependency> dependencies = plugin.getDependencies();
@@ -461,9 +462,9 @@ public class DefaultModelValidator
             {
                 validateEffectiveDependency( problems, d, false, prefix, request );
 
-                validateVersion( prefix + "version", problems, errOn30, d.getVersion(), d.getManagementKey(), d );
+                validateVersion( prefix + "version", problems, errOn30, Version.BASE, d.getVersion(), d.getManagementKey(), d );
 
-                validateEnum( prefix + "scope", problems, errOn30, d.getScope(), d.getManagementKey(), d, "compile",
+                validateEnum( prefix + "scope", problems, errOn30, Version.BASE, d.getScope(), d.getManagementKey(), d, "compile",
                               "runtime", "system" );
             }
         }
@@ -472,15 +473,15 @@ public class DefaultModelValidator
     private void validateEffectiveDependency( ModelProblemCollector problems, Dependency d, boolean management,
                                               String prefix, ModelBuildingRequest request )
     {
-        validateId( prefix + "artifactId", problems, Severity.ERROR, d.getArtifactId(), d.getManagementKey(), d );
+        validateId( prefix + "artifactId", problems, Severity.ERROR, Version.BASE, d.getArtifactId(), d.getManagementKey(), d );
 
-        validateId( prefix + "groupId", problems, Severity.ERROR, d.getGroupId(), d.getManagementKey(), d );
+        validateId( prefix + "groupId", problems, Severity.ERROR, Version.BASE, d.getGroupId(), d.getManagementKey(), d );
 
         if ( !management )
         {
-            validateStringNotEmpty( prefix + "type", problems, Severity.ERROR, d.getType(), d.getManagementKey(), d );
+            validateStringNotEmpty( prefix + "type", problems, Severity.ERROR, Version.BASE, d.getType(), d.getManagementKey(), d );
 
-            validateStringNotEmpty( prefix + "version", problems, Severity.ERROR, d.getVersion(), d.getManagementKey(),
+            validateStringNotEmpty( prefix + "version", problems, Severity.ERROR, Version.BASE, d.getVersion(), d.getManagementKey(),
                                     d );
         }
 
@@ -490,7 +491,7 @@ public class DefaultModelValidator
 
             if ( StringUtils.isEmpty( systemPath ) )
             {
-                addViolation( problems, Severity.ERROR, prefix + "systemPath", d.getManagementKey(), "is missing.",
+                addViolation( problems, Severity.ERROR, Version.BASE, prefix + "systemPath", d.getManagementKey(), "is missing.",
                               d );
             }
             else
@@ -498,7 +499,7 @@ public class DefaultModelValidator
                 File sysFile = new File( systemPath );
                 if ( !sysFile.isAbsolute() )
                 {
-                    addViolation( problems, Severity.ERROR, prefix + "systemPath", d.getManagementKey(),
+                    addViolation( problems, Severity.ERROR, Version.BASE, prefix + "systemPath", d.getManagementKey(),
                                   "must specify an absolute path but is " + systemPath, d );
                 }
                 else if ( !sysFile.isFile() )
@@ -511,13 +512,13 @@ public class DefaultModelValidator
                     {
                         msg += ". Please verify that you run Maven using a JDK and not just a JRE.";
                     }
-                    addViolation( problems, Severity.WARNING, prefix + "systemPath", d.getManagementKey(), msg, d );
+                    addViolation( problems, Severity.WARNING, Version.BASE, prefix + "systemPath", d.getManagementKey(), msg, d );
                 }
             }
         }
         else if ( StringUtils.isNotEmpty( d.getSystemPath() ) )
         {
-            addViolation( problems, Severity.ERROR, prefix + "systemPath", d.getManagementKey(), "must be omitted."
+            addViolation( problems, Severity.ERROR, Version.BASE, prefix + "systemPath", d.getManagementKey(), "must be omitted."
                 + " This field may only be specified for a dependency with system scope.", d );
         }
 
@@ -525,25 +526,25 @@ public class DefaultModelValidator
         {
             for ( Exclusion exclusion : d.getExclusions() )
             {
-                validateId( prefix + "exclusions.exclusion.groupId", problems, Severity.WARNING,
+                validateId( prefix + "exclusions.exclusion.groupId", problems, Severity.WARNING, Version.V20,
                             exclusion.getGroupId(), d.getManagementKey(), exclusion );
 
-                validateId( prefix + "exclusions.exclusion.artifactId", problems, Severity.WARNING,
+                validateId( prefix + "exclusions.exclusion.artifactId", problems, Severity.WARNING, Version.V20,
                             exclusion.getArtifactId(), d.getManagementKey(), exclusion );
             }
         }
     }
 
-    private void validateRepositories( ModelProblemCollector problems, List<Repository> repositories, String prefix,
+    private void validateRawRepositories( ModelProblemCollector problems, List<Repository> repositories, String prefix,
                                        ModelBuildingRequest request )
     {
         Map<String, Repository> index = new HashMap<String, Repository>();
 
         for ( Repository repository : repositories )
         {
-            validateStringNotEmpty( prefix + ".id", problems, Severity.ERROR, repository.getId(), repository );
+            validateStringNotEmpty( prefix + ".id", problems, Severity.ERROR, Version.V20, repository.getId(), repository );
 
-            validateStringNotEmpty( prefix + "[" + repository.getId() + "].url", problems, Severity.ERROR,
+            validateStringNotEmpty( prefix + "[" + repository.getId() + "].url", problems, Severity.ERROR, Version.V20,
                                     repository.getUrl(), repository );
 
             String key = repository.getId();
@@ -554,7 +555,7 @@ public class DefaultModelValidator
             {
                 Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
-                addViolation( problems, errOn30, prefix + ".id", null, "must be unique: " + repository.getId() + " -> "
+                addViolation( problems, errOn30, Version.V20, prefix + ".id", null, "must be unique: " + repository.getId() + " -> "
                     + existing.getUrl() + " vs " + repository.getUrl(), repository );
             }
             else
@@ -564,42 +565,42 @@ public class DefaultModelValidator
         }
     }
 
-    private void validateRepository( ModelProblemCollector problems, Repository repository, String prefix,
+    private void validate20EffectiveRepository( ModelProblemCollector problems, Repository repository, String prefix,
                                      ModelBuildingRequest request )
     {
         if ( repository != null )
         {
             Severity errOn31 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
 
-            validateBannedCharacters( prefix + ".id", problems, errOn31, repository.getId(), null, repository,
+            validateBannedCharacters( prefix + ".id", problems, errOn31, Version.V20, repository.getId(), null, repository,
                                       ILLEGAL_REPO_ID_CHARS );
 
             if ( "local".equals( repository.getId() ) )
             {
-                addViolation( problems, errOn31, prefix + ".id", null, "must not be 'local'"
+                addViolation( problems, errOn31, Version.V20, prefix + ".id", null, "must not be 'local'"
                     + ", this identifier is reserved for the local repository"
                     + ", using it for other repositories will corrupt your repository metadata.", repository );
             }
 
             if ( "legacy".equals( repository.getLayout() ) )
             {
-                addViolation( problems, Severity.WARNING, prefix + ".layout", repository.getId(),
+                addViolation( problems, Severity.WARNING, Version.V20, prefix + ".layout", repository.getId(),
                               "uses the unsupported value 'legacy', artifact resolution might fail.", repository );
             }
         }
     }
 
-    private void validateResources( ModelProblemCollector problems, List<Resource> resources, String prefix,
+    private void validate20RawResources( ModelProblemCollector problems, List<Resource> resources, String prefix,
                                     ModelBuildingRequest request )
     {
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
         for ( Resource resource : resources )
         {
-            validateStringNotEmpty( prefix + ".directory", problems, Severity.ERROR, resource.getDirectory(),
+            validateStringNotEmpty( prefix + ".directory", problems, Severity.ERROR, Version.V20, resource.getDirectory(),
                                     resource );
 
-            validateBoolean( prefix + ".filtering", problems, errOn30, resource.getFiltering(),
+            validateBoolean( prefix + ".filtering", problems, errOn30, Version.V20, resource.getFiltering(),
                              resource.getDirectory(), resource );
         }
     }
@@ -611,29 +612,29 @@ public class DefaultModelValidator
     private boolean validateId( String fieldName, ModelProblemCollector problems, String id,
                                 InputLocationTracker tracker )
     {
-        return validateId( fieldName, problems, Severity.ERROR, id, null, tracker );
+        return validateId( fieldName, problems, Severity.ERROR, Version.BASE, id, null, tracker );
     }
 
-    private boolean validateId( String fieldName, ModelProblemCollector problems, Severity severity, String id,
+    private boolean validateId( String fieldName, ModelProblemCollector problems, Severity severity, Version version, String id,
                                 String sourceHint, InputLocationTracker tracker )
     {
-        if ( !validateStringNotEmpty( fieldName, problems, severity, id, sourceHint, tracker ) )
+        if ( !validateStringNotEmpty( fieldName, problems, severity, version, id, sourceHint, tracker ) )
         {
             return false;
         }
         else
         {
-            boolean match = id.matches( ID_REGEX );
+            boolean match = ID_REGEX.matcher( id ).matches();
             if ( !match )
             {
-                addViolation( problems, severity, fieldName, sourceHint, "with value '" + id
+                addViolation( problems, severity, version, fieldName, sourceHint, "with value '" + id
                     + "' does not match a valid id pattern.", tracker );
             }
             return match;
         }
     }
 
-    private boolean validateStringNoExpression( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateStringNoExpression( String fieldName, ModelProblemCollector problems, Severity severity, Version version,
                                                 String string, InputLocationTracker tracker )
     {
         if ( !hasExpression( string ) )
@@ -641,7 +642,7 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, fieldName, null, "contains an expression but should be a constant.",
+        addViolation( problems, severity, version, fieldName, null, "contains an expression but should be a constant.",
                       tracker );
 
         return false;
@@ -652,10 +653,10 @@ public class DefaultModelValidator
         return value != null && value.contains( "${" );
     }
 
-    private boolean validateStringNotEmpty( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateStringNotEmpty( String fieldName, ModelProblemCollector problems, Severity severity, Version version,
                                             String string, InputLocationTracker tracker )
     {
-        return validateStringNotEmpty( fieldName, problems, severity, string, null, tracker );
+        return validateStringNotEmpty( fieldName, problems, severity, version, string, null, tracker );
     }
 
     /**
@@ -666,10 +667,10 @@ public class DefaultModelValidator
      * <li><code>string.length > 0</code>
      * </ul>
      */
-    private boolean validateStringNotEmpty( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateStringNotEmpty( String fieldName, ModelProblemCollector problems, Severity severity, Version version, 
                                             String string, String sourceHint, InputLocationTracker tracker )
     {
-        if ( !validateNotNull( fieldName, problems, severity, string, sourceHint, tracker ) )
+        if ( !validateNotNull( fieldName, problems, severity, version, string, sourceHint, tracker ) )
         {
             return false;
         }
@@ -679,7 +680,7 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, fieldName, sourceHint, "is missing.", tracker );
+        addViolation( problems, severity, version, fieldName, sourceHint, "is missing.", tracker );
 
         return false;
     }
@@ -691,7 +692,7 @@ public class DefaultModelValidator
      * <li><code>string != null</code>
      * </ul>
      */
-    private boolean validateNotNull( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateNotNull( String fieldName, ModelProblemCollector problems, Severity severity, Version version,
                                      Object object, String sourceHint, InputLocationTracker tracker )
     {
         if ( object != null )
@@ -699,12 +700,12 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, fieldName, sourceHint, "is missing.", tracker );
+        addViolation( problems, severity, version, fieldName, sourceHint, "is missing.", tracker );
 
         return false;
     }
 
-    private boolean validateBoolean( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateBoolean( String fieldName, ModelProblemCollector problems, Severity severity, Version version,
                                      String string, String sourceHint, InputLocationTracker tracker )
     {
         if ( string == null || string.length() <= 0 )
@@ -717,13 +718,13 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, fieldName, sourceHint, "must be 'true' or 'false' but is '" + string + "'.",
+        addViolation( problems, severity, version, fieldName, sourceHint, "must be 'true' or 'false' but is '" + string + "'.",
                       tracker );
 
         return false;
     }
 
-    private boolean validateEnum( String fieldName, ModelProblemCollector problems, Severity severity, String string,
+    private boolean validateEnum( String fieldName, ModelProblemCollector problems, Severity severity, Version version, String string,
                                   String sourceHint, InputLocationTracker tracker, String... validValues )
     {
         if ( string == null || string.length() <= 0 )
@@ -738,13 +739,13 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, fieldName, sourceHint, "must be one of " + values + " but is '" + string
+        addViolation( problems, severity, version, fieldName, sourceHint, "must be one of " + values + " but is '" + string
             + "'.", tracker );
 
         return false;
     }
 
-    private boolean validateBannedCharacters( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateBannedCharacters( String fieldName, ModelProblemCollector problems, Severity severity, Version version, 
                                               String string, String sourceHint, InputLocationTracker tracker,
                                               String banned )
     {
@@ -754,7 +755,7 @@ public class DefaultModelValidator
             {
                 if ( banned.indexOf( string.charAt( i ) ) >= 0 )
                 {
-                    addViolation( problems, severity, fieldName, sourceHint,
+                    addViolation( problems, severity, version, fieldName, sourceHint,
                                   "must not contain any of these characters " + banned + " but found "
                                       + string.charAt( i ), tracker );
                     return false;
@@ -765,7 +766,7 @@ public class DefaultModelValidator
         return true;
     }
 
-    private boolean validateVersion( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validateVersion( String fieldName, ModelProblemCollector problems, Severity severity, Version version,
                                      String string, String sourceHint, InputLocationTracker tracker )
     {
         if ( string == null || string.length() <= 0 )
@@ -775,21 +776,17 @@ public class DefaultModelValidator
 
         if ( hasExpression( string ) )
         {
-            addViolation( problems, severity, fieldName, sourceHint,
+            addViolation( problems, severity, version, fieldName, sourceHint,
                           "must be a valid version but is '" + string + "'.", tracker );
             return false;
         }
 
-        if ( !validateBannedCharacters( fieldName, problems, severity, string, sourceHint, tracker,
-                                        ILLEGAL_VERSION_CHARS ) )
-        {
-            return false;
-        }
+        return validateBannedCharacters( fieldName, problems, severity, version, string, sourceHint, tracker,
+                                         ILLEGAL_VERSION_CHARS );
 
-        return true;
     }
 
-    private boolean validateProperSnapshotVersion( String fieldName, ModelProblemCollector problems, Severity severity,
+    private boolean validate20ProperSnapshotVersion( String fieldName, ModelProblemCollector problems, Severity severity, Version version,
                                                    String string, String sourceHint, InputLocationTracker tracker )
     {
         if ( string == null || string.length() <= 0 )
@@ -799,7 +796,7 @@ public class DefaultModelValidator
 
         if ( string.endsWith( "SNAPSHOT" ) && !string.endsWith( "-SNAPSHOT" ) )
         {
-            addViolation( problems, severity, fieldName, sourceHint, "uses an unsupported snapshot version format"
+            addViolation( problems, severity, version, fieldName, sourceHint, "uses an unsupported snapshot version format"
                 + ", should be '*-SNAPSHOT' instead.", tracker );
             return false;
         }
@@ -807,7 +804,7 @@ public class DefaultModelValidator
         return true;
     }
 
-    private boolean validatePluginVersion( String fieldName, ModelProblemCollector problems, String string,
+    private boolean validate20PluginVersion( String fieldName, ModelProblemCollector problems, String string,
                                            String sourceHint, InputLocationTracker tracker,
                                            ModelBuildingRequest request )
     {
@@ -819,14 +816,14 @@ public class DefaultModelValidator
 
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
-        if ( !validateVersion( fieldName, problems, errOn30, string, sourceHint, tracker ) )
+        if ( !validateVersion( fieldName, problems, errOn30, Version.V20, string, sourceHint, tracker ) )
         {
             return false;
         }
 
         if ( string.length() <= 0 || "RELEASE".equals( string ) || "LATEST".equals( string ) )
         {
-            addViolation( problems, errOn30, fieldName, sourceHint, "must be a valid version but is '" + string + "'.",
+            addViolation( problems, errOn30, Version.V20, fieldName, sourceHint, "must be a valid version but is '" + string + "'.",
                           tracker );
             return false;
         }
@@ -834,7 +831,7 @@ public class DefaultModelValidator
         return true;
     }
 
-    private static void addViolation( ModelProblemCollector problems, Severity severity, String fieldName,
+    private static void addViolation( ModelProblemCollector problems, Severity severity, Version version, String fieldName,
                                       String sourceHint, String message, InputLocationTracker tracker )
     {
         StringBuilder buffer = new StringBuilder( 256 );
@@ -847,7 +844,8 @@ public class DefaultModelValidator
 
         buffer.append( ' ' ).append( message );
 
-        problems.add( severity, buffer.toString(), getLocation( fieldName, tracker ), null );
+        problems.add( new ModelProblemCollectorRequest( severity, version )
+            .setMessage( buffer.toString() ).setLocation( getLocation( fieldName, tracker ) ) );
     }
 
     private static InputLocation getLocation( String fieldName, InputLocationTracker tracker )
diff --git a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
index 1e70e8a..e8b42d8 100644
--- a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
+++ b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
@@ -56,7 +56,7 @@ under the License.
     <finalName>${project.artifactId}-${project.version}</finalName>
     <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
     <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
-    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
+    <scriptSourceDirectory>${project.basedir}/src/main/scripts</scriptSourceDirectory>
     <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
     <resources>
       <resource>
@@ -82,11 +82,11 @@ under the License.
         </plugin>
         <plugin>
           <artifactId>maven-dependency-plugin</artifactId>
-          <version>2.1</version>
+          <version>2.8</version>
         </plugin>
         <plugin>
           <artifactId>maven-release-plugin</artifactId>
-          <version>2.0</version>
+          <version>2.3.2</version>
         </plugin>
       </plugins>
     </pluginManagement>
diff --git a/maven-model-builder/src/site/apt/index.apt b/maven-model-builder/src/site/apt/index.apt
index f3ee70a..3a60c34 100644
--- a/maven-model-builder/src/site/apt/index.apt
+++ b/maven-model-builder/src/site/apt/index.apt
@@ -1,9 +1,26 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Introduction
  -----
  Hervé Boutemy
  -----
- 2011-09-03
+ 2013-03-19
  -----
 
 Maven Model Builder
@@ -22,25 +39,33 @@ Maven Model Builder
 
  * phase 1
 
-   ** profile activation
+   ** profile activation (see {{{./apidocs/org/apache/maven/model/profile/activation/package-summary.html}available activators}})
 
-   ** model normalization
+   ** model normalization: <<<ModelNormalizer>>> ({{{./apidocs/org/apache/maven/model/normalization/ModelNormalizer.html}javadoc}}),
+   with its <<<DefaultModelNormalizer>>> implementation
+   ({{{./xref/org/apache/maven/model/normalization/DefaultModelNormalizer.html}source}})
 
    ** profile injection
 
    ** parent resolution until {{{./super-pom.html}super-pom}}
 
-   ** inheritance assembly
+   ** inheritance assembly: <<<InheritanceAssembler>>> ({{{./apidocs/org/apache/maven/model/inheritance/InheritanceAssembler.html}javadoc}}),
+   with its <<<DefaultInheritanceAssembler>>> implementation
+   ({{{./xref/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.html}source}})
 
    ** model interpolation (see below)
 
-   ** url normalization
+   ** url normalization: <<<UrlNormalizer>>> ({{{./apidocs/org/apache/maven/model/path/UrlNormalizer.html}javadoc}}),
+   with its <<<DefaultUrlNormalizer>>> implementation
+   ({{{./xref/org/apache/maven/model/path/DefaultUrlNormalizer.html}source}})
 
    []
 
  * phase 2
 
-   ** model path translation
+   ** model path translation: <<<ModelPathTranslator>>> ({{{./apidocs/org/apache/maven/model/path/ModelPathTranslator.html}javadoc}}),
+   with its <<<DefaultModelPathTranslator>>> implementation
+   ({{{./xref/org/apache/maven/model/path/DefaultModelPathTranslator.html}source}})
 
    ** plugin management injection
 
@@ -56,7 +81,9 @@ Maven Model Builder
 
    ** <(optional)> plugins configuration
 
-   ** effective model validation
+   ** effective model validation: <<<ModelValidator>>> ({{{./apidocs/org/apache/maven/model/validation/ModelValidator.html}javadoc}}),
+   with its <<<DefaultModelValidator>>> implementation
+   ({{{./xref/org/apache/maven/model/validation/DefaultModelValidator.html}source}})
 
    []
 
@@ -78,12 +105,12 @@ Maven Model Builder
 <<<pom.*>>> (<deprecated>)\
 <<<*>>> (<deprecated>) | POM content (see {{{../maven-model/maven.html}POM reference}}) | <<<$\{project.version\}>>>\
  | | <<<$\{project.build.finalName\}>>>\
- | | <<<$\{project.build.artifactId\}>>>\
+ | | <<<$\{project.artifactId\}>>>\
  | | <<<$\{project.build.directory\}>>> |
 *----+------+------+
-| <<<basedir>>>\
-<<<project.basedir>>>\
-<<<pom.basedir>>> (<deprecated>) | the directory containing the <<<pom.xml>>> file | <<<$\{project.basedir\}>>> |
+| <<<project.basedir>>>\
+<<<pom.basedir>>> (<deprecated>)\
+<<<basedir>>> (<deprecated>) | the directory containing the <<<pom.xml>>> file | <<<$\{project.basedir\}>>> |
 *----+------+------+
 | <<<project.baseUri>>>\
 <<<pom.baseUri>>> (<deprecated>) | the directory containing the <<<pom.xml>>> file as URI | <<<$\{project.baseUri\}>>> |
@@ -97,9 +124,9 @@ Maven Model Builder
 *----+------+------+
 | <<<maven.home>>> | The path to the current Maven home. | <<<$\{maven.home\}>>> |
 *----+------+------+
-| <<<maven.version>>> | The version number of the current Maven execution <(since 3.0.4)>. For example, "<<<3.0.3>>>". | <<<$\{maven.version\}>>> |
+| <<<maven.version>>> | The version number of the current Maven execution <(since 3.0.4)>. For example, "<<<3.0.5>>>". | <<<$\{maven.version\}>>> |
 *----+------+------+
-| <<<maven.build.version>>> | The full build version of the current Maven execution <(since 3.0.4)>. For example, "<<<Apache Maven 3.0.3 (r1075438; 2011-02-28 11:31:09-0600)>>>". | <<<$\{maven.build.version\}>>> |
+| <<<maven.build.version>>> | The full build version of the current Maven execution <(since 3.0.4)>. For example, "<<<Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)>>>". | <<<$\{maven.build.version\}>>> |
 *----+------+------+
 | <<<*>>> | Java system properties (see {{{http://download.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties()}JDK reference}}) | <<<$\{user.home\}>>>\
  | | <<<$\{java.home\}>>> |
@@ -110,6 +137,23 @@ Maven Model Builder
 | <<<settings.*>>> | Local user settings (see {{{../maven-settings/settings.xml/settings.html}settings reference}}) | <<<$\{settings.localRepository\}>>> |
 *----+------+------+
 
-  Notice that after model interpolation, <<<$\{...\}>>> content can remain in the model that will be evaluated later
+**  Notice
+
+  * after model interpolation, <<<$\{...\}>>> content can remain in the model that will be evaluated later
   when setting plugin parameters. This happens in particular with <<<settings.*>>> values for
-  {{{../maven-settings/settings.html}Settings Model}}.
+  {{{../maven-settings/settings.html}Settings Model}},
+
+  * encoding configuration have been defined as POM properties looking like POM content but not added to POM model to maintain
+  compatibility with previous Maven versions: 
+
+    * <<<$\{project.build.sourceEncoding\}>>> for
+    {{{http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding}source files encoding}}
+    (defaults to platform encoding)
+
+    * <<<$\{project.reporting.outputEncoding\}>>> for
+    {{{https://cwiki.apache.org/confluence/display/MAVENOLD/Reporting+Encoding+Configuration}reporting output files encoding}}
+    (defaults to <<<UTF-8>>>)
+
+    []
+
+  []
diff --git a/maven-model-builder/src/site/apt/super-pom.apt.vm b/maven-model-builder/src/site/apt/super-pom.apt.vm
index df2a6f9..df86d70 100644
--- a/maven-model-builder/src/site/apt/super-pom.apt.vm
+++ b/maven-model-builder/src/site/apt/super-pom.apt.vm
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Super POM
  -----
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
index f85996d..90b65a4 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
@@ -21,6 +21,8 @@ package org.apache.maven.model.building;
 
 import java.io.File;
 
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
 import junit.framework.TestCase;
 
 /**
@@ -49,6 +51,9 @@ public class DefaultModelBuilderFactoryTest
         assertNotNull( result );
         assertNotNull( result.getEffectiveModel() );
         assertEquals( "activated", result.getEffectiveModel().getProperties().get( "profile.file" ) );
+        Xpp3Dom conf = (Xpp3Dom) result.getEffectiveModel().getBuild().getPlugins().get( 0 ).getConfiguration();
+        assertEquals( "1.5", conf.getChild( "source" ).getValue() );
+        assertEquals( "  1.5  ", conf.getChild( "target" ).getValue() );
     }
 
 }
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java
index 48dcc24..06f1b1b 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java
@@ -22,8 +22,8 @@ package org.apache.maven.model.building;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.maven.model.InputLocation;
-import org.apache.maven.model.building.ModelProblem.Severity;
+import org.apache.maven.model.Model;
+
 
 /**
  * A simple model problem collector for testing the model building components.
@@ -33,6 +33,7 @@ import org.apache.maven.model.building.ModelProblem.Severity;
 public class SimpleProblemCollector
     implements ModelProblemCollector
 {
+    private Model model;
 
     private List<String> warnings = new ArrayList<String>();
 
@@ -40,6 +41,20 @@ public class SimpleProblemCollector
 
     private List<String> fatals = new ArrayList<String>();
 
+    public SimpleProblemCollector()
+    {
+    }
+
+    public SimpleProblemCollector( Model model )
+    {
+        this.model = model;
+    }
+
+    public Model getModel()
+    {
+        return model;
+    }
+
     public List<String> getWarnings()
     {
         return warnings;
@@ -55,21 +70,20 @@ public class SimpleProblemCollector
         return fatals;
     }
 
-    public void add( Severity severity, String message, InputLocation location, Exception cause )
+    public void add( ModelProblemCollectorRequest req )
     {
-        switch ( severity )
+        switch ( req.getSeverity() )
         {
             case FATAL:
-                fatals.add( message );
+                fatals.add( req.getMessage() );
                 break;
             case ERROR:
-                errors.add( message );
+                errors.add( req.getMessage() );
                 break;
             case WARNING:
-                warnings.add( message );
+                warnings.add( req.getMessage() );
                 break;
         }
 
     }
-
 }
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
index dceae51..065a06f 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
@@ -64,9 +64,9 @@ public class DefaultModelValidatorTest
     {
         ModelBuildingRequest request = new DefaultModelBuildingRequest().setValidationLevel( level );
 
-        SimpleProblemCollector problems = new SimpleProblemCollector();
+        SimpleProblemCollector problems = new SimpleProblemCollector( read( pom ) );
 
-        validator.validateEffectiveModel( read( pom ), request, problems );
+        validator.validateEffectiveModel( problems.getModel(), request, problems );
 
         return problems;
     }
@@ -76,9 +76,9 @@ public class DefaultModelValidatorTest
     {
         ModelBuildingRequest request = new DefaultModelBuildingRequest().setValidationLevel( level );
 
-        SimpleProblemCollector problems = new SimpleProblemCollector();
+        SimpleProblemCollector problems = new SimpleProblemCollector( read( pom ) );
 
-        validator.validateRawModel( read( pom ), request, problems );
+        validator.validateRawModel( problems.getModel(), request, problems );
 
         return problems;
     }
@@ -131,7 +131,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf( "modelVersion" ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains( "modelVersion" ) );
     }
 
     public void testMissingArtifactId()
@@ -193,7 +193,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf( "Aggregator projects require 'pom' as packaging." ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains( "Aggregator projects require 'pom' as packaging." ) );
     }
 
     public void testMissingDependencyArtifactId()
@@ -203,8 +203,8 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf(
-                                                         "'dependencies.dependency.artifactId' for groupId:null:jar is missing" ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains(
+            "'dependencies.dependency.artifactId' for groupId:null:jar is missing" ) );
     }
 
     public void testMissingDependencyGroupId()
@@ -214,8 +214,8 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf(
-                                                         "'dependencies.dependency.groupId' for null:artifactId:jar is missing" ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains(
+            "'dependencies.dependency.groupId' for null:artifactId:jar is missing" ) );
     }
 
     public void testMissingDependencyVersion()
@@ -225,8 +225,8 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf(
-                                                         "'dependencies.dependency.version' for groupId:artifactId:jar is missing" ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains(
+            "'dependencies.dependency.version' for groupId:artifactId:jar is missing" ) );
     }
 
     public void testMissingDependencyManagementArtifactId()
@@ -236,8 +236,8 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf(
-                                                         "'dependencyManagement.dependencies.dependency.artifactId' for groupId:null:jar is missing" ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains(
+            "'dependencyManagement.dependencies.dependency.artifactId' for groupId:null:jar is missing" ) );
     }
 
     public void testMissingDependencyManagementGroupId()
@@ -247,8 +247,8 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).indexOf(
-                                                         "'dependencyManagement.dependencies.dependency.groupId' for null:artifactId:jar is missing" ) > -1 );
+        assertTrue( result.getErrors().get( 0 ).contains(
+            "'dependencyManagement.dependencies.dependency.groupId' for null:artifactId:jar is missing" ) );
     }
 
     public void testMissingAll()
@@ -613,4 +613,11 @@ public class DefaultModelValidatorTest
             + "should not point at files within the project directory" );
     }
 
+    public void testMissingReportPluginVersion()
+        throws Exception
+    {
+        SimpleProblemCollector result = validate( "missing-report-version-pom.xml" );
+
+        assertViolations( result, 0, 0, 0 );
+    }
 }
diff --git a/maven-model-builder/src/test/resources/poms/factory/simple.xml b/maven-model-builder/src/test/resources/poms/factory/simple.xml
index 8912298..7190073 100644
--- a/maven-model-builder/src/test/resources/poms/factory/simple.xml
+++ b/maven-model-builder/src/test/resources/poms/factory/simple.xml
@@ -37,8 +37,8 @@ under the License.
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.1</version>
           <configuration>
-            <source>1.5</source>
-            <target>1.5</target>
+            <source>  1.5  </source>
+            <target xml:space="preserve">  1.5  </target>
           </configuration>
         </plugin>
       </plugins>
diff --git a/maven-model-builder/src/test/resources/poms/validation/missing-report-version-pom.xml b/maven-model-builder/src/test/resources/poms/validation/missing-report-version-pom.xml
new file mode 100644
index 0000000..46a560f
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/missing-report-version-pom.xml
@@ -0,0 +1,57 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>foo</artifactId>
+  <groupId>foo</groupId>
+  <version>99.44</version>
+  <packaging>bleh</packaging>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-from-pluginManagement-plugin</artifactId>
+          <version>1.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <artifactId>maven-from-plugins-plugin</artifactId>
+        <version>1.0</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <artifactId>maven-noversion-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-from-plugins-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-from-pluginManagement-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index f73141b..7fd718f 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-model</artifactId>
@@ -33,6 +33,12 @@ under the License.
   <name>Maven Model</name>
   <description>Model for Maven POM (Project Object Model)</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
similarity index 54%
copy from maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
copy to maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
index 6646458..4180b55 100644
--- a/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java
+++ b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
@@ -1,4 +1,13 @@
-package org.apache.maven.eventspy;
+/**
+ * XML reader and writer classes for Maven POM, generated from <code>maven.mdo</code> model.
+ * These classes use
+ * <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/pull/package-summary.html">plexus-utils'
+ * XML Pull Parser API</a> for their internal XML handling and
+ * <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomBuilder.html">Xpp3DomBuilder</a> + 
+ * <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3Dom.html">Xpp3Dom</a> for
+ * DOM content representation (see <code><configuration></code> elements).
+ */
+package org.apache.maven.model.io.xpp3;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -17,28 +26,4 @@ package org.apache.maven.eventspy;
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
-
-/**
- * A skeleton eventspy that does nothing other than helping implementors.
- */
-public abstract class AbstractEventSpy
-    implements EventSpy
-{
-
-    public void init( Context context )
-        throws Exception
-    {
-    }
-
-    public void onEvent( Object event )
-        throws Exception
-    {
-    }
-
-    public void close()
-        throws Exception
-    {
-    }
-
-}
+ */
\ No newline at end of file
diff --git a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package.html b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package.html
deleted file mode 100644
index 3089dfc..0000000
--- a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<body>
-XML reader and writer classes for Maven POM, generated from <code>maven.mdo</code> model.
-These classes use
-<a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/pull/package-summary.html">plexus-utils'
-XML Pull Parser API</a> for their internal XML handling and
-<a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomBuilder.html">Xpp3DomBuilder</a> + 
-<a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3Dom.html">Xpp3Dom</a> for
-DOM content representation (see <code><configuration></code> elements).
-</body>
\ No newline at end of file
diff --git a/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
index 3c9e749..88e866b 100644
--- a/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
+++ b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
@@ -71,7 +71,16 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 /**
  * This is a hand-crafted prototype of the default model merger that should eventually be generated by Modello by a new
- * Java plugin.
+ * Java plugin. Code structure to merge source (read-only) object into the target object is:<ul>
+ * <li><code>merge<i>Classname</i>( <i>Classname</i> target, <i>Classname</i> source, boolean sourceDominant,
+ * Map<Object, Object> context )</code> for each model class</li>
+ * <li><code>merge<i>Classname</i>_<i>FieldName</i>( <i>Classname</i> target, <i>Classname</i> source, boolean
+ * sourceDominant, Map<Object, Object> context )</code> for each field of each model class</li>
+ * <li><code>Object get<i>Classname</i>Key( <i>Classname</i> <i>classname</i> )</code> for each class that is used in a list</li>
+ * </ul>
+ * Code is written like it could be generated, with default behaviour to be overridden when necessary.
+ * This is particularly the case for <code>Object get<i>Classname</i>Key( <i>Classname</i> <i>classname</i> )</code> method,
+ * which by default return the object itself and is expected to be overridden to calculate better suited key value.
  *
  * @author Benjamin Bentmann
  */
@@ -2834,79 +2843,79 @@ public class ModelMerger
         return dependency;
     }
 
-    protected Object getPluginKey( Plugin object )
+    protected Object getPluginKey( Plugin plugin )
     {
-        return object;
+        return plugin;
     }
 
-    protected Object getPluginExecutionKey( PluginExecution object )
+    protected Object getPluginExecutionKey( PluginExecution pluginExecution )
     {
-        return object;
+        return pluginExecution;
     }
 
-    protected Object getReportPluginKey( ReportPlugin object )
+    protected Object getReportPluginKey( ReportPlugin reportPlugin )
     {
-        return object;
+        return reportPlugin;
     }
 
-    protected Object getReportSetKey( ReportSet object )
+    protected Object getReportSetKey( ReportSet reportSet )
     {
-        return object;
+        return reportSet;
     }
 
-    protected Object getLicenseKey( License object )
+    protected Object getLicenseKey( License license )
     {
-        return object;
+        return license;
     }
 
-    protected Object getMailingListKey( MailingList object )
+    protected Object getMailingListKey( MailingList mailingList )
     {
-        return object;
+        return mailingList;
     }
 
-    protected Object getDeveloperKey( Developer object )
+    protected Object getDeveloperKey( Developer developer )
     {
-        return object;
+        return developer;
     }
 
-    protected Object getContributorKey( Contributor object )
+    protected Object getContributorKey( Contributor contributor )
     {
-        return object;
+        return contributor;
     }
 
-    protected Object getProfileKey( Profile object )
+    protected Object getProfileKey( Profile profile )
     {
-        return object;
+        return profile;
     }
 
-    protected Object getRepositoryKey( Repository object )
+    protected Object getRepositoryKey( Repository repository )
     {
-        return getRepositoryBaseKey( object );
+        return getRepositoryBaseKey( repository );
     }
 
-    protected Object getRepositoryBaseKey( RepositoryBase object )
+    protected Object getRepositoryBaseKey( RepositoryBase repositoryBase )
     {
-        return object;
+        return repositoryBase;
     }
 
-    protected Object getNotifierKey( Notifier object )
+    protected Object getNotifierKey( Notifier notifier )
     {
-        return object;
+        return notifier;
     }
 
-    protected Object getResourceKey( Resource object )
+    protected Object getResourceKey( Resource resource )
     {
-        return object;
+        return resource;
     }
 
-    protected Object getExtensionKey( Extension object )
+    protected Object getExtensionKey( Extension extension )
     {
-        return object;
+        return extension;
     }
 
-    protected Object getExclusionKey( Exclusion object )
+    protected Object getExclusionKey( Exclusion exclusion )
     {
-        return object;
+        return exclusion;
     }
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java b/maven-model/src/main/java/org/apache/maven/model/merge/package-info.java
similarity index 80%
copy from maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
copy to maven-model/src/main/java/org/apache/maven/model/merge/package-info.java
index 4dec0ee..156ae70 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
+++ b/maven-model/src/main/java/org/apache/maven/model/merge/package-info.java
@@ -1,4 +1,7 @@
-package org.apache.maven.exception;
+/**
+ * POM merger.
+ */
+package org.apache.maven.model.merge;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,7 +12,7 @@ package org.apache.maven.exception;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,8 +21,3 @@ package org.apache.maven.exception;
  * specific language governing permissions and limitations
  * under the License.
  */
-
-public interface ExceptionHandler    
-{
-    ExceptionSummary handleException( Throwable e );
-}
diff --git a/maven-model/src/main/java/org/apache/maven/model/merge/package.html b/maven-model/src/main/java/org/apache/maven/model/merge/package.html
deleted file mode 100644
index c7995ba..0000000
--- a/maven-model/src/main/java/org/apache/maven/model/merge/package.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<body>
-POM merger.
-</body>
diff --git a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java b/maven-model/src/main/java/org/apache/maven/model/package-info.java
similarity index 76%
copy from maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
copy to maven-model/src/main/java/org/apache/maven/model/package-info.java
index 4dec0ee..0a546d1 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
+++ b/maven-model/src/main/java/org/apache/maven/model/package-info.java
@@ -1,4 +1,8 @@
-package org.apache.maven.exception;
+/**
+ * Maven POM (Project Object Model) classes, generated from <code>maven.mdo</code> model.
+ * The root class is {@link org.apache.maven.model.Model}.
+ */
+package org.apache.maven.model;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,7 +13,7 @@ package org.apache.maven.exception;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -17,9 +21,4 @@ package org.apache.maven.exception;
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
-
-public interface ExceptionHandler    
-{
-    ExceptionSummary handleException( Throwable e );
-}
+ */
\ No newline at end of file
diff --git a/maven-model/src/main/java/org/apache/maven/model/package.html b/maven-model/src/main/java/org/apache/maven/model/package.html
deleted file mode 100644
index 4025ec7..0000000
--- a/maven-model/src/main/java/org/apache/maven/model/package.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<body>
-Maven POM (Project Object Model) classes, generated from <code>maven.mdo</code> model.
-The root class is <a href="Model.html">Model</a>.
-</body>
diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo
index 2f7d283..d1b413d 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -96,7 +96,7 @@
         </field>
         <field>
           <name>modelVersion</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>Declares to which version of project descriptor this POM conforms.</description>
           <type>String</type>
@@ -122,7 +122,7 @@
         </field>
         <field xdoc.separator="blank">
           <name>parent</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The location of the parent project, if one exists. Values from the parent
             project will be the default for this project if they are left unspecified. The location
             is given as a group ID, artifact ID and version.</description>
@@ -179,7 +179,7 @@
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>The current version of the artifact produced by this project.</description>
           <type>String</type>
@@ -195,7 +195,7 @@
         </field>
         <field>
           <name>packaging</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The type of artifact this project produces, for example <code>jar</code>
@@ -245,6 +245,7 @@
           <description>
             <![CDATA[
             The URL to the project's homepage.
+            <br /><b>Default value is</b>: parent value [+ path adjustment] + artifactId
             ]]>
           </description>
           <type>String</type>
@@ -349,7 +350,7 @@
 
         <field xdoc.separator="blank">
           <name>prerequisites</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Describes the prerequisites in the build environment for this project.</description>
           <association>
             <type>Prerequisites</type>
@@ -383,7 +384,7 @@
         </field>
         <field xdoc.separator="blank" xml.insertParentFieldsUpTo="modules">
           <name>scm</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Specification for the SCM used by the project, such as CVS, Subversion, etc.</description>
           <association>
             <type>Scm</type>
@@ -402,7 +403,7 @@
         </field>
         <field>
           <name>issueManagement</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The project's issue management system information.</description>
           <association>
             <type>IssueManagement</type>
@@ -421,7 +422,7 @@
         </field>
         <field>
           <name>ciManagement</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The project's continuous integration information.</description>
           <association>
             <type>CiManagement</type>
@@ -525,7 +526,7 @@
 
         <field xdoc.separator="blank" xml.insertParentFieldsUpTo="reporting">
           <name>profiles</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>A listing of project-local build profiles which will modify the build process
             when activated.</description>
           <association>
@@ -563,7 +564,7 @@
           </code>
         </codeSegment>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     private void cloneHook( Model copy )
@@ -642,9 +643,11 @@
       <fields>
         <field xdoc.separator="blank">
           <name>modules</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The modules (sometimes called subprojects) to build as a part of this
-            project. Each module listed is a relative path to the directory containing the module.</description>
+            project. Each module listed is a relative path to the directory containing the module.
+            To be consistent with the way default urls are calculated from parent, it is recommended
+            to have module names match artifact ids.</description>
           <association>
             <type>String</type>
             <multiplicity>*</multiplicity>
@@ -652,7 +655,7 @@
         </field>
         <field xdoc.separator="blank">
           <name>distributionManagement</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Distribution information for a project that enables deployment of the site
             and artifacts to remote web servers and repositories respectively.</description>
           <association>
@@ -661,7 +664,7 @@
         </field>
         <field xdoc.separator="blank">
           <name>properties</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Properties that can be used throughout the POM as a substitution, and
@@ -677,7 +680,7 @@
         </field>
         <field xdoc.separator="blank">
           <name>dependencyManagement</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>false</required>
           <description>Default dependency information for projects that inherit from this one. The
             dependencies in this section are not immediately resolved. Instead, when a POM derived
@@ -709,7 +712,7 @@
         </field>
         <field xdoc.separator="blank">
           <name>repositories</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The lists of the remote repositories for discovering dependencies and
             extensions.</description>
           <association>
@@ -719,7 +722,7 @@
         </field>
         <field>
           <name>pluginRepositories</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The lists of the remote repositories for discovering plugins for builds and
             reports.</description>
           <association>
@@ -729,7 +732,7 @@
         </field>
         <field xdoc.separator="blank">
           <name>reports</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             <b>Deprecated</b>. Now ignored by Maven.
@@ -739,7 +742,7 @@
         </field>
         <field>
           <name>reporting</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             This element includes the specification of report plugins to use
@@ -776,7 +779,7 @@
       <fields>
         <field>
           <name>plugins</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The list of plugins to use.</description>
           <association>
             <type>Plugin</type>
@@ -786,7 +789,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     java.util.Map<String, Plugin> pluginMap;
@@ -835,7 +838,7 @@
           | plugins to be used in sub-projects. -->
         <field>
           <name>pluginManagement</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>false</required>
           <description>Default plugin information to be made available for reference by projects
             derived from this one. This plugin configuration will not be resolved or bound to the
@@ -875,7 +878,7 @@
         </field>
         <field>
           <name>testResources</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>This element describes all of the classpath resources such as properties
             files associated with a project's unit tests.</description>
           <association>
@@ -885,13 +888,13 @@
         </field>
         <field>
           <name>directory</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The directory where all files generated by the build are placed.</description>
           <type>String</type>
         </field>
         <field>
           <name>finalName</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The filename (excluding the extension, and with no path information) that
@@ -903,7 +906,7 @@
         </field>
         <field>
           <name>filters</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The list of filter properties files that are used when filtering is enabled.</description>
           <association>
             <type>String</type>
@@ -941,7 +944,7 @@
         </field>
         <field>
           <name>scriptSourceDirectory</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>This element specifies a directory containing the script sources of the
             project. This directory is meant to be different from the sourceDirectory, in that its
@@ -960,7 +963,7 @@
         </field>
         <field>
           <name>testSourceDirectory</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>This element specifies a directory containing the unit test source of the
             project. The generated build system will compile these directories when the project is
@@ -1015,19 +1018,19 @@
         </field>
         <field>
           <name>outputDirectory</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The directory where compiled application classes are placed.</description>
           <type>String</type>
         </field>
         <field>
           <name>testOutputDirectory</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The directory where compiled test classes are placed.</description>
           <type>String</type>
         </field>
         <field>
           <name>extensions</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>A set of build extensions to use from this project.</description>
           <association>
             <type>Extension</type>
@@ -1038,7 +1041,7 @@
     </class>
     <class java.clone="deep">
       <name>CiManagement</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>
         <![CDATA[
         The <code><CiManagement></code> element contains informations required to the
@@ -1048,7 +1051,7 @@
       <fields>
         <field>
           <name>system</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The name of the continuous integration system, e.g. <code>continuum</code>.
@@ -1058,14 +1061,14 @@
         </field>
         <field>
           <name>url</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>URL for the continuous integration system used by the project if it has a web
             interface.</description>
           <type>String</type>
         </field>
         <field>
           <name>notifiers</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Configuration for notifying developers/users when a build is unsuccessful,
             including user information and notification mode.</description>
           <association>
@@ -1078,39 +1081,39 @@
     <class java.clone="deep">
       <name>Notifier</name>
       <description>Configures one method for notifying users/developers when a build breaks.</description>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <fields>
         <field>
           <name>type</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <defaultValue>mail</defaultValue>
           <type>String</type>
           <description>The mechanism used to deliver notifications.</description>
         </field>
         <field>
           <name>sendOnError</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <defaultValue>true</defaultValue>
           <type>boolean</type>
           <description>Whether to send notifications on error.</description>
         </field>
         <field>
           <name>sendOnFailure</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <defaultValue>true</defaultValue>
           <type>boolean</type>
           <description>Whether to send notifications on failure.</description>
         </field>
         <field>
           <name>sendOnSuccess</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <defaultValue>true</defaultValue>
           <type>boolean</type>
           <description>Whether to send notifications on success.</description>
         </field>
         <field>
           <name>sendOnWarning</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <defaultValue>true</defaultValue>
           <type>boolean</type>
           <description>Whether to send notifications on warning.</description>
@@ -1118,7 +1121,7 @@
         <!-- TODO: Remove it after continuum alpha-3 release -->
         <field>
           <name>address</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -1291,7 +1294,7 @@
           <version>3.0.0</version>
           <description>
             <![CDATA[
-            The type of dependency. This defaults to <code>jar</code>. While it
+            The type of dependency. While it
             usually represents the extension on the filename of the dependency,
             that is not always the case.
             Some examples are <code>jar</code>, <code>war</code>, and <code>plugin</code>.
@@ -1304,17 +1307,18 @@
         </field>
         <field>
           <name>type</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
-            The type of dependency. This defaults to <code>jar</code>. While it
+            The type of dependency. While it
             usually represents the extension on the filename of the dependency,
             that is not always the case. A type can be mapped to a different
             extension and a classifier.
-            The type often correspongs to the packaging used, though this is also
+            The type often corresponds to the packaging used, though this is also
             not always the case.
             Some examples are <code>jar</code>, <code>war</code>, <code>ejb-client</code>
-            and <code>test-jar</code>.
+            and <code>test-jar</code>: see <a href="../maven-core/artifact-handlers.html">default
+            artifact handlers</a> for a list.
             New types can be defined by plugins that set
             <code>extensions</code> to <code>true</code>, so this is not a complete list.
             ]]>
@@ -1324,12 +1328,18 @@
         </field>
         <field>
           <name>classifier</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
-            The classifier of the dependency. This allows distinguishing two artifacts
-            that belong to the same POM but were built differently, and is appended to
-            the filename after the version. For example, <code>jdk14</code> and <code>jdk15</code>.
+            The classifier of the dependency. It is appended to
+            the filename after the version. This allows:
+            <ul>
+            <li>refering to attached artifact, for example <code>sources</code> and <code>javadoc</code>:
+            see <a href="../maven-core/artifact-handlers.html">default artifact handlers</a> for a list,</li>
+            <li>distinguishing two artifacts
+            that belong to the same POM but were built differently.
+            For example, <code>jdk14</code> and <code>jdk15</code>.</li>
+            </ul>
             ]]>
           </description>
           <type>String</type>
@@ -1354,7 +1364,7 @@
         </field>
         <field>
           <name>scope</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The scope of the dependency - <code>compile</code>, <code>runtime</code>,
@@ -1375,7 +1385,7 @@
         </field>
         <field>
           <name>systemPath</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             FOR SYSTEM SCOPE ONLY. Note that use of this property is <b>discouraged</b>
@@ -1390,7 +1400,7 @@
         </field>
         <field>
           <name>exclusions</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Lists a set of artifacts that should be excluded from this dependency's
             artifact list when it comes to calculating transitive dependencies.</description>
           <association>
@@ -1400,7 +1410,7 @@
         </field>
         <field>
           <name>optional</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Indicates the dependency is optional for use of this library. While the
@@ -1429,7 +1439,7 @@
           </code>
         </codeSegment>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     public boolean isOptional()
@@ -1453,7 +1463,7 @@
           </code>
         </codeSegment>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     /**
@@ -1589,7 +1599,7 @@
     </class>
     <class java.clone="deep">
       <name>Exclusion</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>
         <![CDATA[
         The <code><exclusion></code> element contains informations required to exclude
@@ -1599,14 +1609,14 @@
       <fields>
         <field>
           <name>artifactId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The artifact ID of the project to exclude.</description>
           <type>String</type>
           <required>true</required>
         </field>
         <field>
           <name>groupId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The group ID of the project to exclude.</description>
           <type>String</type>
           <required>true</required>
@@ -1617,17 +1627,17 @@
       <name>IssueManagement</name>
       <description>Information about the issue tracking (or bug tracking) system used to manage this
         project.</description>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <fields>
         <field>
           <name>system</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The name of the issue management system, e.g. Bugzilla</description>
           <type>String</type>
         </field>
         <field>
           <name>url</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>URL for the issue management system used by the project.</description>
           <type>String</type>
         </field>
@@ -1635,13 +1645,13 @@
     </class>
     <class java.clone="deep">
       <name>DistributionManagement</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>This elements describes all that pertains to distribution for a project. It is
         primarily used for deployment of artifacts and the site produced by the build.</description>
       <fields>
         <field>
           <name>repository</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Information needed to deploy the artifacts generated by the project to a
             remote repository.</description>
           <association>
@@ -1650,7 +1660,7 @@
         </field>
         <field>
           <name>snapshotRepository</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Where to deploy snapshots of artifacts to. If not given, it defaults to the
@@ -1664,7 +1674,7 @@
         <field>
           <name>site</name>
           <description>Information needed for deploying the web site of the project.</description>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <association>
             <type>Site</type>
           </association>
@@ -1684,7 +1694,7 @@
         </field>
         <field>
           <name>relocation</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Relocation information of the artifact if it has been moved to a new group ID
             and/or artifact ID.</description>
           <association>
@@ -1693,7 +1703,7 @@
         </field>
         <field>
           <name>status</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Gives the status of this artifact in the remote repository.
@@ -1915,7 +1925,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     /**
@@ -1951,7 +1961,7 @@
     </class>
     <class java.clone="deep">
       <name>Parent</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>
         <![CDATA[
         The <code><parent></code> element contains information required to locate the parent project from which
@@ -1962,27 +1972,27 @@
       <fields>
         <field>
           <name>groupId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The group id of the parent project to inherit from.</description>
           <required>true</required>
           <type>String</type>
         </field>
         <field>
           <name>artifactId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The artifact id of the parent project to inherit from.</description>
           <required>true</required>
           <type>String</type>
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The version of the parent project to inherit.</description>
           <type>String</type>
         </field>
         <field>
           <name>relativePath</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The relative path of the parent <code>pom.xml</code> file within the check out.
@@ -2004,7 +2014,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     /**
@@ -2082,7 +2092,7 @@
     </class>
     <class java.clone="deep">
       <name>Scm</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>
         <![CDATA[
         The <code><scm></code> element contains informations required to the SCM
@@ -2092,7 +2102,7 @@
       <fields>
         <field>
           <name>connection</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The source control management system URL
@@ -2101,32 +2111,39 @@
             <a href="http://maven.apache.org/scm/scm-url-format.html">URL format</a>
             and <a href="http://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>.
             This connection is read-only.
+            <br /><b>Default value is</b>: parent value [+ path adjustment] + artifactId
             ]]>
           </description>
           <type>String</type>
         </field>
         <field>
           <name>developerConnection</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Just like <code>connection</code>, but for developers, i.e. this scm connection
             will not be read only.
+            <br /><b>Default value is</b>: parent value [+ path adjustment] + artifactId
             ]]>
           </description>
           <type>String</type>
         </field>
         <field>
           <name>tag</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The tag of current code. By default, it's set to HEAD during development.</description>
           <type>String</type>
           <defaultValue>HEAD</defaultValue>
         </field>
         <field>
           <name>url</name>
-          <version>4.0.0</version>
-          <description>The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.</description>
+          <version>4.0.0+</version>
+          <description>
+            <![CDATA[
+            The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.
+            <br /><b>Default value is</b>: parent value [+ path adjustment] + artifactId
+            ]]>
+          </description>
           <type>String</type>
         </field>
       </fields>
@@ -2147,7 +2164,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     /**
@@ -2216,7 +2233,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     private static int mergeIdCounter = 0;
@@ -2361,13 +2378,13 @@
 
     <class java.clone="deep">
       <name>RepositoryBase</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>A repository contains the information needed for establishing connections with
         remote repository.</description>
       <fields>
         <field>
           <name>id</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <identifier>true</identifier>
           <description>
@@ -2381,13 +2398,13 @@
         </field>
         <field>
           <name>name</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Human readable name of the repository.</description>
           <type>String</type>
         </field>
         <field>
           <name>url</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>
             <![CDATA[
@@ -2398,7 +2415,7 @@
         </field>
         <field>
           <name>layout</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The type of layout this repository uses for locating and storing artifacts -
@@ -2414,13 +2431,13 @@
     <class>
       <name>Repository</name>
       <superClass>RepositoryBase</superClass>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>A repository contains the information needed for establishing connections with
         remote repository.</description>
       <fields>
         <field>
           <name>releases</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>How to handle downloading of releases from this repository.</description>
           <association>
             <type>RepositoryPolicy</type>
@@ -2428,7 +2445,7 @@
         </field>
         <field>
           <name>snapshots</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>How to handle downloading of snapshots from this repository.</description>
           <association>
             <type>RepositoryPolicy</type>
@@ -2440,7 +2457,7 @@
     <class>
       <name>DeploymentRepository</name>
       <superClass>Repository</superClass>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Repository contains the information needed for deploying to the remote
         repository.</description>
       <fields>
@@ -2450,19 +2467,19 @@
             build number, or to use the same version each time</description>
           <type>boolean</type>
           <defaultValue>true</defaultValue>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
         </field>
       </fields>
     </class>
 
     <class java.clone="deep">
       <name>RepositoryPolicy</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Download policy.</description>
       <fields>
         <field>
           <name>enabled</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Whether to use this repository for downloading this type of artifact. Note: While the type
@@ -2474,7 +2491,7 @@
         </field>
         <field>
           <name>updatePolicy</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The frequency for downloading updates - can be
@@ -2491,7 +2508,7 @@
         </field>
         <field>
           <name>checksumPolicy</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             What to do when verification of an artifact checksum fails. Valid values are
@@ -2508,7 +2525,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
 
@@ -2531,12 +2548,12 @@
     <!-- at todo find better solution for management of site deployments -->
     <class java.clone="deep">
       <name>Site</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Contains the information needed for deploying websites.</description>
       <fields>
         <field>
           <name>id</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             A unique identifier for a deployment location. This is used to match the
@@ -2547,16 +2564,17 @@
         </field>
         <field>
           <name>name</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Human readable name of the deployment location.</description>
           <type>String</type>
         </field>
         <field>
           <name>url</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             The url of the location where website is deployed, in the form <code>protocol://hostname/path</code>.
+            <br /><b>Default value is</b>: parent value [+ path adjustment] + artifactId
             ]]>
           </description>
           <type>String</type>
@@ -2566,12 +2584,12 @@
 
     <class java.clone="deep">
       <name>ConfigurationContainer</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Contains the configuration information of the container like Plugin.</description>
       <fields>
         <field>
           <name>inherited</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Whether any configuration should be propagated to child POMs. Note: While the type
@@ -2584,16 +2602,18 @@
         <field>
           <description>
             <![CDATA[
-            The configuration as DOM object.
-            You can control how child POMs inherit configuration from parent POMs by adding <code>combine.children</code>
-            or <code>combine.self</code> attributes to the children of the configuration element:
+            <p>The configuration as DOM object.</p>
+            <p>By default, every element content is trimmed, but starting with Maven 3.1.0, you can add
+            <code>xml:space="preserve"</code> to elements you want to preserve whitespace.</p>
+            <p>You can control how child POMs inherit configuration from parent POMs by adding <code>combine.children</code>
+            or <code>combine.self</code> attributes to the children of the configuration element:</p>
             <ul>
             <li><code>combine.children</code>: available values are <code>merge</code> (default) and <code>append</code>,</li>
             <li><code>combine.self</code>: available values are <code>merge</code> (default) and <code>override</code>.</li>
             </ul>
-            See <a href="http://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and
+            <p>See <a href="http://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and
             <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
-            for more information.
+            for more information.</p>
             ]]>
           </description>
           <name>configuration</name>
@@ -2602,7 +2622,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     public boolean isInherited()
@@ -2633,7 +2653,7 @@
     </class>
     <class>
       <name>Plugin</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <superClass>ConfigurationContainer</superClass>
       <description>
         <![CDATA[
@@ -2644,26 +2664,26 @@
         <field>
           <name>groupId</name>
           <description>The group ID of the plugin in the repository.</description>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <defaultValue>org.apache.maven.plugins</defaultValue>
         </field>
         <field>
           <name>artifactId</name>
           <description>The artifact ID of the plugin in the repository.</description>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <required>true</required>
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The version (or valid range of versions) of the plugin to be used.</description>
           <type>String</type>
         </field>
         <field>
           <name>extensions</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -2676,7 +2696,7 @@
         </field>
         <field>
           <name>executions</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Multiple specifications of a set of goals to execute during the build
             lifecycle, each having (possibly) a different configuration.</description>
           <association>
@@ -2688,7 +2708,7 @@
           <name>dependencies</name>
           <description>Additional dependencies that this project needs to introduce to the plugin's
             classloader.</description>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <association>
             <type>Dependency</type>
             <multiplicity>*</multiplicity>
@@ -2696,7 +2716,7 @@
         </field>
         <field>
           <name>goals</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             <b>Deprecated</b>. Unused by Maven.
@@ -2707,7 +2727,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     public boolean isExtensions()
@@ -2837,7 +2857,7 @@
     </class>
     <class>
       <name>PluginExecution</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <superClass>ConfigurationContainer</superClass>
       <description>
         <![CDATA[
@@ -2848,7 +2868,7 @@
       <fields>
         <field>
           <name>id</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <defaultValue>default</defaultValue>
           <description>The identifier of this execution for labelling the goals during the build,
@@ -2856,14 +2876,14 @@
         </field>
         <field>
           <name>phase</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The build lifecycle phase to bind the goals in this execution to. If omitted,
             the goals will be bound to the default phase specified in their metadata. </description>
         </field>
         <field xml.transient="true">
           <name>priority</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>int</type>
           <description>
             <![CDATA[
@@ -2876,7 +2896,7 @@
         </field>
         <field>
           <name>goals</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The goals to execute with the given configuration.</description>
           <association>
             <type>String</type>
@@ -2886,7 +2906,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     public static final String DEFAULT_EXECUTION_ID = "default";
@@ -2903,13 +2923,13 @@
     </class>
     <class java.clone="deep">
       <name>DependencyManagement</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Section for management of default dependency information for use in a group of
         POMs.</description>
       <fields>
         <field>
           <name>dependencies</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The dependencies specified here are not used until they are referenced in a
             POM within the group. This allows the specification of a "standard" version for a
             particular dependency.</description>
@@ -2922,19 +2942,19 @@
     </class>
     <class>
       <name>PluginManagement</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <superClass>PluginContainer</superClass>
       <description>Section for management of default plugin information for use in a group of POMs.
       </description>
     </class>
     <class java.clone="deep">
       <name>Reporting</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Section for management of reports and their configuration.</description>
       <fields>
         <field>
           <name>excludeDefaults</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -2947,7 +2967,7 @@
         </field>
         <field>
           <name>outputDirectory</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -2960,7 +2980,7 @@
         </field>
         <field>
           <name>plugins</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The reporting plugins to use and their configuration.</description>
           <association>
             <type>ReportPlugin</type>
@@ -2970,7 +2990,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     public boolean isExcludeDefaults()
@@ -3023,14 +3043,14 @@
     <class>
       <name>Profile</name>
       <superClass>ModelBase</superClass>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Modifications to the build process which is activated based on environmental
         parameters or command line arguments.</description>
       <fields>
         <field>
           <name>id</name>
           <required>true</required>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <defaultValue>default</defaultValue>
           <description>The identifier of this build profile. This is used for command line
@@ -3039,7 +3059,7 @@
         </field>
         <field>
           <name>activation</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The conditional logic which will automatically trigger the inclusion of this
             profile.</description>
           <association>
@@ -3048,7 +3068,7 @@
         </field>
         <field xml.tagName="build">
           <name>build</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>Information required to build the project.</description>
           <association>
@@ -3058,7 +3078,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     public static final String SOURCE_POM = "pom";
@@ -3093,13 +3113,13 @@
     </class>
     <class java.clone="deep">
       <name>Activation</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>The conditions within the build runtime environment which will trigger the
         automatic inclusion of the build profile.</description>
       <fields>
         <field>
           <name>activeByDefault</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>boolean</type>
           <description>If set to true, this profile will be active unless another profile in this
             pom is activated using the command line -P option or by one of that profile's
@@ -3107,7 +3127,7 @@
         </field>
         <field>
           <name>jdk</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -3119,7 +3139,7 @@
         </field>
         <field>
           <name>os</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Specifies that this profile will be activated when matching operating system
             attributes are detected.</description>
           <association>
@@ -3128,7 +3148,7 @@
         </field>
         <field>
           <name>property</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Specifies that this profile will be activated when this system property is
             specified.</description>
           <association>
@@ -3137,7 +3157,7 @@
         </field>
         <field>
           <name>file</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Specifies that this profile will be activated based on existence of a file.</description>
           <association>
             <type>ActivationFile</type>
@@ -3147,7 +3167,7 @@
         This could be included once we teach Maven to deal with multiple versions of the model
         <field>
           <name>custom</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>Describes a custom profile activation trigger, brought in via build
             extension.</description>
           <association>
@@ -3159,21 +3179,21 @@
     </class>
     <class java.clone="deep">
       <name>ActivationProperty</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>This is the property specification used to activate a profile. If the value field
         is empty, then the existence of the named property will activate the profile, otherwise it
         does a case-sensitive match against the property value as well.</description>
       <fields>
         <field>
           <name>name</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <required>true</required>
           <description>The name of the property to be used to activate a profile.</description>
         </field>
         <field>
           <name>value</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The value of the property required to activate a profile.</description>
         </field>
@@ -3181,13 +3201,13 @@
     </class>
     <class java.clone="deep">
       <name>ActivationOS</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>This is an activator which will detect an operating system's attributes in order
         to activate its profile.</description>
       <fields>
         <field>
           <name>name</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -3198,7 +3218,7 @@
         </field>
         <field>
           <name>family</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>
             <![CDATA[
@@ -3209,14 +3229,14 @@
         </field>
         <field>
           <name>arch</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The architecture of the operating system to be used to activate the
           profile.</description>
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The version of the operating system to be used to activate the
           profile.</description>
@@ -3225,7 +3245,7 @@
     </class>
     <class java.clone="deep">
       <name>ActivationFile</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>This is the file specification used to activate the profile. The missing value
         will be the location of a file that needs to exist, and if it doesn't the profile will be
         activated. On the other hand exists will test for the existence of the file and if it is
@@ -3233,14 +3253,14 @@
       <fields>
         <field>
           <name>missing</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The name of the file that must be missing to activate the
           profile.</description>
         </field>
         <field>
           <name>exists</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The name of the file that must exist to activate the profile.</description>
         </field>
@@ -3250,19 +3270,19 @@
     This can be put back in when we figure out how to have multiple model versions
     <class>
       <name>ActivationCustom</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>This activation allows users to specify their own custom trigger for a profile.</description>
       <fields>
         <field>
           <name>configuration</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>DOM</type>
           <description>The specification for triggering the profile according to the rules of the
             custom activation type.</description>
         </field>
         <field>
           <name>type</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <description>The type (role-hint) of activation which is to be used to activate the
             profile.</description>
@@ -3273,7 +3293,7 @@
     <!-- /BuildProfile support -->
     <class xml.tagName="plugin" java.clone="deep">
       <name>ReportPlugin</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <superClass>ConfigurationContainer</superClass>
       <description>
         <![CDATA[
@@ -3283,7 +3303,7 @@
       <fields>
         <field>
           <name>groupId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <required>true</required>
           <defaultValue>org.apache.maven.plugins</defaultValue>
@@ -3291,20 +3311,20 @@
         </field>
         <field>
           <name>artifactId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <required>true</required>
           <description>The artifact ID of the reporting plugin in the repository.</description>
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The version of the reporting plugin to be used.</description>
           <type>String</type>
         </field>
         <field>
           <name>reportSets</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>
             <![CDATA[
             Multiple specifications of a set of reports, each having (possibly) different
@@ -3319,7 +3339,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     private java.util.Map<String, ReportSet> reportSetMap = null;
@@ -3378,7 +3398,7 @@
     </class>
     <class java.clone="deep">
       <name>ReportSet</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <superClass>ConfigurationContainer</superClass>
       <description>Represents a set of reports and configuration to be used to generate them.</description>
       <fields>
@@ -3393,7 +3413,7 @@
         </field>
         <field>
           <name>reports</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <required>true</required>
           <description>The list of reports from this plugin which should be generated from this set.</description>
           <association>
@@ -3404,7 +3424,7 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     @Override
@@ -3419,12 +3439,12 @@
     </class>
     <class java.clone="deep">
       <name>Prerequisites</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Describes the prerequisites a project can have.</description>
       <fields>
         <field>
           <name>maven</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <type>String</type>
           <defaultValue>2.0</defaultValue>
           <description>The minimum version of Maven required to build the project, or to use this
@@ -3435,31 +3455,31 @@
     </class>
     <class java.clone="deep">
       <name>Relocation</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Describes where an artifact has moved to. If any of the values are omitted, it is
         assumed to be the same as it was before.</description>
       <fields>
         <field>
           <name>groupId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The group ID the artifact has moved to.</description>
           <type>String</type>
         </field>
         <field>
           <name>artifactId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The new artifact ID of the artifact.</description>
           <type>String</type>
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The new version of the artifact.</description>
           <type>String</type>
         </field>
         <field>
           <name>message</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>An additional message to show the user about the move, such as the reason.</description>
           <type>String</type>
         </field>
@@ -3467,33 +3487,33 @@
     </class>
     <class java.clone="deep">
       <name>Extension</name>
-      <version>4.0.0</version>
+      <version>4.0.0+</version>
       <description>Describes a build extension to utilise.</description>
       <fields>
         <field>
           <name>groupId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The group ID of the extension's artifact.</description>
           <required>true</required>
           <type>String</type>
         </field>
         <field>
           <name>artifactId</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The artifact ID of the extension.</description>
           <required>true</required>
           <type>String</type>
         </field>
         <field>
           <name>version</name>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <description>The version of the extension.</description>
           <type>String</type>
         </field>
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>4.0.0</version>
+          <version>4.0.0+</version>
           <code>
             <![CDATA[
     /**
diff --git a/maven-model/src/site/apt/index.apt b/maven-model/src/site/apt/index.apt
index 0b271a8..77ec508 100644
--- a/maven-model/src/site/apt/index.apt
+++ b/maven-model/src/site/apt/index.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Introduction
  -----
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 24509bb..d899721 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-plugin-api</artifactId>
@@ -33,6 +33,12 @@ under the License.
   <name>Maven Plugin API</name>
   <description>The API for plugins - Mojos - development.</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -49,8 +55,8 @@ under the License.
       </exclusions>
     </dependency>
     <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-inject-plexus</artifactId>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
   </dependencies>
 
@@ -66,6 +72,16 @@ under the License.
           </models>
           <version>1.0.0</version>
         </configuration>
+        <executions>
+          <execution>
+            <id>site-docs</id>
+            <configuration>
+              <models combine.children="append">
+                <model>src/main/mdo/plugin.mdo</model><!-- plugin.mdo is only for documentation, not used for code generation -->
+              </models>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
index 31ff57b..f084b13 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
@@ -63,28 +63,42 @@ public class MojoDescriptor
     /** By default, the execution strategy is "once-per-session" */
     private String executionStrategy = SINGLE_PASS_EXEC_STRATEGY;
 
-    /** The goal name of the Mojo */
+    /**
+     * The goal name for the Mojo, that users will reference from the command line to execute the Mojo directly, or
+     * inside a POM in order to provide Mojo-specific configuration.
+     */
     private String goal;
 
-    /** Reference the binded phase name of the Mojo */
+    /**
+     * Defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM.
+     * <i>Note:</i> This will not automagically make a mojo run when the plugin declaration is added to the POM. It
+     * merely enables the user to omit the <code><phase></code> element from the surrounding
+     * <code><execution></code> element.
+     */
     private String phase;
 
     /** Specify the version when the Mojo was added to the API. Similar to Javadoc since. */
     private String since;
 
-    /** Reference the invocation phase of the Mojo */
+    /** Reference the invocation phase of the Mojo. */
     private String executePhase;
 
-    /** Reference the invocation goal of the Mojo */
+    /** Reference the invocation goal of the Mojo. */
     private String executeGoal;
 
-    /** Reference the invocation lifecycle of the Mojo */
+    /** Reference the invocation lifecycle of the Mojo. */
     private String executeLifecycle;
 
-    /** Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. */
+    /**
+     * Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. This will trigger a
+     * warning when a user tries to configure a parameter marked as deprecated.
+     */
     private String deprecated;
 
-    /** By default, no need to aggregate the Maven project and its child modules */
+    /**
+     * Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed as
+     * modules. By default, no need to aggregate the Maven project and its child modules
+     */
     private boolean aggregator = false;
 
     // ----------------------------------------------------------------------
@@ -94,7 +108,10 @@ public class MojoDescriptor
     /** Specify the required dependencies in a specified scope */
     private String dependencyResolutionRequired = null;
 
-    /** The scope of (transitive) dependencies that should be collected but not resolved. */
+    /**
+     * The scope of (transitive) dependencies that should be collected but not resolved.
+     * @since 3.0-alpha-3
+     */
     private String dependencyCollectionRequired;
 
     /**  By default, the Mojo needs a Maven project to be executed */
@@ -112,13 +129,16 @@ public class MojoDescriptor
     /**  By default, the Mojo is inherited */
     private boolean inheritedByDefault = true;
 
-    /**  By default, the Mojo could not be invoke directly */
+    /**  By default, the Mojo cannot be invoked directly */
     private boolean directInvocationOnly = false;
 
     /**  By default, the Mojo don't need reports to run */
     private boolean requiresReports = false;
 
-    /** By default, mojos are not threadsafe */
+    /**
+     * By default, mojos are not threadsafe
+     * @since 3.0-beta-2
+     */
     private boolean threadSafe = false;
 
     /**
@@ -257,6 +277,9 @@ public class MojoDescriptor
         return dependencyResolutionRequired;
     }
 
+    /**
+     * @since 3.0-alpha-3
+     */
     public void setDependencyCollectionRequired( String requiresDependencyCollection )
     {
         this.dependencyCollectionRequired = requiresDependencyCollection;
@@ -265,9 +288,12 @@ public class MojoDescriptor
     /**
      * Gets the scope of (transitive) dependencies that should be collected. Dependency collection refers to the process
      * of calculating the complete dependency tree in terms of artifact coordinates. In contrast to dependency
-     * resolution, this does not include the download of the files for the dependency artifacts.
-     *
+     * resolution, this does not include the download of the files for the dependency artifacts. It is meant for mojos
+     * that only want to analyze the set of transitive dependencies, in particular during early lifecycle phases where
+     * full dependency resolution might fail due to projects which haven't been built yet.
+     * 
      * @return The scope of (transitive) dependencies that should be collected or {@code null} if none.
+     * @since 3.0-alpha-3
      */
     public String getDependencyCollectionRequired()
     {
@@ -519,12 +545,8 @@ public class MojoDescriptor
                 return false;
             }
 
-            if ( !compareObjects( getGoal(), other.getGoal() ) )
-            {
-                return false;
-            }
+            return compareObjects( getGoal(), other.getGoal() );
 
-            return true;
         }
 
         return false;
@@ -597,7 +619,7 @@ public class MojoDescriptor
     }
 
     /**
-     * @return <code>true</code> if the Mojo could not be invoke directly, <code>false</code> otherwise.
+     * @return <code>true</code> if the Mojo cannot be invoked directly, <code>false</code> otherwise.
      */
     public boolean isDirectInvocationOnly()
     {
@@ -605,7 +627,7 @@ public class MojoDescriptor
     }
 
     /**
-     * @param directInvocationOnly <code>true</code> if the Mojo could not be invoke directly,
+     * @param directInvocationOnly <code>true</code> if the Mojo cannot be invoked directly,
      * <code>false</code> otherwise.
      */
     public void setDirectInvocationOnly( boolean directInvocationOnly )
@@ -648,6 +670,7 @@ public class MojoDescriptor
 
     /**
      * @return True if the <code>Mojo</code> is thread-safe and can be run safely in parallel
+     * @since 3.0-beta-2
      */
     public boolean isThreadSafe()
     {
@@ -656,6 +679,7 @@ public class MojoDescriptor
 
     /**
      * @param threadSafe indicates that the mojo is thread-safe and can be run safely in parallel
+     * @since 3.0-beta-2
      */
     public void setThreadSafe( boolean threadSafe )
     {
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
index 856893b..02b19c8 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
@@ -249,6 +249,12 @@ public class PluginDescriptor
         artifactMap = null;
     }
 
+    /**
+     * The map of artifacts accessible by the versionlessKey, i.e. groupId:artifactId
+     * 
+     * @return a Map of artifacts, never {@code null}
+     * @see #getArtifacts()
+     */
     public Map<String, Artifact> getArtifactMap()
     {
         if ( artifactMap == null )
diff --git a/maven-plugin-api/src/main/mdo/plugin.mdo b/maven-plugin-api/src/main/mdo/plugin.mdo
index 5af6aca..fd7e0c4 100644
--- a/maven-plugin-api/src/main/mdo/plugin.mdo
+++ b/maven-plugin-api/src/main/mdo/plugin.mdo
@@ -27,6 +27,8 @@ under the License.
     Plugin descriptor, stored in <code>META-INF/maven/plugin.xml</code> in a plugin's jar artifact.
     This descriptor is generally generated from plugin sources, using
     <a href="/plugins/maven-plugin-plugin/">maven-plugin-plugin</a>.
+    <i>Notice:</i> this documentation is generated from a Modello model but the code executed is not generated
+    from this descriptor. Please report if you find anything wrong.
   ]]></description>
   <defaults>
     <default>
@@ -39,6 +41,7 @@ under the License.
       <name>PluginDescriptor</name>
       <version>1.0.0</version>
       <description><![CDATA[Root element of the <code>plugin.xml</code> file.]]></description>
+      <!-- see o.a.m.plugin.descriptor.PluginDescriptor -->
       <fields>
         <field>
           <name>description</name>
@@ -114,6 +117,7 @@ under the License.
       <description><![CDATA[
         A Mojo description.
       ]]></description>
+      <!-- see o.a.m.plugin.descriptor.MojoDescriptor -->
       <fields>
         <field>
           <name>goal</name>
@@ -121,7 +125,7 @@ under the License.
           <version>1.0.0</version>
           <type>String</type>
           <description>
-            The name for the Mojo that users will reference from the command line to execute the Mojo directly,
+            The goal name for the Mojo, that users will reference from the command line to execute the Mojo directly,
             or inside a POM in order to provide Mojo-specific configuration.
           </description>
         </field>
@@ -144,7 +148,7 @@ under the License.
           <version>1.0.0</version>
           <type>String</type>
           <defaultValue>java</defaultValue>
-          <description>The implementation language for this Mojo (Java, beanshell, etc.).</description>
+          <description>The implementation language for this Mojo (java, beanshell, etc.).</description>
         </field>
         <field>
           <name>phase</name>
@@ -152,7 +156,7 @@ under the License.
           <type>String</type>
           <description><![CDATA[
             Defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM.
-            <i>Note:</i> This annotation will not automagically make a mojo run when the plugin declaration is added
+            <i>Note:</i> This will not automagically make a mojo run when the plugin declaration is added
             to the POM. It merely enables the user to omit the <code><phase></code> element from the
             surrounding <code><execution></code> element.
           ]]></description>
@@ -161,13 +165,13 @@ under the License.
           <name>executePhase</name>
           <version>1.0.0</version>
           <type>String</type>
-          <description></description>
+          <description>Reference the invocation phase of the Mojo.</description>
         </field>
         <field>
           <name>executeGoal</name>
           <version>1.0.0</version>
           <type>String</type>
-          <description></description>
+          <description>Reference the invocation goal of the Mojo.</description>
         </field>
         <field>
           <name>executeLifecycle</name>
@@ -183,7 +187,7 @@ under the License.
           <description><![CDATA[
             Flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can
             execute: <code>compile</code>, <code>runtime</code>, <code>test</code>,
-            <code>compile+runtime</code> (since Maven 3.0)
+            <code>compile+runtime</code> (since Maven 3.0) or <code>runtime+system</code> (since Maven 3.0)
           ]]></description>
         </field>
         <field>
@@ -203,21 +207,21 @@ under the License.
           <name>requiresDirectInvocation</name>
           <version>1.0.0</version>
           <type>boolean</type>
-          <description>Flags this Mojo to be invoked directly.</description>
+          <description>Flags this Mojo to be invoked directly only.</description>
           <defaultValue>false</defaultValue>
         </field>
         <field>
           <name>requiresProject</name>
           <version>1.0.0</version>
           <type>boolean</type>
-          <description>Flags this Mojo to run inside of a project.</description>
+          <description>Flags this Mojo to require running inside of a project.</description>
           <defaultValue>true</defaultValue>
         </field>
         <field>
           <name>requiresReports</name>
           <version>1.0.0</version>
           <type>boolean</type>
-          <description>Flags this Mojo to require reports. Unsupported since Maven 3.0.</description>
+          <description>Flags this Mojo to require running inside of a reports context. Unsupported since Maven 3.0.</description>
           <defaultValue>false</defaultValue>
         </field>
         <field>
@@ -235,6 +239,7 @@ under the License.
             Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects
             listed as modules.
           </description>
+          <defaultValue>false</defaultValue>
         </field>
         <field>
           <name>inheritedByDefault</name>
@@ -252,6 +257,7 @@ under the License.
             builds. Mojos without this annotation will make Maven output a warning when used during a parallel build
             session. Since Maven 3.0.
           </description>
+          <defaultValue>false</defaultValue>
         </field>
         <field>
           <name>instantiationStrategy</name>
@@ -267,6 +273,7 @@ under the License.
           <description><![CDATA[
             Specify the execution strategy: <code>once-per-session</code>, <code>always</code>.
           ]]></description>
+          <defaultValue>once-per-session</defaultValue>
         </field>
         <field>
           <name>since</name>
@@ -333,6 +340,7 @@ under the License.
       <name>Parameter</name>
       <version>1.0.0</version>
       <description>A phase mapping definition.</description>
+      <!-- see o.a.m.plugin.descriptor.Parameter -->
       <fields>
         <field>
           <name>name</name>
@@ -340,7 +348,7 @@ under the License.
           <type>String</type>
           <required>true</required>
           <description>
-            The name of the parameter, to be used in configuring this parameter from the Mojo's declared defaults
+            The name of the parameter, to be used while configuring this parameter from the Mojo's declared defaults
             or from the POM.
           </description>
         </field>
@@ -379,7 +387,7 @@ under the License.
           <type>boolean</type>
           <defaultValue>true</defaultValue>
           <description><![CDATA[
-            Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified
+            Specifies that this parameter can be configured directly by the user (as in the case of POM-specified
             configuration). This is useful when you want to force the user to use common POM elements rather than
             plugin configurations, as in the case where you want to use the artifact's final name as a parameter. In
             this case, you want the user to modify <code><build><finalName/></build></code> rather
@@ -422,13 +430,14 @@ under the License.
       <name>Configuration</name>
       <version>1.0.0</version>
       <description>A parameter configuration.</description>
+      <!-- see o.a.m.plugin.descriptor.Parameter -->
       <fields>
         <field xml.content="true">
           <name>expression</name>
           <required>true</required>
           <version>1.0.0</version>
           <type>String</type>
-          <description>Parameter expression.</description>
+          <description>Parameter expression, to let user override default value with a system property, pom property or settings property.</description>
         </field>
         <field xml.attribute="true" xml.tagName="implementation">
           <name>implementation</name>
@@ -440,7 +449,7 @@ under the License.
           <name>defaultValue</name>
           <version>1.0.0</version>
           <type>String</type>
-          <description></description>
+          <description>The default value, as an expression that will be evaluated at injection or run-time.</description>
         </field>
       </fields>
     </class>
@@ -448,7 +457,8 @@ under the License.
     <class>
       <name>Requirement</name>
       <version>1.0.0</version>
-      <description></description>
+      <description>Describes a component requirement.</description>
+      <!-- see o.a.m.plugin.descriptor.Requirement -->
       <fields>
         <field>
           <name>role</name>
@@ -468,7 +478,7 @@ under the License.
           <required>true</required>
           <version>1.0.0</version>
           <type>String</type>
-          <description></description>
+          <description>The field name which has this requirement.</description>
         </field>
       </fields>
     </class>
diff --git a/maven-plugin-api/src/site/apt/index.apt b/maven-plugin-api/src/site/apt/index.apt
index 6c04123..6eb5955 100644
--- a/maven-plugin-api/src/site/apt/index.apt
+++ b/maven-plugin-api/src/site/apt/index.apt
@@ -1,20 +1,39 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Introduction
  -----
  Hervé Boutemy
  -----
- 2011-10-16
+ 2012-06-02
  -----
 
 Maven Plugin API
 
- The API for plugins - Mojos - development.
+ The API for plugins - composed of goals implemented by Mojos - development.
 
  A plugin is described in a {{{./plugin.html}<<<META-INF/maven/plugin.xml>>> plugin descriptor}},
- generally generated from plugin sources using {{{/plugins/maven-plugin-plugin/}maven-plugin-plugin}}.
+ generally generated from plugin sources using {{{/plugin-tools/maven-plugin-plugin/}maven-plugin-plugin}}.
 
 * See Also
 
  * {{{/developers/mojo-api-specification.html}Mojo API Specification}}
 
- * {{{/plugin-tools/}plugin-tools}}, containing {{{/plugins/maven-plugin-plugin/}maven-plugin-plugin}}
+ * {{{/plugin-tools/}plugin-tools}}
+
+ * {{{/plugin-testing/}plugin-testing}}
diff --git a/maven-plugin-api/src/test/resources/plugin.xml b/maven-plugin-api/src/test/resources/plugin.xml
index c5d4e8a..49db316 100644
--- a/maven-plugin-api/src/test/resources/plugin.xml
+++ b/maven-plugin-api/src/test/resources/plugin.xml
@@ -1,4 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <plugin>
   <description>plugin-description</description>
   <groupId>org.apache.maven.plugins</groupId>
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index 4edf520..e19d045 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-repository-metadata</artifactId>
@@ -33,6 +33,12 @@ under the License.
   <name>Maven Repository Metadata Model</name>
   <description>Per-directory local and remote repository metadata.</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
diff --git a/maven-repository-metadata/src/main/mdo/metadata.mdo b/maven-repository-metadata/src/main/mdo/metadata.mdo
index f380c19..9792002 100644
--- a/maven-repository-metadata/src/main/mdo/metadata.mdo
+++ b/maven-repository-metadata/src/main/mdo/metadata.mdo
@@ -23,7 +23,13 @@ under the License.
   xml.schemaLocation="http://maven.apache.org/xsd/metadata-${version}.xsd">
   <id>repository-metadata</id>
   <name>Metadata</name>
-  <description>Per-directory repository metadata.</description>
+  <description><![CDATA[
+    <p>Per-directory repository metadata, for directories representing un-versioned artifact, snapshot artifact
+    or a group containing Maven plugins.</p>
+    <p>Notice that most metadata content has a meaning when the directory represents
+    an artifact (<code>groupId</code>, <code>artifactId</code>, <code>versioning</code>), but
+    <code>plugins</code> is used when the directory represents a group.</p>]]>
+  </description>
   <defaults>
     <default>
       <key>package</key>
@@ -45,19 +51,19 @@ under the License.
           <name>groupId</name>
           <version>1.0.0+</version>
           <type>String</type>
-          <description>The groupId that is directory represents, if any.</description>
+          <description>The groupId that this directory represents, if any.</description>
         </field>
         <field>
           <name>artifactId</name>
           <version>1.0.0+</version>
           <type>String</type>
-          <description>The artifactId that is directory represents, if any.</description>
+          <description>The artifactId that this directory represents, if any.</description>
         </field>
         <field>
           <name>version</name>
           <version>1.0.0+</version>
           <type>String</type>
-          <description>The version that is directory represents, if any.</description>
+          <description>The version that this directory represents, if any. It is used for artifact snapshots only.</description>
         </field>
         <field>
           <name>versioning</name>
@@ -67,10 +73,10 @@ under the License.
           </association>
           <description>Versioning information for the artifact.</description>
         </field>
-        <field>
+        <field xdoc.separator="blank">
           <name>plugins</name>
           <version>1.0.0+</version>
-          <description>The set of plugin mappings for the group</description>
+          <description>The set of plugin mappings for the group represented by this directory</description>
           <association>
             <type>Plugin</type>
             <multiplicity>*</multiplicity>
@@ -207,7 +213,7 @@ under the License.
     <class java.clone="deep">
       <name>Versioning</name>
       <version>1.0.0+</version>
-      <description>Versioning information for an artifact</description>
+      <description>Versioning information for an artifact (un-versioned or snapshot)</description>
       <fields>
         <field>
           <name>latest</name>
@@ -219,7 +225,7 @@ under the License.
           <name>release</name>
           <version>1.0.0+</version>
           <type>String</type>
-          <description>What the latest version in the directory is, of the releases</description>
+          <description>What the latest version in the directory is, of the releases only</description>
         </field>
         <field>
           <name>snapshot</name>
@@ -227,12 +233,12 @@ under the License.
           <association>
             <type>Snapshot</type>
           </association>
-          <description>The current snapshot data in use for this version</description>
+          <description>The current snapshot data in use for this version (artifact snapshots only)</description>
         </field>
         <field>
           <name>versions</name>
           <version>1.0.0+</version>
-          <description>Versions available for the artifact</description>
+          <description>Versions available of the artifact (both releases and snapshots)</description>
           <association>
             <type>String</type>
             <multiplicity>*</multiplicity>
@@ -247,7 +253,7 @@ under the License.
         <field>
           <name>snapshotVersions</name>
           <version>1.1.0+</version>
-          <description>The snapshot versions available for the artifact.</description>
+          <description>Information for each sub-artifact available in this artifact snapshot.</description>
           <association>
             <type>SnapshotVersion</type>
             <multiplicity>*</multiplicity>
@@ -277,7 +283,7 @@ under the License.
     <class java.clone="deep">
       <name>Snapshot</name>
       <version>1.0.0+</version>
-      <description>Snapshot data for the current version</description>
+      <description>Snapshot data for the current artifact version</description>
       <fields>
         <field>
           <name>timestamp</name>
@@ -303,26 +309,26 @@ under the License.
     <class java.clone="deep">
       <name>SnapshotVersion</name>
       <version>1.1.0+</version>
-      <description>Versioning information for a snapshot artifact.</description>
+      <description>Versioning information for a sub-artifact of the current snapshot artifact.</description>
       <fields>
         <field>
           <name>classifier</name>
           <version>1.1.0+</version>
           <type>String</type>
-          <description>The classifier of the snapshot artifact this version information belongs to.</description>
+          <description>The classifier of the sub-artifact.</description>
           <defaultValue></defaultValue>
         </field>
         <field>
           <name>extension</name>
           <version>1.1.0+</version>
           <type>String</type>
-          <description>The file extension of the snapshot artifact this version information belongs to.</description>
+          <description>The file extension of thesub-artifact.</description>
         </field>
         <field xml.tagName="value">
           <name>version</name>
           <version>1.1.0+</version>
           <type>String</type>
-          <description>The resolved snapshot version of the artifact.</description>
+          <description>The resolved snapshot version of the sub-artifact.</description>
         </field>
         <field>
           <name>updated</name>
@@ -336,7 +342,7 @@ under the License.
       <name>Plugin</name>
       <version>1.0.0+</version>
       <description>Mapping information for a single plugin within this group</description>
-      <comment>NOTE: plugin version is _NOT_ included here, since it is resolved using a separate algorithm.</comment>
+      <comment>NOTE: plugin version is _NOT_ included here, since it is resolved using a separate algorithm in plugins' artifact.</comment>
       <fields>
         <field>
           <name>name</name>
diff --git a/maven-repository-metadata/src/site/apt/index.apt b/maven-repository-metadata/src/site/apt/index.apt
index 641ea0d..194fc0d 100644
--- a/maven-repository-metadata/src/site/apt/index.apt
+++ b/maven-repository-metadata/src/site/apt/index.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Introduction
  -----
@@ -10,6 +27,24 @@ Maven Repository Metadata Model
 
  This is strictly the model for Maven Repository Metadata, so really just plain objects.
 
+ Maven Repository Metadata is available in directories representing:
+
+ [[1]] an un-versioned artifact: it gives informations about available versions of the artifact,
+
+ [[2]] a snapshot artifact: it gives precise information on the snapshot,
+
+ [[3]] a group containing Maven plugins artifacts: it gives informations on plugins available in this group.
+
+ []
+
+ The metadata file name is:
+
+ * <<<maven-metadata.xml>>> in a remote repository,
+
+ * <<<maven-metadata-\<repo-id>.xml>>> in a local repository, for metatada from a repository with <<<repo-id>>> identifier.
+
+ []
+
  The following are generated from this model:
 
    * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser, to read and write <<<maven-metadata(-*).xml>>> files
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index 9ec1550..595e816 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-settings-builder</artifactId>
@@ -33,6 +33,12 @@ under the License.
   <name>Maven Settings Builder</name>
   <description>The effective settings builder, with inheritance and password decryption.</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsProblem.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsProblem.java
index 0b399ed..c0798cd 100644
--- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsProblem.java
+++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsProblem.java
@@ -37,7 +37,7 @@ public interface SettingsProblem
 
         FATAL, //
         ERROR, //
-        WARNING; //
+        WARNING //
 
     }
 
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index fe71c04..b49b533 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.0.5</version>
+    <version>3.1.1</version>
   </parent>
 
   <artifactId>maven-settings</artifactId>
@@ -33,6 +33,12 @@ under the License.
   <name>Maven Settings</name>
   <description>Maven Settings model.</description>
 
+  <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited -->
+    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
+    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
+    <tag>maven-3.1.1</tag>
+  </scm>
+
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
diff --git a/maven-settings/src/main/mdo/settings.mdo b/maven-settings/src/main/mdo/settings.mdo
index cbb0dba..6fe67e2 100644
--- a/maven-settings/src/main/mdo/settings.mdo
+++ b/maven-settings/src/main/mdo/settings.mdo
@@ -644,6 +644,7 @@
           <name>layout</name>
           <version>1.1.0+</version>
           <type>String</type>
+          <defaultValue>default</defaultValue>
           <description>The layout of the mirror repository. Since Maven 3.</description>
         </field>
         <field>
@@ -707,9 +708,11 @@
         <field>
           <name>properties</name>
           <description>
+            <![CDATA[
             Extended configuration specific to this profile goes here.
             Contents take the form of
-            <property.name>property.value</property.name>
+            <code><property.name>property.value</property.name></code>
+            ]]>
           </description>
           <type>Properties</type>
           <association xml.mapStyle="inline">
diff --git a/maven-settings/src/site/apt/index.apt b/maven-settings/src/site/apt/index.apt
index 3e3f2d1..6e404e8 100644
--- a/maven-settings/src/site/apt/index.apt
+++ b/maven-settings/src/site/apt/index.apt
@@ -1,3 +1,20 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
  -----
  Introduction
  -----
diff --git a/pom.xml b/pom.xml
index 3eb8541..922976f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,11 +26,11 @@
   </parent>
 
   <artifactId>maven</artifactId>
-  <version>3.0.5</version>
+  <version>3.1.1</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven</name>
-  <description>Maven is a project development management and
+  <description>Maven is a software build management and
     comprehension tool. Based on the concept of a project object model:
     builds, dependency management, documentation creation, site
     publication, and distribution publication are all controlled from
@@ -38,113 +38,36 @@
     number of other development tools for reporting or the build
     process.
   </description>
-  <url>${siteUrl}</url>
+  <url>http://maven.apache.org/ref/${project.version}</url>
   <inceptionYear>2001</inceptionYear>
 
   <properties>
-    <classWorldsVersion>2.4</classWorldsVersion>
+    <classWorldsVersion>2.5.1</classWorldsVersion>
     <commonsCliVersion>1.2</commonsCliVersion>
     <easyMockVersion>1.2_Java1.3</easyMockVersion>
     <junitVersion>3.8.2</junitVersion>
     <plexusVersion>1.5.5</plexusVersion>
-    <plexusInterpolationVersion>1.14</plexusInterpolationVersion>
-    <plexusUtilsVersion>2.0.6</plexusUtilsVersion>
-    <sisuInjectVersion>2.3.0</sisuInjectVersion>
+    <plexusInterpolationVersion>1.19</plexusInterpolationVersion>
+    <plexusUtilsVersion>3.0.15</plexusUtilsVersion>
+    <!-- last Java5 release of Guava -->
+    <guavaVersion>11.0.2</guavaVersion>
+    <guiceVersion>3.1.3</guiceVersion>
+    <sisuInjectVersion>0.0.0.M5</sisuInjectVersion>
     <wagonVersion>2.4</wagonVersion>
     <securityDispatcherVersion>1.3</securityDispatcherVersion>
     <cipherVersion>1.7</cipherVersion>
-    <modelloVersion>1.4.1</modelloVersion>
+    <modelloVersion>1.8.1</modelloVersion>
     <jxpathVersion>1.3</jxpathVersion>
-    <aetherVersion>1.13.1</aetherVersion>
+    <aetherVersion>0.9.0.M2</aetherVersion>
+    <slf4jVersion>1.7.5</slf4jVersion>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
     <!-- Control the name of the distribution and information output by mvn -->
     <distributionId>apache-maven</distributionId>
     <distributionShortName>Maven</distributionShortName>
     <distributionName>Apache Maven</distributionName>
-
-    <siteDeployUrl>scp://people.apache.org/www/maven.apache.org/ref/${project.version}/</siteDeployUrl>
-    <siteUrl>http://maven.apache.org/ref/${project.version}/</siteUrl>
-
-    <maven.site.path>ref/${project.version}</maven.site.path>
-
+    <maven.site.path>ref/3-LATEST</maven.site.path>
   </properties>
 
-  <mailingLists>
-    <mailingList>
-      <name>Maven Developer List</name>
-      <subscribe>dev-subscribe at maven.apache.org</subscribe>
-      <unsubscribe>dev-unsubscribe at maven.apache.org</unsubscribe>
-      <post>dev at maven.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
-      <otherArchives>
-        <otherArchive>http://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
-        <otherArchive>http://old.nabble.com/Maven-Developers-f179.html</otherArchive>
-        <otherArchive>http://maven.dev.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <mailingList>
-      <name>Maven User List</name>
-      <subscribe>users-subscribe at maven.apache.org</subscribe>
-      <unsubscribe>users-unsubscribe at maven.apache.org</unsubscribe>
-      <post>users at maven.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
-      <otherArchives>
-        <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
-        <otherArchive>http://old.nabble.com/Maven---Users-f178.html</otherArchive>
-        <otherArchive>http://maven.users.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <mailingList>
-      <name>Maven Issues List</name>
-      <subscribe>issues-subscribe at maven.apache.org</subscribe>
-      <unsubscribe>issues-unsubscribe at maven.apache.org</unsubscribe>
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
-      <otherArchives>
-        <otherArchive>http://www.mail-archive.com/issues@maven.apache.org</otherArchive>
-        <otherArchive>http://old.nabble.com/Maven---Issues-f15573.html</otherArchive>
-        <otherArchive>http://maven.issues.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <mailingList>
-      <name>Maven Commits List</name>
-      <subscribe>commits-subscribe at maven.apache.org</subscribe>
-      <unsubscribe>commits-unsubscribe at maven.apache.org</unsubscribe>
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-commits</archive>
-      <otherArchives>
-        <otherArchive>http://www.mail-archive.com/commits@maven.apache.org</otherArchive>
-        <otherArchive>http://old.nabble.com/Maven---Commits-f15575.html</otherArchive>
-        <otherArchive>http://maven.commits.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <!--
-      duplication from parent pom - temporary until they inherit
-      properly
-    -->
-    <mailingList>
-      <name>Maven Announcements List</name>
-      <post>announce at maven.apache.org</post>
-      <subscribe>announce-subscribe at maven.apache.org</subscribe>
-      <unsubscribe>announce-unsubscribe at maven.apache.org</unsubscribe>
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
-      <otherArchives>
-        <otherArchive>http://www.mail-archive.com/announce@maven.apache.org</otherArchive>
-        <otherArchive>http://old.nabble.com/Maven-Announcements-f15617.html</otherArchive>
-        <otherArchive>http://maven.announce.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <mailingList>
-      <name>Maven Notifications List</name>
-      <subscribe>notifications-subscribe at maven.apache.org</subscribe>
-      <unsubscribe>notifications-unsubscribe at maven.apache.org</unsubscribe>
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
-      <otherArchives>
-        <otherArchive>http://www.mail-archive.com/notifications@maven.apache.org</otherArchive>
-        <otherArchive>http://old.nabble.com/Maven---Notifications-f15574.html</otherArchive>
-        <otherArchive>http://maven.notifications.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-  </mailingLists>
-
   <modules>
     <module>maven-plugin-api</module>
     <module>maven-model</module>
@@ -163,8 +86,8 @@
   <scm>
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
-    <url>https://git-wip-us.apache.org/repos/asf?p=maven.git</url>
-    <tag>maven-3.0.5</tag>
+    <url>https://github.com/apache/maven/tree/${project.scm.tag}</url>
+    <tag>maven-3.1.1</tag>
   </scm>
   <issueManagement>
     <system>jira</system>
@@ -172,15 +95,22 @@
   </issueManagement>
   <ciManagement>
     <system>Jenkins</system>
-    <url>https://builds.apache.org/job/maven-3.0.x/</url>
+    <url>https://builds.apache.org/job/maven-3.x/</url>
   </ciManagement>
   <distributionManagement>
+    <downloadUrl>http://maven.apache.org/download.html</downloadUrl>
     <site>
       <id>apache.website</id>
       <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/content/${maven.site.path}</url>
     </site>
   </distributionManagement>
 
+  <contributors>
+    <contributor>
+      <name>Stuart McCulloch</name>
+    </contributor>
+  </contributors>
+
   <!--bootstrap-start-comment-->
   <dependencyManagement>
     <!--bootstrap-end-comment-->
@@ -250,16 +180,25 @@
         <version>${plexusUtilsVersion}</version>
       </dependency>
       <dependency>
+        <groupId>com.google.guava</groupId>
+        <artifactId>guava</artifactId>
+        <version>${guavaVersion}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.sonatype.sisu</groupId>
+        <artifactId>sisu-guice</artifactId>
+        <version>${guiceVersion}</version>
+      </dependency>
+      <dependency>
         <groupId>org.sonatype.sisu</groupId>
-        <artifactId>sisu-inject-plexus</artifactId>
+        <artifactId>sisu-guice</artifactId>
+        <version>${guiceVersion}</version>
+        <classifier>no_aop</classifier>
+      </dependency>
+      <dependency>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>org.eclipse.sisu.plexus</artifactId>
         <version>${sisuInjectVersion}</version>
-        <exclusions>
-          <exclusion>
-            <!-- Decouple build from MNG-3443 and ensure optional/unused dependency from sisu-guice stays out -->
-            <groupId>org.sonatype.sisu.inject</groupId>
-            <artifactId>cglib</artifactId>
-          </exclusion>
-        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
@@ -282,6 +221,23 @@
         <artifactId>plexus-interpolation</artifactId>
         <version>${plexusInterpolationVersion}</version>
       </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+        <version>${slf4jVersion}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-simple</artifactId>
+        <version>${slf4jVersion}</version>
+        <optional>true</optional>
+      </dependency>
+      <dependency>
+        <groupId>ch.qos.logback</groupId>
+        <artifactId>logback-classic</artifactId>
+        <version>1.0.7</version>
+        <optional>true</optional>
+      </dependency>
       <!--  Wagon -->
       <dependency>
         <groupId>org.apache.maven.wagon</groupId>
@@ -307,35 +263,29 @@
       </dependency>
       <!--  Repository -->
       <dependency>
-        <groupId>org.sonatype.aether</groupId>
+        <groupId>org.eclipse.aether</groupId>
         <artifactId>aether-api</artifactId>
         <version>${aetherVersion}</version>
       </dependency>
       <dependency>
-        <groupId>org.sonatype.aether</groupId>
+        <groupId>org.eclipse.aether</groupId>
         <artifactId>aether-spi</artifactId>
         <version>${aetherVersion}</version>
       </dependency>
       <dependency>
-        <groupId>org.sonatype.aether</groupId>
+        <groupId>org.eclipse.aether</groupId>
         <artifactId>aether-impl</artifactId>
         <version>${aetherVersion}</version>
       </dependency>
       <dependency>
-        <groupId>org.sonatype.aether</groupId>
+        <groupId>org.eclipse.aether</groupId>
         <artifactId>aether-util</artifactId>
         <version>${aetherVersion}</version>
       </dependency>
       <dependency>
-        <groupId>org.sonatype.aether</groupId>
+        <groupId>org.eclipse.aether</groupId>
         <artifactId>aether-connector-wagon</artifactId>
         <version>${aetherVersion}</version>
-        <exclusions>
-          <exclusion>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-container-default</artifactId>
-          </exclusion>
-        </exclusions>
       </dependency>
       <!--  Commons -->
       <dependency>
@@ -409,6 +359,11 @@
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.5.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <configuration>
             <tagBase>https://svn.apache.org/repos/asf/maven/maven-3/tags</tagBase>
@@ -418,6 +373,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.12</version>
           <configuration>
             <argLine>-Xmx256m</argLine>
           </configuration>
@@ -462,14 +418,32 @@
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.3</version><!-- TODO remove when upgrading parent to 24 -->
+          <configuration>
+            <topSiteURL>scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/content/${maven.site.path}</topSiteURL>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-scm-publish-plugin</artifactId>
-          <version>1.0-beta-2</version>
           <configuration>
-            <content>${project.build.directory}/staging/${maven.site.path}</content>
             <checkoutDirectory>${maven.site.cache}/${maven.site.path}</checkoutDirectory>
             <tryUpdate>true</tryUpdate>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.9</version>
+          <configuration>
+            <excludes>
+              <exclude>src/test/resources*/**</exclude>
+              <exclude>src/test/projects/**</exclude>
+              <exclude>src/test/remote-repo/**</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
@@ -494,9 +468,46 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-doap-plugin</artifactId>
+        <version>1.1</version>        
+        <configuration>
+          <asfExtOptions>
+            <charter>The mission of the Apache Maven project is to create and maintain software
+            libraries that provide a widely-used project build tool, targeting mainly Java 
+            development. Apache Maven promotes the use of dependencies via a 
+            standardized coordinate system, binary plugins, and a standard build 
+            lifecycle.</charter>
+          </asfExtOptions>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <inherited>false</inherited>
+        <configuration>
+          <excludes combine.children="append">
+            <exclude>bootstrap/**</exclude>
+            <exclude>README.bootstrap.txt</exclude>
+          </excludes>
+          <!-- maven-parent:24 sets ignore errors, but core is ahead -->
+          <ignoreErrors>false</ignoreErrors>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>2.7</version>
+      </plugin>
+    </plugins>
+  </reporting>
+
   <profiles>
     <profile>
       <id>apache-release</id>
@@ -514,6 +525,19 @@
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <groupId>org.apache.rat</groupId>
+            <artifactId>apache-rat-plugin</artifactId>
+            <inherited>true</inherited>
+            <executions>
+              <execution>
+                <id>check</id>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>
@@ -523,22 +547,23 @@
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-project-info-reports-plugin</artifactId>
+            <version>2.7</version>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-javadoc-plugin</artifactId>
+            <version>2.9.1</version>
             <configuration>
               <linksource>true</linksource>
+              <notimestamp>true</notimestamp>
               <links combine.children="append">
-                <link>http://sonatype.github.com/sonatype-aether/apidocs/</link>
+                <link>http://download.eclipse.org/aether/aether-core/${aetherVersion}/apidocs/</link>
+                <link>http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/</link>
               </links>
             </configuration>
             <reportSets>
               <reportSet>
-                <id>non-aggregate</id>
-                <reports>
-                  <report>javadoc</report>
-                  <report>test-javadoc</report>
-                </reports>
-              </reportSet>
-              <reportSet>
                 <id>aggregate</id>
                 <inherited>false</inherited>
                 <reports>
@@ -553,13 +578,6 @@
             <version>2.3</version>
             <reportSets>
               <reportSet>
-                <id>non-aggregate</id>
-                <reports>
-                  <report>jxr</report>
-                  <report>test-jxr</report>
-                </reports>
-              </reportSet>
-              <reportSet>
                 <id>aggregate</id>
                 <inherited>false</inherited>
                 <reports>
@@ -607,5 +625,4 @@
       </build>
     </profile>
   </profiles>
-
 </project>
diff --git a/src/site/resources/images/maven-deps.png b/src/site/resources/images/maven-deps.png
index dc466f1..2965e88 100644
Binary files a/src/site/resources/images/maven-deps.png and b/src/site/resources/images/maven-deps.png differ
diff --git a/src/site/site.xml b/src/site/site.xml
index ce22865..bcc6103 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -35,7 +35,7 @@ under the License.
   <skin>
     <groupId>org.apache.maven.skins</groupId>
     <artifactId>maven-fluido-skin</artifactId>
-    <version>1.0</version>
+    <version>1.3.0</version>
   </skin>
 
   <body>
@@ -54,6 +54,14 @@ under the License.
     <menu name="Descriptors Reference">
       <item name="POM" href="./maven-model/maven.html"/>
       <item name="Settings" href="./maven-settings/settings.html"/>
+      <item name="Toolchains" href="./maven-core/toolchains.html"/>
+    </menu>
+
+    <menu name="Reference">
+      <item name="Lifecycles" href="./maven-core/lifecycles.html"/>
+      <item name="Plugin Bindings to Default Lifecycle" href="./maven-core/default-bindings.html"/>
+      <item name="Artifact Handlers" href="./maven-core/artifact-handlers.html"/>
+      <item name="CLI options" href="./maven-embedder/cli.html"/>
     </menu>
 
     <menu name="Development">
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index a915af4..47e83b9 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -40,7 +40,7 @@
     process.</p>
 
       <p>
-        <img src="images/maven-deps.png" width="732" height="538" border="0" usemap="#Maven_dependencies" />
+        <img src="images/maven-deps.png" width="731" height="538" border="0" usemap="#Maven_dependencies" />
         <map name="Maven_dependencies">
           <area shape="rect" coords="213,0,338,32"    alt="apache-maven"  href="apache-maven/" />
           <area shape="rect" coords="213,52,338,85"   alt="maven-embedder" href="maven-embedder/" />
@@ -49,9 +49,9 @@
           <area shape="rect" coords="110,207,258,240" alt="maven-aether-provider" href="maven-aether-provider/" />
           <area shape="rect" coords="0,256,180,289"   alt="maven-repository-metadata" href="maven-repository-metadata/" />
           <area shape="rect" coords="230,309,321,342" alt="maven-plugin-api" href="maven-plugin-api/" />
-          <area shape="rect" coords="237,358,314,391" alt="maven-artifact" href="maven-artifact/" />
+          <area shape="rect" coords="237,362,314,395" alt="maven-artifact" href="maven-artifact/" />
           <area shape="rect" coords="357,158,494,191" alt="maven-settings-builder" href="maven-settings-builder/" />
-          <area shape="rect" coords="382,207,468,240" alt="maven-settings" href="maven-settings/" />
+          <area shape="rect" coords="382,211,468,244" alt="maven-settings" href="maven-settings/" />
           <area shape="rect" coords="363,256,487,289" alt="maven-model-builder" href="maven-model-builder/" />
           <area shape="rect" coords="383,310,468,342" alt="maven-model" href="maven-model/" />
           <area shape="rect" coords="514,52,660,85"   alt="commons-cli" href="http://commons.apache.org/cli/" />
@@ -64,7 +64,8 @@
           <area shape="rect" coords="639,411,724,444" alt="plexus-utils" href="http://plexus.codehaus.org/plexus-utils/" />
           <area shape="rect" coords="507,150,731,455" alt="plexus" href="http://plexus.codehaus.org/" />
           <area shape="rect" coords="65,306,225,436"  alt="aether" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.aether" />
-          <area shape="rect" coords="333,355,490,537" alt="sisu" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.sisu" />
+          <area shape="rect" coords="362,356,485,537" alt="sisu" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.sisu" />
+          <area shape="rect" coords="485,469,580,500" alt="guice" href="http://code.google.com/p/google-guice/" />
         </map>
       </p>
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven.git



More information about the pkg-java-commits mailing list