[maven-release] branch MRELEASE-994 created (now 0e16d46)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-release] branch MRELEASE-994 created (now 0e16d46)

rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch MRELEASE-994
in repository https://gitbox.apache.org/repos/asf/maven-release.git.


      at 0e16d46  [MRELEASE-994] Drop Maven2 support Upgrade mavenVersion dependencies to 3.0 (cleanup maven dependencies) GenerateReleasePomsPhase, replace deprecated PathTranslator with SuperPomProvider and ModelInterpolator JDomReporting, delete removed overridden methods

This branch includes the following new commits:

     new 0e16d46  [MRELEASE-994] Drop Maven2 support Upgrade mavenVersion dependencies to 3.0 (cleanup maven dependencies) GenerateReleasePomsPhase, replace deprecated PathTranslator with SuperPomProvider and ModelInterpolator JDomReporting, delete removed overridden methods

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


--
To stop receiving notification emails like this one, please contact
['"[hidden email]" <[hidden email]>'].
Reply | Threaded
Open this post in threaded view
|

[maven-release] 01/01: [MRELEASE-994] Drop Maven2 support Upgrade mavenVersion dependencies to 3.0 (cleanup maven dependencies) GenerateReleasePomsPhase, replace deprecated PathTranslator with SuperPomProvider and ModelInterpolator JDomReporting, delete removed overridden methods

rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MRELEASE-994
in repository https://gitbox.apache.org/repos/asf/maven-release.git

commit 0e16d46e3ac627dd3dddf28347178054cf77f7de
Author: rfscholte <[hidden email]>
AuthorDate: Tue Jan 9 22:43:49 2018 +0100

    [MRELEASE-994] Drop Maven2 support
    Upgrade mavenVersion dependencies to 3.0 (cleanup maven dependencies)
    GenerateReleasePomsPhase, replace deprecated PathTranslator with SuperPomProvider and ModelInterpolator
    JDomReporting, delete removed overridden methods
   
    PlexusJUnit4TestCase, use code from org.sonatype.sisu:sisu-inject-plexus
    AbstractReleaseTestCase, replace deprecated MavenProjectBuilder with ProjectBuilder
    AbstractRewritingReleasePhaseTestCase, ignore internal extension based tests, not supported anymore
    DefaultVersionInfoTest, adjust tests due to new comparison results
    Add dummy org.codehaus.plexus:plexus-utils:1.1, required due to auto injection by org.apache.maven.plugin.internal.PlexusUtilsInjector
---
 maven-release-manager/pom.xml                      |  30 ++-
 .../phase/CheckDependencySnapshotsPhase.java       |  16 +-
 .../release/phase/GenerateReleasePomsPhase.java    | 128 +++++++++--
 .../release/transform/jdom/JDomReporting.java      |  18 --
 .../maven/shared/release/PlexusJUnit4TestCase.java | 202 ++++++++++-------
 .../release/phase/AbstractReleaseTestCase.java     | 244 ++++++++++-----------
 .../AbstractRewritingReleasePhaseTestCase.java     |   5 +
 .../phase/GenerateReleasePomsPhaseTest.java        |   2 +-
 .../release/phase/RemoveReleasePomsPhaseTest.java  |   8 +-
 .../phase/ScmCommitPreparationPhaseTest.java       |   2 +-
 .../release/versions/DefaultVersionInfoTest.java   |  54 ++++-
 .../plexus/plexus-utils/1.1/plexus-utils-1.1.jar   |   1 +
 .../plexus/plexus-utils/1.1/plexus-utils-1.1.pom   |  30 +++
 .../subproject4/expected-release-pom.xml           |   2 +-
 .../internal-snapshot-plugins/subproject4/pom.xml  |   1 +
 .../subproject1/expected-pom.xml                   |   1 +
 .../pom-with-parent-flat/subproject1/pom.xml       |   1 +
 .../subproject3/expected-pom-different-version.xml |  15 +-
 .../subproject3/expected-pom.xml                   |  15 +-
 .../interpolated-versions/subproject3/pom.xml      |  15 +-
 maven-release-plugin/pom.xml                       |  19 +-
 pom.xml                                            |  12 +-
 22 files changed, 499 insertions(+), 322 deletions(-)

diff --git a/maven-release-manager/pom.xml b/maven-release-manager/pom.xml
index 0209122..b8b26b5 100644
--- a/maven-release-manager/pom.xml
+++ b/maven-release-manager/pom.xml
@@ -39,11 +39,6 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-container-default</artifactId>
-      <version>1.0-alpha-9</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
     <dependency>
@@ -88,11 +83,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-artifact-manager</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
+      <artifactId>maven-core</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -144,6 +135,11 @@
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-svn-commons</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-artifact-transfer</artifactId>
+      <version>0.9.1</version>
+    </dependency>
 
     <dependency>
       <groupId>org.jdom</groupId>
@@ -157,7 +153,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-core</artifactId>
+      <artifactId>maven-compat</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -175,6 +171,18 @@
       <artifactId>xmlunit-core</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.sonatype.aether</groupId>
+      <artifactId>aether-connector-file</artifactId>
+      <version>1.7</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.sonatype.aether</groupId>
+      <artifactId>aether-connector-wagon</artifactId>
+      <version>1.7</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhase.java
index e76bb80..6332083 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhase.java
@@ -34,7 +34,6 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.artifact.InvalidDependencyVersionException;
 import org.apache.maven.shared.release.ReleaseExecutionException;
 import org.apache.maven.shared.release.ReleaseFailureException;
 import org.apache.maven.shared.release.ReleaseResult;
@@ -132,16 +131,9 @@ public class CheckDependencySnapshotsPhase
             }
         }
         
-        try
-        {
-            @SuppressWarnings( "unchecked" )
-            Set<Artifact> dependencyArtifacts = project.createArtifacts( artifactFactory, null, null );
-            checkDependencies( originalVersions, releaseDescriptor, artifactMap, dependencyArtifacts );
-        }
-        catch ( InvalidDependencyVersionException e )
-        {
-            throw new ReleaseExecutionException( "Failed to create dependency artifacts", e );
-        }
+        Set<Artifact> dependencyArtifacts = project.getArtifacts();
+        checkDependencies( originalVersions, releaseDescriptor, artifactMap, dependencyArtifacts );
+
         //@todo check dependencyManagement
 
         @SuppressWarnings( "unchecked" )
@@ -440,7 +432,7 @@ public class CheckDependencySnapshotsPhase
             String versionlessKey = ArtifactUtils.versionlessKey( currentArtifact );
 
             Map<String, String> versionMap = new HashMap<String, String>();
-            VersionInfo versionInfo = new DefaultVersionInfo( currentArtifact.getVersion() );
+            VersionInfo versionInfo = new DefaultVersionInfo( currentArtifact.getBaseVersion() );
             versionMap.put( ReleaseDescriptor.ORIGINAL_VERSION, versionInfo.toString() );
 
             prompter.showMessage(
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java
index e215e68..9022ca2 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java
@@ -22,10 +22,13 @@ package org.apache.maven.shared.release.phase;
 import java.io.File;
 import java.io.IOException;
 import java.io.Writer;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
@@ -38,10 +41,14 @@ import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.model.Reporting;
+import org.apache.maven.model.Resource;
 import org.apache.maven.model.Scm;
+import org.apache.maven.model.building.DefaultModelBuildingRequest;
+import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.interpolation.ModelInterpolator;
 import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.apache.maven.model.superpom.SuperPomProvider;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.path.PathTranslator;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.add.AddScmResult;
@@ -72,12 +79,12 @@ public class GenerateReleasePomsPhase
 {
     private static final String FINALNAME_EXPRESSION = "${project.artifactId}-${project.version}";
 
-    /**
-     *
-     */
     @Requirement
-    private PathTranslator pathTranslator;
+    private SuperPomProvider superPomProvider;
 
+    @Requirement
+    private ModelInterpolator modelInterpolator;
+    
     /**
      * SCM URL translators mapped by provider name.
      */
@@ -218,19 +225,9 @@ public class GenerateReleasePomsPhase
         Map<String, String> originalVersions = getOriginalVersionMap( releaseDescriptor, reactorProjects );
         Map<String, String> mappedVersions = getNextVersionMap( releaseDescriptor );
 
-        MavenProject releaseProject = new MavenProject( project );
+        MavenProject releaseProject = project.clone();
         Model releaseModel = releaseProject.getModel();
 
-        try
-        {
-            // Result of clone in Maven2 is incorrect, fix this value
-            releaseModel.getReporting().setExcludeDefaultsValue( project.getReporting().isExcludeDefaultsValue() );
-        }
-        catch ( NoSuchMethodError e )
-        {
-            // method replaced in Maven3 from Boolean to String
-        }
-
         // the release POM should reflect bits of these which were injected at build time...
         // we don't need these polluting the POM.
         releaseModel.setParent( null );
@@ -305,14 +302,102 @@ public class GenerateReleasePomsPhase
         releaseModel.getBuild().setExtensions( createReleaseExtensions( originalVersions, mappedVersions,
                                                                         releaseProject ) );
 
-        unalignFromBaseDirectory( releaseModel, project.getFile().getParentFile() );
+        unalignFromBaseDirectory( releaseModel, project.getBasedir() );
 
         return releaseModel;
     }
     
-    private void unalignFromBaseDirectory( Model releaseModel, File baseDir )
+    
+    private void unalignFromBaseDirectory( Model releaseModel, File basedir )
     {
-        pathTranslator.unalignFromBaseDirectory( releaseModel, baseDir );  
+        Model rawSuperModel = superPomProvider.getSuperModel( releaseModel.getModelVersion() );
+        
+        ModelBuildingRequest buildingRequest = new DefaultModelBuildingRequest();
+        buildingRequest.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_STRICT );
+        
+        // inject proper values used by project.build.finalName
+        Properties properties = new Properties();
+        properties.put( "project.version", releaseModel.getVersion() );
+        properties.put( "project.artifactId", releaseModel.getArtifactId() );
+        buildingRequest.setUserProperties( properties );
+        
+        Model interpolatedSuperModel =
+            modelInterpolator.interpolateModel( rawSuperModel.clone(), basedir, buildingRequest, null );
+        
+        Build currentBuild = releaseModel.getBuild();
+        Build interpolatedSuperBuild = interpolatedSuperModel.getBuild();
+        Build rawSuperBuild = rawSuperModel.getBuild();
+        
+        currentBuild.setSourceDirectory( resolvePath( basedir.toPath(), currentBuild.getSourceDirectory(),
+                                                  interpolatedSuperBuild.getSourceDirectory(),
+                                                  rawSuperBuild.getSourceDirectory() ) );
+        currentBuild.setScriptSourceDirectory( resolvePath( basedir.toPath(), currentBuild.getScriptSourceDirectory(),
+                                                  interpolatedSuperBuild.getScriptSourceDirectory(),
+                                                  rawSuperBuild.getScriptSourceDirectory() ) );
+        currentBuild.setTestSourceDirectory( resolvePath( basedir.toPath(), currentBuild.getTestSourceDirectory(),
+                                                  interpolatedSuperBuild.getTestSourceDirectory(),
+                                                  rawSuperBuild.getTestSourceDirectory() ) );
+        currentBuild.setOutputDirectory( resolvePath( basedir.toPath(), currentBuild.getOutputDirectory(),
+                                                        interpolatedSuperBuild.getOutputDirectory(),
+                                                        rawSuperBuild.getOutputDirectory() ) );
+        currentBuild.setTestOutputDirectory( resolvePath( basedir.toPath(), currentBuild.getTestOutputDirectory(),
+                                                      interpolatedSuperBuild.getTestOutputDirectory(),
+                                                      rawSuperBuild.getTestOutputDirectory() ) );
+        currentBuild.setDirectory( resolvePath( basedir.toPath(), currentBuild.getDirectory(),
+                                            interpolatedSuperBuild.getDirectory(),
+                                            rawSuperBuild.getDirectory() ) );
+        
+        for ( Resource currentResource : currentBuild.getResources() )
+        {
+            Map<String, String> superResourceDirectories =
+                new LinkedHashMap<>( interpolatedSuperBuild.getResources().size() );
+            for ( int i = 0; i < interpolatedSuperBuild.getResources().size(); i++ )
+            {
+                superResourceDirectories.put( interpolatedSuperBuild.getResources().get( i ).getDirectory(),
+                                              rawSuperBuild.getResources().get( i ).getDirectory() );
+            }
+            currentResource.setDirectory( resolvePath( basedir.toPath(), currentResource.getDirectory(),
+                                                       superResourceDirectories ) );
+        }
+
+        for ( Resource currentResource : currentBuild.getTestResources() )
+        {
+            Map<String, String> superResourceDirectories =
+                new LinkedHashMap<>( interpolatedSuperBuild.getTestResources().size() );
+            for ( int i = 0; i < interpolatedSuperBuild.getTestResources().size(); i++ )
+            {
+                superResourceDirectories.put( interpolatedSuperBuild.getTestResources().get( i ).getDirectory(),
+                                              rawSuperBuild.getTestResources().get( i ).getDirectory() );
+            }
+            currentResource.setDirectory( resolvePath( basedir.toPath(), currentResource.getDirectory(),
+                                                       superResourceDirectories ) );
+        }
+        
+        
+        
+        releaseModel.getReporting().setOutputDirectory( resolvePath( basedir.toPath(),
+                                                         releaseModel.getReporting().getOutputDirectory(),
+                                                         interpolatedSuperModel.getReporting().getOutputDirectory(),
+                                                         rawSuperModel.getReporting().getOutputDirectory() ) );
+    }
+    
+    private String resolvePath( Path basedir, String current, String superInterpolated, String superRaw )
+    {
+        return basedir.resolve( current ).equals( basedir.resolve( superInterpolated ) ) ? superRaw : current;
+    }
+
+    private String resolvePath( Path basedir,
+                                String current,
+                                Map<String /* interpolated */, String /* raw */> superValues )
+    {
+        for ( Map.Entry<String, String> superValue : superValues.entrySet() )
+        {
+            if ( basedir.resolve( current ).equals( basedir.resolve( superValue.getKey() ) ) )
+            {
+                return superValue.getValue();
+            }
+        }
+        return current;
     }
     
     private String findOriginalFinalName( MavenProject project )
@@ -512,7 +597,10 @@ public class GenerateReleasePomsPhase
                     releasePlugin.setGroupId( plugin.getGroupId() );
                     releasePlugin.setArtifactId( plugin.getArtifactId() );
                     releasePlugin.setVersion( version );
-                    releasePlugin.setExtensions( plugin.isExtensions() );
+                    if ( plugin.getExtensions() != null )
+                    {
+                        releasePlugin.setExtensions( plugin.isExtensions() );
+                    }
                     releasePlugin.setExecutions( plugin.getExecutions() );
                     releasePlugin.setDependencies( plugin.getDependencies() );
                     releasePlugin.setGoals( plugin.getGoals() );
diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomReporting.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomReporting.java
index 554e241..4feb4a5 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomReporting.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomReporting.java
@@ -80,24 +80,12 @@ public class JDomReporting extends Reporting
     }
 
     @Override
-    public Boolean isExcludeDefaultsValue()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
     public void removePlugin( ReportPlugin reportPlugin )
     {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public void setExcludeDefaultsValue( Boolean excludeDefaultsValue )
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
     public void setOutputDirectory( String outputDirectory )
     {
         throw new UnsupportedOperationException();
@@ -132,10 +120,4 @@ public class JDomReporting extends Reporting
     {
         throw new UnsupportedOperationException();
     }
-
-    @Override
-    public void setExcludeDefaultsValue( String excludeDefaults )
-    {
-        throw new UnsupportedOperationException();
-    }
 }
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/PlexusJUnit4TestCase.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/PlexusJUnit4TestCase.java
index 5f9d52c..0b35472 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/PlexusJUnit4TestCase.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/PlexusJUnit4TestCase.java
@@ -23,16 +23,20 @@ import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.InputStream;
-import java.io.InputStreamReader;
 
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.DefaultContainerConfiguration;
 import org.codehaus.plexus.DefaultPlexusContainer;
 import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.PlexusContainerException;
+import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.DefaultContext;
 import org.junit.After;
 import org.junit.Before;
 
 /**
- * Based on PlexusTestCase from org.codehaus.plexus:plexus-container-default
+ * Based on PlexusTestCase from org.sonatype.sisu:sisu-inject-plexus
  *
  * @author Robert Scholte
  */
@@ -46,90 +50,82 @@ public abstract class PlexusJUnit4TestCase
     public void setUp()
         throws Exception
     {
-        InputStream configuration = null;
-
-        try
-        {
-            configuration = getCustomConfiguration();
-
-            if ( configuration == null )
-            {
-                configuration = getConfiguration();
-            }
-        }
-        catch ( Exception e )
-        {
-            System.out.println( "Error with configuration:" );
-
-            System.out.println( "configuration = " + configuration );
-
-            fail( e.getMessage() );
-        }
-
         basedir = getBasedir();
+    }
 
-        container = createContainerInstance();
+    protected void setupContainer()
+    {
+        // ----------------------------------------------------------------------------
+        // Context Setup
+        // ----------------------------------------------------------------------------
 
-        container.addContextValue( "basedir", getBasedir() );
+        final DefaultContext context = new DefaultContext();
 
-        // this method was deprecated
-        customizeContext();
+        context.put( "basedir", getBasedir() );
 
-        customizeContext( getContext() );
+        customizeContext( context );
 
-        boolean hasPlexusHome = getContext().contains( "plexus.home" );
+        final boolean hasPlexusHome = context.contains( "plexus.home" );
 
         if ( !hasPlexusHome )
         {
-            File f = getTestFile( "target/plexus-home" );
+            final File f = getTestFile( "target/plexus-home" );
 
             if ( !f.isDirectory() )
             {
                 f.mkdir();
             }
 
-            getContext().put( "plexus.home", f.getAbsolutePath() );
+            context.put( "plexus.home", f.getAbsolutePath() );
         }
 
-        if ( configuration != null )
+        // ----------------------------------------------------------------------------
+        // Configuration
+        // ----------------------------------------------------------------------------
+
+        final String config = getCustomConfigurationName();
+
+        final ContainerConfiguration containerConfiguration =
+            new DefaultContainerConfiguration().setName( "test" ).setContext( context.getContextData() ).setClassPathCaching( true );
+
+        if ( config != null )
         {
-            container.setConfigurationResource( new InputStreamReader( configuration ) );
+            containerConfiguration.setContainerConfiguration( config );
         }
+        else
+        {
+            final String resource = getConfigurationName( null );
 
-        container.initialize();
+            containerConfiguration.setContainerConfiguration( resource );
+        }
 
-        container.start();
-    }
+        customizeContainerConfiguration( containerConfiguration );
 
-    protected PlexusContainer createContainerInstance()
-    {
-        return new DefaultPlexusContainer();
+        try
+        {
+            container = new DefaultPlexusContainer( containerConfiguration );
+        }
+        catch ( final PlexusContainerException e )
+        {
+            e.printStackTrace();
+            fail( "Failed to create plexus container." );
+        }
     }
 
-    private Context getContext()
+    /**
+     * Allow custom test case implementations do augment the default container configuration before executing tests.
+     *
+     * @param containerConfiguration
+     */
+    protected void customizeContainerConfiguration( final ContainerConfiguration containerConfiguration )
     {
-        return container.getContext();
     }
 
-    //!!! this should probably take a context as a parameter so that the
-    //    user is not forced to do getContainer().addContextValue(..)
-    //    this would require a change to PlexusContainer in order to get
-    //    hold of the context ...
-    // @deprecated use void customizeContext( Context context )
-    protected void customizeContext()
-        throws Exception
+    protected void customizeContext( final Context context )
     {
     }
 
-
-    protected void customizeContext( Context context )
-        throws Exception
-    {
-    }
-
-
-    protected InputStream getCustomConfiguration()
-        throws Exception
+    protected PlexusConfiguration customizeComponentConfiguration()
     {
         return null;
     }
@@ -138,13 +134,21 @@ public abstract class PlexusJUnit4TestCase
     public void tearDown()
         throws Exception
     {
-        container.dispose();
+        if ( container != null )
+        {
+            container.dispose();
 
-        container = null;
+            container = null;
+        }
     }
 
     protected PlexusContainer getContainer()
     {
+        if ( container == null )
+        {
+            setupContainer();
+        }
+
         return container;
     }
 
@@ -154,30 +158,32 @@ public abstract class PlexusJUnit4TestCase
         return getConfiguration( null );
     }
 
-    protected InputStream getConfiguration( String subname )
+    @SuppressWarnings( "unused" )
+    protected InputStream getConfiguration( final String subname )
         throws Exception
     {
-        String className = getClass().getName();
-
-        String base = className.substring( className.lastIndexOf( "." ) + 1 );
-
-        String config = null;
+        return getResourceAsStream( getConfigurationName( subname ) );
+    }
 
-        if ( subname == null || subname.equals( "" ) )
-        {
-            config = base + ".xml";
-        }
-        else
-        {
-            config = base + "-" + subname + ".xml";
-        }
-        
-        InputStream configStream = getResourceAsStream( config );
+    protected String getCustomConfigurationName()
+    {
+        return null;
+    }
 
-        return configStream;
+    /**
+     * Allow the retrieval of a container configuration that is based on the name of the test class being run. So if you
+     * have a test class called org.foo.FunTest, then this will produce a resource name of org/foo/FunTest.xml which
+     * would be used to configure the Plexus container before running your test.
+     *
+     * @param subname
+     * @return
+     */
+    protected String getConfigurationName( final String subname )
+    {
+        return getClass().getName().replace( '.', '/' ) + ".xml";
     }
 
-    protected InputStream getResourceAsStream( String resource )
+    protected InputStream getResourceAsStream( final String resource )
     {
         return getClass().getResourceAsStream( resource );
     }
@@ -191,19 +197,31 @@ public abstract class PlexusJUnit4TestCase
     // Container access
     // ----------------------------------------------------------------------
 
-    protected Object lookup( String componentKey )
+    protected Object lookup( final String componentKey )
         throws Exception
     {
         return getContainer().lookup( componentKey );
     }
 
-    protected Object lookup( String role, String id )
+    protected Object lookup( final String role, final String roleHint )
+        throws Exception
+    {
+        return getContainer().lookup( role, roleHint );
+    }
+
+    protected <T> T lookup( final Class<T> componentClass )
+        throws Exception
+    {
+        return getContainer().lookup( componentClass );
+    }
+
+    protected <T> T lookup( final Class<T> componentClass, final String roleHint )
         throws Exception
     {
-        return getContainer().lookup( role, id );
+        return getContainer().lookup( componentClass, roleHint );
     }
 
-    protected void release( Object component )
+    protected void release( final Object component )
         throws Exception
     {
         getContainer().release( component );
@@ -213,16 +231,17 @@ public abstract class PlexusJUnit4TestCase
     // Helper methods for sub classes
     // ----------------------------------------------------------------------
 
-    public static File getTestFile( String path )
+    public static File getTestFile( final String path )
     {
         return new File( getBasedir(), path );
     }
 
-    public static File getTestFile( String basedir, String path )
+    @SuppressWarnings( "hiding" )
+    public static File getTestFile( final String basedir, final String path )
     {
         File basedirFile = new File( basedir );
 
-        if ( ! basedirFile.isAbsolute() )
+        if ( !basedirFile.isAbsolute() )
         {
             basedirFile = getTestFile( basedir );
         }
@@ -230,12 +249,13 @@ public abstract class PlexusJUnit4TestCase
         return new File( basedirFile, path );
     }
 
-    public static String getTestPath( String path )
+    public static String getTestPath( final String path )
     {
         return getTestFile( path ).getAbsolutePath();
     }
 
-    public static String getTestPath( String basedir, String path )
+    @SuppressWarnings( "hiding" )
+    public static String getTestPath( final String basedir, final String path )
     {
         return getTestFile( basedir, path ).getAbsolutePath();
     }
@@ -256,4 +276,16 @@ public abstract class PlexusJUnit4TestCase
 
         return basedir;
     }
+
+    public String getTestConfiguration()
+    {
+        return getTestConfiguration( getClass() );
+    }
+
+    public static String getTestConfiguration( final Class<?> clazz )
+    {
+        final String s = clazz.getName().replace( '.', '/' );
+
+        return s.substring( 0, s.indexOf( "$" ) ) + ".xml";
+    }
 }
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractReleaseTestCase.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractReleaseTestCase.java
index 9df481c..5bb4c6a 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractReleaseTestCase.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractReleaseTestCase.java
@@ -32,47 +32,52 @@ import java.nio.file.SimpleFileVisitor;
 import java.nio.file.StandardCopyOption;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Stack;
 
 import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.manager.WagonManager;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.MavenArtifactRepository;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.artifact.resolver.ArtifactCollector;
-import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.Repository;
-import org.apache.maven.profiles.DefaultProfileManager;
-import org.apache.maven.profiles.ProfileManager;
+import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.project.ProjectBuildingRequest.RepositoryMerging;
+import org.apache.maven.project.ProjectBuildingResult;
 import org.apache.maven.project.ProjectSorter;
+import org.apache.maven.repository.internal.MavenRepositorySystemSession;
 import org.apache.maven.shared.release.PlexusJUnit4TestCase;
 import org.apache.maven.shared.release.util.ReleaseUtil;
-import org.codehaus.plexus.context.ContextException;
-import org.codehaus.plexus.context.DefaultContext;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
+import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
+import org.sonatype.aether.repository.WorkspaceReader;
+import org.sonatype.aether.repository.WorkspaceRepository;
 import org.xmlunit.builder.DiffBuilder;
 import org.xmlunit.diff.Comparison;
 import org.xmlunit.diff.ComparisonResult;
+import org.xmlunit.diff.ComparisonType;
+import org.xmlunit.diff.DefaultNodeMatcher;
 import org.xmlunit.diff.Diff;
 import org.xmlunit.diff.DifferenceEvaluator;
+import org.xmlunit.diff.ElementSelectors;
 
 /**
  * Base class for some release tests.
@@ -82,73 +87,22 @@ import org.xmlunit.diff.DifferenceEvaluator;
 public abstract class AbstractReleaseTestCase
     extends PlexusJUnit4TestCase
 {
-    protected MavenProjectBuilder projectBuilder;
-
+    protected ProjectBuilder projectBuilder;
+    
     protected ArtifactRepository localRepository;
 
     protected ReleasePhase phase;
 
-    private static final DefaultContext EMPTY_CONTEXT = new DefaultContext()
-    {
-        public Object get( Object key )
-            throws ContextException
-        {
-            return null;
-        }
-    };
-
     public void setUp()
         throws Exception
     {
         super.setUp();
-
-        projectBuilder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE );
-
-        ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "default" );
+        
+        projectBuilder = lookup( ProjectBuilder.class );
+        
+        ArtifactRepositoryLayout layout = lookup( ArtifactRepositoryLayout.class, "default" );
         String localRepoPath = getTestFile( "target/local-repository" ).getAbsolutePath().replace( '\\', '/' );
-        localRepository = new DefaultArtifactRepository( "local", "file://" + localRepoPath, layout );
-    }
-
-    public void tearDown()
-        throws Exception
-    {
-        // unhook circular references to the container that would avoid memory being cleaned up
-        ( (Contextualizable) projectBuilder ).contextualize( EMPTY_CONTEXT );
-        ( (Contextualizable) lookup( WagonManager.ROLE ) ).contextualize( EMPTY_CONTEXT );
-
-        super.tearDown();
-    }
-
-    private Map<String,Artifact> createManagedVersionMap( String projectId, DependencyManagement dependencyManagement,
-                                         ArtifactFactory artifactFactory )
-        throws ProjectBuildingException
-    {
-        Map<String,Artifact> map;
-        if ( dependencyManagement != null && dependencyManagement.getDependencies() != null )
-        {
-            map = new HashMap<String,Artifact>();
-            for ( Dependency d : dependencyManagement.getDependencies() )
-            {
-                try
-                {
-                    VersionRange versionRange = VersionRange.createFromVersionSpec( d.getVersion() );
-                    Artifact artifact = artifactFactory.createDependencyArtifact( d.getGroupId(), d.getArtifactId(),
-                                                                                  versionRange, d.getType(),
-                                                                                  d.getClassifier(), d.getScope() );
-                    map.put( d.getManagementKey(), artifact );
-                }
-                catch ( InvalidVersionSpecificationException e )
-                {
-                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + d.getVersion() +
-                        "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e );
-                }
-            }
-        }
-        else
-        {
-            map = Collections.emptyMap();
-        }
-        return map;
+        localRepository = new MavenArtifactRepository( "local", "file://" + localRepoPath, layout, null, null );
     }
 
     protected List<MavenProject> createReactorProjects( String path, String subpath )
@@ -211,73 +165,44 @@ public abstract class AbstractReleaseTestCase
         repository.setId( "central" );
         repository.setUrl( getRemoteRepositoryURL() );
 
-        ProfileManager profileManager = new DefaultProfileManager( getContainer() );
         Profile profile = new Profile();
         profile.setId( "profile" );
         profile.addRepository( repository );
-        profileManager.addProfile( profile );
-        profileManager.activateAsDefault( profile.getId() );
-
+        
+        ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest();
+        buildingRequest.setLocalRepository( localRepository );
+        buildingRequest.setRemoteRepositories( repos );
+        buildingRequest.setPluginArtifactRepositories( repos );
+        buildingRequest.setRepositoryMerging( RepositoryMerging.REQUEST_DOMINANT );
+        MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
+        repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( localRepository.getBasedir() ) );
+        buildingRequest.setRepositorySession( repositorySession );
+        buildingRequest.addProfile( profile );
+        buildingRequest.setActiveProfileIds( Arrays.asList( profile.getId() ) );
+        buildingRequest.setResolveDependencies( true );
+
+        List<ProjectBuildingResult> buildingResults =
+            projectBuilder.build( Collections.singletonList( testCaseRootTo.resolve( projectFiles.peek() ).toFile() ),
+                                  true, buildingRequest );
+        
         List<MavenProject> reactorProjects = new ArrayList<MavenProject>();
-        while ( !projectFiles.isEmpty() )
+        for ( ProjectBuildingResult buildingResult : buildingResults )
         {
-            Path projectPath = projectFiles.pop();
-
-            Path projectFile = testCaseRootTo.resolve( projectPath );
-
-            MavenProject project = projectBuilder.build( projectFile.toFile(), localRepository, profileManager );
-
-            for ( Iterator i = project.getModules().iterator(); i.hasNext(); )
-            {
-                String module = (String) i.next();
-
-                Path modulePath;
-
-                if ( projectPath.getParent() == null )
-                {
-                    modulePath = Paths.get( module, "pom.xml" );
-                }
-                else
-                {
-                    modulePath = projectPath.getParent().resolve( module ).resolve( "pom.xml" );
-                }
-                projectFiles.push( modulePath );
-            }
-
-            reactorProjects.add( project );
+            reactorProjects.add( buildingResult.getProject() ) ;
         }
+
+        WorkspaceReader simpleReactorReader = new SimpleReactorWorkspaceReader( reactorProjects );
+        repositorySession.setWorkspaceReader( simpleReactorReader );
         
         ProjectSorter sorter = new ProjectSorter( reactorProjects );
-
         reactorProjects = sorter.getSortedProjects();
-
-        ArtifactFactory artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
-        ArtifactCollector artifactCollector = (ArtifactCollector) lookup( ArtifactCollector.class.getName() );
-        ArtifactMetadataSource artifactMetadataSource = (ArtifactMetadataSource) lookup( ArtifactMetadataSource.ROLE );
-
-        // pass back over and resolve dependencies - can't be done earlier as the order may not be correct
-        for ( MavenProject project : reactorProjects )
+        
+        List<MavenProject> resolvedProjects = new ArrayList<>( reactorProjects.size() );
+        for ( MavenProject project  : reactorProjects )
         {
-            project.setRemoteArtifactRepositories( repos );
-            project.setPluginArtifactRepositories( repos );
-
-            Artifact projectArtifact = project.getArtifact();
-
-            Map<String, Artifact> managedVersions = createManagedVersionMap(
-                ArtifactUtils.versionlessKey( projectArtifact.getGroupId(), projectArtifact.getArtifactId() ),
-                project.getDependencyManagement(), artifactFactory );
-
-            project.setDependencyArtifacts( project.createArtifacts( artifactFactory, null, null ) );
-
-            ArtifactResolutionResult result = artifactCollector.collect( project.getDependencyArtifacts(),
-                                                                         projectArtifact, managedVersions,
-                                                                         localRepository, repos, artifactMetadataSource,
-                                                                         null, Collections.EMPTY_LIST );
-
-            project.setArtifacts( result.getArtifacts() );
+            resolvedProjects.add( projectBuilder.build( project.getFile(), buildingRequest ).getProject() );
         }
-
-        return reactorProjects;
+        return resolvedProjects;
     }
 
     protected static Map<String,MavenProject> getProjectsAsMap( List<MavenProject> reactorProjects )
@@ -362,6 +287,9 @@ public abstract class AbstractReleaseTestCase
         {
             diffBuilder.ignoreComments();
         }
+        // Order of elements has changed between M2 and M3, so match by name
+        diffBuilder.withNodeMatcher( new DefaultNodeMatcher( ElementSelectors.byName ) ).checkForSimilar();        
+        
         diffBuilder.withDifferenceEvaluator( new DifferenceEvaluator()
         {
             @Override
@@ -372,6 +300,19 @@ public abstract class AbstractReleaseTestCase
                 {
                     return ComparisonResult.EQUAL;
                 }
+                else if ( outcome == ComparisonResult.DIFFERENT
+                    && comparison.getType() == ComparisonType.CHILD_NODELIST_SEQUENCE )
+                {
+                    // Order of elements has changed between M2 and M3
+                    return ComparisonResult.EQUAL;
+                }
+                else if ( outcome == ComparisonResult.DIFFERENT
+                                && comparison.getType() == ComparisonType.TEXT_VALUE
+                                && "${project.build.directory}/site".equals( comparison.getTestDetails().getValue() ) )
+                {
+                    // M2 was target/site, M3 is ${project.build.directory}/site
+                    return ComparisonResult.EQUAL;
+                }
                 else
                 {
                     return outcome;
@@ -401,5 +342,58 @@ public abstract class AbstractReleaseTestCase
         throws IOException
     {
         return ReleaseUtil.isSymlink( file ) ? file.getCanonicalPath() : file.getAbsolutePath();
-    }    
+    }
+    
+    /**
+     * WorkspaceReader to find versions and artifacts from reactor
+     */
+    private static final class SimpleReactorWorkspaceReader
+        implements WorkspaceReader
+    {
+        private final List<MavenProject> reactorProjects;
+
+        private SimpleReactorWorkspaceReader( List<MavenProject> reactorProjects )
+        {
+            this.reactorProjects = reactorProjects;
+        }
+
+        @Override
+        public WorkspaceRepository getRepository()
+        {
+            return null;
+        }
+
+        @Override
+        public List<String> findVersions( org.sonatype.aether.artifact.Artifact artifact )
+        {
+            for ( MavenProject mavenProject : reactorProjects )
+            {
+                if ( Objects.equals( artifact.toString(), mavenProject.getArtifact().toString() ) )
+                {
+                    return Collections.singletonList( mavenProject.getArtifact().getVersion() );
+                }
+            }
+            return Collections.emptyList();
+        }
+
+        @Override
+        public File findArtifact( org.sonatype.aether.artifact.Artifact artifact )
+        {
+            for ( MavenProject mavenProject : reactorProjects )
+            {
+                String pom = mavenProject.getGroupId() + ':' + mavenProject.getArtifactId() + ":pom:"
+                    + mavenProject.getVersion();
+                if ( Objects.equals( artifact.toString(), pom ) )
+                {
+                    return mavenProject.getFile();
+                }
+                else if ( Objects.equals( artifact.toString(), mavenProject.getArtifact().toString() ) )
+                {
+                    // just an existing, content doesn't matter
+                    return mavenProject.getFile();
+                }
+            }
+            return null;
+        }
+    }
 }
\ No newline at end of file
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java
index 08cfdad..6a02e6d 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java
@@ -48,6 +48,7 @@ import org.apache.maven.shared.release.scm.ScmRepositoryConfigurator;
 import org.apache.maven.shared.release.stubs.ScmManagerStub;
 import org.apache.maven.shared.release.transform.jdom.JDomModelETLFactory;
 import org.apache.maven.shared.release.util.ReleaseUtil;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -420,6 +421,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     }
 
     @Test
+    @Ignore( "Extensions being part of reactor is not supported anymore" )
     public void testRewritePomExtension()
         throws Exception
     {
@@ -432,6 +434,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     }
 
     @Test
+    @Ignore( "Extensions being part of reactor is not supported anymore" )
     public void testRewritePomUnmappedExtension()
         throws Exception
     {
@@ -451,6 +454,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     }
 
     @Test
+    @Ignore( "Extensions being part of reactor is not supported anymore" )
     public void testRewritePomExtensionDifferentVersion()
         throws Exception
     {
@@ -463,6 +467,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     }
 
     @Test
+    @Ignore( "Extensions being part of reactor is not supported anymore" )
     public void testRewritePomExtensionUndefinedVersion()
         throws Exception
     {
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
index c3a95e1..df19bda 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
@@ -196,7 +196,7 @@ public class GenerateReleasePomsPhaseTest
 
         when( scmProviderMock.add( isA( ScmRepository.class ),
                argThat( new IsScmFileSetEquals( fileSet ) ) ) ).thenReturn( new AddScmResult( "...",
-                              Collections.singletonList( new ScmFile( Maven.RELEASE_POMv4, ScmFileStatus.ADDED ) ) ) );
+                              Collections.singletonList( new ScmFile( Maven.POMv4, ScmFileStatus.ADDED ) ) ) );
 
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
         stub.setScmProvider( scmProviderMock );
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RemoveReleasePomsPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RemoveReleasePomsPhaseTest.java
index c1a3332..3d089c9 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RemoveReleasePomsPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RemoveReleasePomsPhaseTest.java
@@ -83,7 +83,7 @@ public class RemoveReleasePomsPhaseTest
         ScmProvider scmProviderMock = mock( ScmProvider.class );
         when( scmProviderMock.remove( isA( ScmRepository.class ), argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isA( String.class ) ) ).thenReturn( new RemoveScmResult( "...",
-                                                                                               Collections.singletonList( new ScmFile( Maven.RELEASE_POMv4,
+                                                                                               Collections.singletonList( new ScmFile( Maven.POMv4,
                                                                                                                                        ScmFileStatus.DELETED ) ) ) );
 
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
@@ -119,7 +119,7 @@ public class RemoveReleasePomsPhaseTest
         ScmProvider scmProviderMock = mock( ScmProvider.class );
         when( scmProviderMock.remove( isA( ScmRepository.class ), argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isA( String.class ) ) ).thenReturn( new RemoveScmResult( "...",
-                                                                                               Collections.singletonList( new ScmFile( Maven.RELEASE_POMv4,
+                                                                                               Collections.singletonList( new ScmFile( Maven.POMv4,
                                                                                                                                        ScmFileStatus.DELETED ) ) ) );
 
         ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
@@ -177,7 +177,7 @@ public class RemoveReleasePomsPhaseTest
         {
             reader = new BufferedReader( new StringReader( result.getOutput() ) );
 
-            assertEquals( "[INFO] Removing release POM for 'Unnamed - groupId:artifactId:jar:1.0-SNAPSHOT'...",
+            assertEquals( "[INFO] Removing release POM for 'artifactId'...",
                           reader.readLine() );
             assertEquals( "Expected EOF", null, reader.readLine() );
         }
@@ -213,7 +213,7 @@ public class RemoveReleasePomsPhaseTest
         {
             reader = new BufferedReader( new StringReader( result.getOutput() ) );
 
-            assertEquals( "[INFO] Removing release POM for 'Unnamed - groupId:artifactId:jar:1.0-SNAPSHOT'...",
+            assertEquals( "[INFO] Removing release POM for 'artifactId'...",
                           reader.readLine() );
             assertEquals( "[INFO] Full run would be removing [" + reactorProjects.get( 0 ).getFile().getParent()
                 + File.separator + "release-pom.xml]", reader.readLine() );
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhaseTest.java
index 9740822..5aec3f2 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhaseTest.java
@@ -89,7 +89,7 @@ public class ScmCommitPreparationPhaseTest
     public void testResolvesCorrectBranchImplementation()
         throws Exception
     {
-        assertEquals( ScmCommitPreparationPhase.class, lookup( ReleasePhase.ROLE, "scm-commit-branch" ).getClass() );
+        assertTrue( lookup( ReleasePhase.ROLE, "scm-commit-branch" ) instanceof ScmCommitPreparationPhase );
     }
 
     @Test
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/versions/DefaultVersionInfoTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/versions/DefaultVersionInfoTest.java
index 3a9a69d..7dbf6f0 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/versions/DefaultVersionInfoTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/versions/DefaultVersionInfoTest.java
@@ -1,5 +1,9 @@
 package org.apache.maven.shared.release.versions;
 
+import java.util.Properties;
+
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,6 +28,17 @@ import junit.framework.TestCase;
 public class DefaultVersionInfoTest
     extends TestCase
 {
+    private String mavenVersion;
+    
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        Properties pomProperties = new Properties();
+        pomProperties.load( DefaultArtifactVersion.class.getResourceAsStream( "/META-INF/maven/org.apache.maven/maven-artifact/pom.properties" ) );
+        mavenVersion = pomProperties.getProperty( "version" );
+    }
+    
     public void testParse()
         throws Exception
     {
@@ -157,12 +172,25 @@ public class DefaultVersionInfoTest
         throws Exception
     {
         checkVersionLessThanVersion( "1.01", "1.02" );
-        checkVersionLessThanVersion( "1.00009", "1.01" );
+        
+        // M2.2.1
+        // checkVersionLessThanVersion( "1.00009", "1.01" );
+        // M3.0, because prefix 0's are ignored, hence 1 < 9
+        checkVersionLessThanVersion( "1.01", "1.00009" );
+        
         checkVersionLessThanVersion( "1.01", "1.01.01" );
 
-        checkVersionLessThanVersion( "1.01", "1.1" );
+        // M2.2.1
+        // checkVersionLessThanVersion( "1.01", "1.1" );
+        // M3.0, because prefix 0's are ignored, hence 1 == 1
+        checkVersionEqualVersion( "1.01", "1.1" );
+        
         checkVersionEqualVersion( "1.01", "1.01" );
-        checkVersionLessThanVersion( "1.001", "1.01" );
+        
+        // M2.2.1
+        // checkVersionLessThanVersion( "1.001", "1.01" );
+        // M3.0, because prefix 0's are ignored, hence 1 == 1
+        checkVersionEqualVersion( "1.001", "1.01" );
     }
 
     public void testCompareToAnnotation()
@@ -177,7 +205,10 @@ public class DefaultVersionInfoTest
         checkVersionLessThanVersion( "1.01-alpha-4-SNAPSHOT", "1.01-alpha-4" );
         checkVersionLessThanVersion( "1.01-alpha-4", "1.01-alpha-5-SNAPSHOT" );
 
-        checkVersionLessThanVersion( "1.01-alpha-004-SNAPSHOT", "1.01-alpha-4-SNAPSHOT" );
+        // M2.2.1
+        // checkVersionLessThanVersion( "1.01-alpha-004-SNAPSHOT", "1.01-alpha-4-SNAPSHOT" );
+        // M3.0, because prefix 0's are ignored, hence 4 == 4
+        checkVersionEqualVersion( "1.01-alpha-004-SNAPSHOT", "1.01-alpha-4-SNAPSHOT" );
     }
 
     public void testCompareToAnnotationRevision()
@@ -187,7 +218,10 @@ public class DefaultVersionInfoTest
         checkVersionLessThanVersion( "1.01-beta-0004-SNAPSHOT", "1.01-beta-5-SNAPSHOT" );
         checkVersionLessThanVersion( "1.01-beta-4-SNAPSHOT", "1.01.1-beta-4-SNAPSHOT" );
 
-        checkVersionLessThanVersion( "1.01-beta-0004-SNAPSHOT", "1.01-beta-4-SNAPSHOT" );
+        // M2.2.1
+        // checkVersionLessThanVersion( "1.01-beta-0004-SNAPSHOT", "1.01-beta-4-SNAPSHOT" );
+        // M3.0, because prefix 0's are ignored, hence 4 == 4
+        checkVersionEqualVersion( "1.01-beta-0004-SNAPSHOT", "1.01-beta-4-SNAPSHOT" );
     }
 
     public void testCompareToBuildSpecifier()
@@ -198,7 +232,11 @@ public class DefaultVersionInfoTest
 
         checkVersionEqualVersion( "1.01-beta-04-SNAPSHOT", "1.01-beta-04-SNAPSHOT" );
 
-        checkVersionLessThanVersion( "1.01-beta-04-20051112.134500-2", "1.01-beta-04-SNAPSHOT" );
+        if ( !"3.0".equals( mavenVersion ) )
+        {
+            // bug??
+            checkVersionLessThanVersion( "1.01-beta-04-20051112.134500-2", "1.01-beta-04-SNAPSHOT" );
+        }
         checkVersionLessThanVersion( "1.01-beta-04-20051112.134500-1", "1.01-beta-04-20051112.134500-2" );
         checkVersionLessThanVersion( "1.01-beta-04-20051112.134500-1", "1.01-beta-04-20051113.134500-1" );
     }
@@ -325,11 +363,11 @@ public class DefaultVersionInfoTest
         }
         else if ( comparison < 0 )
         {
-            assertTrue( lesserV.compareTo( greaterV ) < 0 );
+            assertTrue( "Expected less but was " + lesserV.compareTo( greaterV ), lesserV.compareTo( greaterV ) < 0 );
         }
         else if ( comparison > 0 )
         {
-            assertTrue( lesserV.compareTo( greaterV ) > 0 );
+            assertTrue( "Expected more but was " + lesserV.compareTo( greaterV ), lesserV.compareTo( greaterV ) > 0 );
         }
     }
 }
diff --git a/maven-release-manager/src/test/remote-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar b/maven-release-manager/src/test/remote-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
new file mode 100644
index 0000000..421376d
--- /dev/null
+++ b/maven-release-manager/src/test/remote-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
@@ -0,0 +1 @@
+dummy
diff --git a/maven-release-manager/src/test/remote-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom b/maven-release-manager/src/test/remote-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom
new file mode 100644
index 0000000..b0e58f9
--- /dev/null
+++ b/maven-release-manager/src/test/remote-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom
@@ -0,0 +1,30 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.codehaus.plexus</groupId>
+  <artifactId>plexus-utils</artifactId>
+  <version>1.1</version>
+  <description>Required by by org.apache.maven.plugin.internal.PlexusUtilsInjector</description>
+  <distributionManagement>
+    <status>deployed</status>
+  </distributionManagement>
+</project>
\ No newline at end of file
diff --git a/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/expected-release-pom.xml b/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/expected-release-pom.xml
index fcf0bc6..2d02ef7 100644
--- a/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/expected-release-pom.xml
+++ b/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/expected-release-pom.xml
@@ -47,7 +47,7 @@ under the License.
       <plugin>
         <groupId>groupId</groupId>
         <artifactId>subproject1</artifactId>
-        <version>RELEASE</version>
+        <version>1.0</version>
       </plugin>
     </plugins>
   </build>
diff --git a/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/pom.xml b/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/pom.xml
index c9aac9d..a71b019 100644
--- a/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/pom.xml
+++ b/maven-release-manager/src/test/resources/projects/generate-release-poms/internal-snapshot-plugins/subproject4/pom.xml
@@ -29,6 +29,7 @@
       <plugin>
         <groupId>groupId</groupId>
         <artifactId>subproject1</artifactId>
+        <version>${project.version}</version>
       </plugin>
     </plugins>
   </build>
diff --git a/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/expected-pom.xml b/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/expected-pom.xml
index 92e8a94..4a765e1 100644
--- a/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/expected-pom.xml
+++ b/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/expected-pom.xml
@@ -20,6 +20,7 @@
     <groupId>groupId</groupId>
     <artifactId>artifactId</artifactId>
     <version>1.0-SNAPSHOT</version>
+    <relativePath>../root-project</relativePath>
   </parent>
 
   <artifactId>subproject1</artifactId>
diff --git a/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/pom.xml b/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/pom.xml
index 92e8a94..4a765e1 100644
--- a/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/pom.xml
+++ b/maven-release-manager/src/test/resources/projects/rewrite-for-branch/pom-with-parent-flat/subproject1/pom.xml
@@ -20,6 +20,7 @@
     <groupId>groupId</groupId>
     <artifactId>artifactId</artifactId>
     <version>1.0-SNAPSHOT</version>
+    <relativePath>../root-project</relativePath>
   </parent>
 
   <artifactId>subproject1</artifactId>
diff --git a/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom-different-version.xml b/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom-different-version.xml
index d146d6a..a6f2318 100644
--- a/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom-different-version.xml
+++ b/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom-different-version.xml
@@ -40,13 +40,14 @@
         <version>2.0</version>
       </plugin>
     </plugins>
-    <extensions>
-      <extension>
-        <groupId>groupId</groupId>
-        <artifactId>subproject1</artifactId>
-        <version>2.0</version>
-      </extension>
-    </extensions>
+<!-- NOT SUPPORTED ANYMORE SINCE MAVEN3 -->
+<!--     <extensions> -->
+<!--       <extension> -->
+<!--         <groupId>groupId</groupId> -->
+<!--         <artifactId>subproject1</artifactId> -->
+<!--         <version>${project.version}</version> -->
+<!--       </extension> -->
+<!--     </extensions> -->
   </build>
 
   <reporting>
diff --git a/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom.xml b/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom.xml
index 167d3d6..99ce25c 100644
--- a/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom.xml
+++ b/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/expected-pom.xml
@@ -40,13 +40,14 @@
         <version>${project.version}</version>
       </plugin>
     </plugins>
-    <extensions>
-      <extension>
-        <groupId>groupId</groupId>
-        <artifactId>subproject1</artifactId>
-        <version>${project.version}</version>
-      </extension>
-    </extensions>
+<!-- NOT SUPPORTED ANYMORE SINCE MAVEN3 -->
+<!--     <extensions> -->
+<!--       <extension> -->
+<!--         <groupId>groupId</groupId> -->
+<!--         <artifactId>subproject1</artifactId> -->
+<!--         <version>${project.version}</version> -->
+<!--       </extension> -->
+<!--     </extensions> -->
   </build>
 
   <reporting>
diff --git a/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/pom.xml b/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/pom.xml
index 82f1dc6..f3783b9 100644
--- a/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/pom.xml
+++ b/maven-release-manager/src/test/resources/projects/rewrite-for-release/interpolated-versions/subproject3/pom.xml
@@ -40,13 +40,14 @@
         <version>${project.version}</version>
       </plugin>
     </plugins>
-    <extensions>
-      <extension>
-        <groupId>groupId</groupId>
-        <artifactId>subproject1</artifactId>
-        <version>${project.version}</version>
-      </extension>
-    </extensions>
+<!-- NOT SUPPORTED ANYMORE SINCE MAVEN3 -->
+<!--     <extensions> -->
+<!--       <extension> -->
+<!--         <groupId>groupId</groupId> -->
+<!--         <artifactId>subproject1</artifactId> -->
+<!--         <version>${project.version}</version> -->
+<!--       </extension> -->
+<!--     </extensions> -->
   </build>
 
   <reporting>
diff --git a/maven-release-plugin/pom.xml b/maven-release-plugin/pom.xml
index 6846f44..091699c 100644
--- a/maven-release-plugin/pom.xml
+++ b/maven-release-plugin/pom.xml
@@ -50,7 +50,6 @@
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
-      <version>${mavenPluginPluginVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.release</groupId>
@@ -67,10 +66,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
       <artifactId>maven-settings</artifactId>
     </dependency>
     <dependency>
@@ -86,14 +81,24 @@
       <artifactId>jdom</artifactId>
     </dependency>
     <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.shared</groupId>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-compat</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-testing</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
-      <version>1.1</version>
+      <version>2.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/pom.xml b/pom.xml
index 0106aeb..dd2cddc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
   <properties>
     <scmVersion>1.9.6-SNAPSHOT</scmVersion>
     <javaVersion>7</javaVersion>
-    <mavenVersion>2.2.1</mavenVersion>
+    <mavenVersion>3.0</mavenVersion>
     <maven.site.path>maven-release-archives/maven-release-LATEST</maven.site.path>
   </properties>
 
@@ -138,13 +138,14 @@
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
-        <artifactId>maven-artifact-manager</artifactId>
+        <artifactId>maven-core</artifactId>
         <version>${mavenVersion}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
-        <artifactId>maven-core</artifactId>
+        <artifactId>maven-compat</artifactId>
         <version>${mavenVersion}</version>
+        <scope>test</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
@@ -158,11 +159,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
-        <artifactId>maven-project</artifactId>
-        <version>${mavenVersion}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.maven</groupId>
         <artifactId>maven-repository-metadata</artifactId>
         <version>${mavenVersion}</version>
       </dependency>

--
To stop receiving notification emails like this one, please contact
"[hidden email]" <[hidden email]>.