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

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

commit 150570ac347bc2e24cab1887090ccffd5e113ee2
Author: rfscholte <rfscho...@apache.org>
AuthorDate: Sat Mar 24 20:17:06 2018 +0100

    Phase 1
---
 .../release/phase/AbstractRewritePomsPhase.java    | 64 +++++++++++-----------
 .../release/phase/AbstractRunGoalsPhase.java       | 22 --------
 .../shared/release/phase/MapVersionsPhase.java     | 52 ++++++++++--------
 .../shared/release/phase/RunPerformGoalsPhase.java |  6 +-
 .../maven/shared/release/phase/ScmBranchPhase.java |  4 +-
 .../maven/shared/release/phase/ScmTagPhase.java    |  4 +-
 .../shared/release/transform/ModelETLRequest.java  | 13 ++---
 .../release/transform/jdom/JDomModelETL.java       | 11 ++--
 .../transform/jdom/JDomModelETLFactory.java        |  2 +-
 .../maven/shared/release/util/ReleaseUtil.java     |  3 +-
 10 files changed, 82 insertions(+), 99 deletions(-)

diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
index 6b1dfc2..8acbda8 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Properties;
 
 import org.apache.maven.artifact.Artifact;
@@ -32,6 +33,7 @@ import org.apache.maven.model.Build;
 import org.apache.maven.model.BuildBase;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.ModelBase;
+import org.apache.maven.model.Parent;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Profile;
 import org.apache.maven.project.MavenProject;
@@ -183,7 +185,7 @@ public abstract class AbstractRewritePomsPhase
 
         ModelETLRequest request = new ModelETLRequest();
         request.setLineSeparator( ls );
-        request.setProject( project );
+        request.setModelVersion( project.getModelVersion() );
         request.setReleaseDescriptor( releaseDescriptor );
 
         ModelETL etl = modelETLFactories.get( modelETL ).newInstance( request 
);
@@ -234,42 +236,42 @@ public abstract class AbstractRewritePomsPhase
                                     boolean simulate )
         throws ReleaseExecutionException, ReleaseFailureException
     {
-        Model model = project.getModel();
+        Model modelSource = project.getModel();
 
         Properties properties = modelTarget.getProperties();
 
-        String parentVersion = rewriteParent( project, modelTarget, 
releaseDescriptor, simulate );
+        rewriteParent( modelSource, modelTarget, releaseDescriptor, simulate );
 
-        String projectId = ArtifactUtils.versionlessKey( project.getGroupId(), 
project.getArtifactId() );
+        String projectId = ArtifactUtils.versionlessKey( 
modelSource.getGroupId(), modelSource.getArtifactId() );
 
-        rewriteVersion( modelTarget, releaseDescriptor, projectId, project, 
parentVersion );
+        rewriteVersion( modelTarget, releaseDescriptor, projectId, modelSource 
);
 
         Build buildTarget = modelTarget.getBuild();
         if ( buildTarget != null )
         {
             // profile.build.extensions doesn't exist, so only rewrite 
project.build.extensions
             rewriteArtifactVersions( toMavenCoordinates( 
buildTarget.getExtensions() ), 
-                                     model, properties, result, 
releaseDescriptor, simulate );
+                                     modelSource, properties, result, 
releaseDescriptor, simulate );
 
             rewriteArtifactVersions( toMavenCoordinates( 
buildTarget.getPlugins() ), 
-                                     model, properties, result, 
releaseDescriptor, simulate );
+                                     modelSource, properties, result, 
releaseDescriptor, simulate );
 
             for ( Plugin plugin : buildTarget.getPlugins() )
             {
                 rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ),
-                                         model, properties,
+                                         modelSource, properties,
                                          result, releaseDescriptor, simulate );
             }
 
             if ( buildTarget.getPluginManagement() != null )
             {
-                rewriteArtifactVersions( toMavenCoordinates( 
buildTarget.getPluginManagement().getPlugins() ), model,
-                                         properties, result, 
releaseDescriptor, simulate );
+                rewriteArtifactVersions( toMavenCoordinates( 
buildTarget.getPluginManagement().getPlugins() ),
+                                         modelSource, properties, result, 
releaseDescriptor, simulate );
 
                 for ( Plugin plugin : 
buildTarget.getPluginManagement().getPlugins() )
                 {
-                    rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ), model, properties, result,
-                                             releaseDescriptor, simulate );
+                    rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ), modelSource, properties,
+                                             result, releaseDescriptor, 
simulate );
                 }
             }
         }
@@ -279,24 +281,24 @@ public abstract class AbstractRewritePomsPhase
             BuildBase profileBuild = profile.getBuild();
             if ( profileBuild != null )
             {
-                rewriteArtifactVersions( toMavenCoordinates( 
profileBuild.getPlugins() ), model, properties, result,
-                                         releaseDescriptor, simulate );
+                rewriteArtifactVersions( toMavenCoordinates( 
profileBuild.getPlugins() ), modelSource, properties,
+                                         result, releaseDescriptor, simulate );
 
                 for ( Plugin plugin : profileBuild.getPlugins() )
                 {
-                    rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ), model, properties, result,
-                                             releaseDescriptor, simulate );
+                    rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ), modelSource, properties,
+                                             result, releaseDescriptor, 
simulate );
                 }
 
                 if ( profileBuild.getPluginManagement() != null )
                 {
                     rewriteArtifactVersions( toMavenCoordinates( 
profileBuild.getPluginManagement().getPlugins() ),
-                                             model, properties, result, 
releaseDescriptor, simulate );
+                                             modelSource, properties, result, 
releaseDescriptor, simulate );
 
                     for ( Plugin plugin : 
profileBuild.getPluginManagement().getPlugins() )
                     {
-                        rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ), model, properties,
-                                                 result, releaseDescriptor, 
simulate );
+                        rewriteArtifactVersions( toMavenCoordinates( 
plugin.getDependencies() ), modelSource,
+                                                 properties, result, 
releaseDescriptor, simulate );
                     }
                 }
             }
@@ -308,19 +310,19 @@ public abstract class AbstractRewritePomsPhase
 
         for ( ModelBase modelBase : modelBases )
         {
-            rewriteArtifactVersions( toMavenCoordinates( 
modelBase.getDependencies() ), model, properties, result,
+            rewriteArtifactVersions( toMavenCoordinates( 
modelBase.getDependencies() ), modelSource, properties, result,
                                      releaseDescriptor, simulate );
 
             if ( modelBase.getDependencyManagement() != null )
             {
                 rewriteArtifactVersions( toMavenCoordinates( 
modelBase.getDependencyManagement().getDependencies() ),
-                                         model, properties, result, 
releaseDescriptor, simulate );
+                                         modelSource, properties, result, 
releaseDescriptor, simulate );
             }
 
             if ( modelBase.getReporting() != null )
             {
-                rewriteArtifactVersions( toMavenCoordinates( 
modelBase.getReporting().getPlugins() ), model, properties,
-                                         result, releaseDescriptor, simulate );
+                rewriteArtifactVersions( toMavenCoordinates( 
modelBase.getReporting().getPlugins() ), modelSource,
+                                         properties, result, 
releaseDescriptor, simulate );
             }
         }
 
@@ -328,26 +330,27 @@ public abstract class AbstractRewritePomsPhase
     }
 
     private void rewriteVersion( Model modelTarget, ReleaseDescriptor 
releaseDescriptor, String projectId,
-                                 MavenProject project, String parentVersion )
+                                 Model modelSource )
         throws ReleaseFailureException
     {
         String version = getNextVersion( releaseDescriptor, projectId );
         if ( version == null )
         {
-            throw new ReleaseFailureException( "Version for '" + 
project.getName() + "' was not mapped" );
+            String name = Objects.toString( modelSource.getName(), 
modelSource.getArtifactId() );
+            throw new ReleaseFailureException( "Version for '" + name + "' was 
not mapped" );
         }
 
         modelTarget.setVersion( version );
     }
 
-    private String rewriteParent( MavenProject project, Model targetModel, 
-                                  ReleaseDescriptor releaseDescriptor, boolean 
simulate )
+    private void rewriteParent( Model sourceModel, Model targetModel, 
ReleaseDescriptor releaseDescriptor,
+                                boolean simulate )
         throws ReleaseFailureException
     {
         String parentVersion = null;
-        if ( project.hasParent() )
+        if ( sourceModel.getParent() != null )
         {
-            MavenProject parent = project.getParent();
+            Parent parent = sourceModel.getParent();
             String key = ArtifactUtils.versionlessKey( parent.getGroupId(), 
parent.getArtifactId() );
             parentVersion = getNextVersion( releaseDescriptor, key );
             if ( parentVersion == null )
@@ -360,7 +363,7 @@ public abstract class AbstractRewritePomsPhase
                 String original = getOriginalVersion( releaseDescriptor, key, 
simulate );
                 if ( parent.getVersion().equals( original ) )
                 {
-                    throw new ReleaseFailureException( "Version for parent '" 
+ parent.getName() + "' was not mapped" );
+                    throw new ReleaseFailureException( "Version for parent '" 
+ key + "' was not mapped" );
                 }
             }
             else
@@ -368,7 +371,6 @@ public abstract class AbstractRewritePomsPhase
                 targetModel.getParent().setVersion( parentVersion );
             }
         }
-        return parentVersion;
     }
 
     private void rewriteArtifactVersions( Collection<MavenCoordinate> 
elements, Model projectModel,
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
index 214f86b..8e65f21 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
@@ -96,26 +96,4 @@ public abstract class AbstractRunGoalsPhase
     }
 
     protected abstract String getGoals( ReleaseDescriptor releaseDescriptor );
-
-    /**
-     * Determines the path of the working directory. By default, this is the
-     * checkout directory. For some SCMs, the project root directory is not the
-     * checkout directory itself, but a SCM-specific subdirectory.
-     *
-     * @param checkoutDirectory            The checkout directory as 
java.io.File
-     * @param relativePathProjectDirectory The relative path of the project 
directory within the checkout
-     *                                     directory or ""
-     * @return The working directory
-     */
-    protected File determineWorkingDirectory( File checkoutDirectory, String 
relativePathProjectDirectory )
-    {
-        File workingDirectory = checkoutDirectory;
-
-        if ( StringUtils.isNotEmpty( relativePathProjectDirectory ) )
-        {
-            workingDirectory = new File( checkoutDirectory, 
relativePathProjectDirectory );
-        }
-
-        return workingDirectory;
-    }
 }
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
index 5d1372f..7e81ada 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/MapVersionsPhase.java
@@ -23,9 +23,11 @@ import java.text.MessageFormat;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 import java.util.ResourceBundle;
 
 import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.model.Model;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.shared.release.ReleaseExecutionException;
 import org.apache.maven.shared.release.ReleaseResult;
@@ -107,16 +109,13 @@ public class MapVersionsPhase
 
         resourceBundle = getResourceBundle( releaseEnvironment.getLocale() );
 
-        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects 
);
+        final Model rootModel = ReleaseUtil.getRootProject( reactorProjects 
).getModel();
 
-        if ( releaseDescriptor.isAutoVersionSubmodules() && 
ArtifactUtils.isSnapshot( rootProject.getVersion() ) )
+        if ( releaseDescriptor.isAutoVersionSubmodules() && 
ArtifactUtils.isSnapshot( rootModel.getVersion() ) )
         {
-            // get the root project
-            MavenProject project = rootProject;
+            String projectId = ArtifactUtils.versionlessKey( 
rootModel.getGroupId(), rootModel.getArtifactId() );
 
-            String projectId = ArtifactUtils.versionlessKey( 
project.getGroupId(), project.getArtifactId() );
-
-            String nextVersion = resolveNextVersion( project, projectId, 
releaseDescriptor, result );
+            String nextVersion = resolveNextVersion( rootModel, projectId, 
releaseDescriptor, result );
 
             if ( !convertToSnapshot )
             {
@@ -133,19 +132,20 @@ public class MapVersionsPhase
 
             for ( MavenProject subProject : reactorProjects )
             {
-                String subProjectId =
-                    ArtifactUtils.versionlessKey( subProject.getGroupId(), 
subProject.getArtifactId() );
+                Model subModel = subProject.getModel();
+                
+                String subProjectId = ArtifactUtils.versionlessKey( 
subModel.getGroupId(), subModel.getArtifactId() );
 
                 if ( convertToSnapshot )
                 {
                     String v;
-                    if ( ArtifactUtils.isSnapshot( subProject.getVersion() ) )
+                    if ( ArtifactUtils.isSnapshot( subModel.getVersion() ) )
                     {
                         v = nextVersion;
                     }
                     else
                     {
-                        v = subProject.getVersion();
+                        v = subModel.getVersion();
                     }
 
                     if ( releaseDescriptor.isBranchCreation() && 
convertToBranch )
@@ -167,9 +167,11 @@ public class MapVersionsPhase
         {
             for ( MavenProject project : reactorProjects )
             {
-                String projectId = ArtifactUtils.versionlessKey( 
project.getGroupId(), project.getArtifactId() );
+                Model model = project.getModel();
+                
+                String projectId = ArtifactUtils.versionlessKey( 
model.getGroupId(), model.getArtifactId() );
 
-                String nextVersion = resolveNextVersion( project, projectId, 
releaseDescriptor, result );
+                String nextVersion = resolveNextVersion( model, projectId, 
releaseDescriptor, result );
 
                 if ( !convertToSnapshot )
                 {
@@ -191,7 +193,7 @@ public class MapVersionsPhase
         return result;
     }
 
-    private String resolveNextVersion( MavenProject project,
+    private String resolveNextVersion( Model model,
                                    String projectId,
                                    ReleaseDescriptor releaseDescriptor,
                                    ReleaseResult result )
@@ -202,10 +204,10 @@ public class MapVersionsPhase
         {
             // no branch modification
             if ( !( releaseDescriptor.isUpdateBranchVersions()
-                            && ( ArtifactUtils.isSnapshot( 
project.getVersion() )
+                            && ( ArtifactUtils.isSnapshot( model.getVersion() )
                                             || 
releaseDescriptor.isUpdateVersionsToSnapshot() ) ) )
             {
-                return project.getVersion();
+                return model.getVersion();
             }
 
             defaultVersion = getReleaseVersion( projectId, releaseDescriptor );
@@ -217,10 +219,10 @@ public class MapVersionsPhase
         else if ( releaseDescriptor.isBranchCreation() )
         {
             // no working copy modification
-            if ( !( ArtifactUtils.isSnapshot( project.getVersion() )
+            if ( !( ArtifactUtils.isSnapshot( model.getVersion() )
                           && releaseDescriptor.isUpdateWorkingCopyVersions() ) 
)
             {
-                return project.getVersion();
+                return model.getVersion();
             }
 
             defaultVersion = getDevelopmentVersion( projectId, 
releaseDescriptor );
@@ -230,7 +232,7 @@ public class MapVersionsPhase
             // no working copy modification
             if ( !( releaseDescriptor.isUpdateWorkingCopyVersions() ) )
             {
-                return project.getVersion();
+                return model.getVersion();
             }
 
             defaultVersion = getDevelopmentVersion( projectId, 
releaseDescriptor );
@@ -254,7 +256,7 @@ public class MapVersionsPhase
                     // unspecified and unmapped version, so use project version
                     if ( baseVersion == null )
                     {
-                        baseVersion = project.getVersion();
+                        baseVersion = model.getVersion();
                     }
 
                     try
@@ -290,11 +292,15 @@ public class MapVersionsPhase
                     {
                         messageKey = getMapversionPromptKey( releaseDescriptor 
);
                     }
-                    String message =
-                        MessageFormat.format( resourceBundle.getString( 
messageKey ), project.getName(), projectId );
+                    
+                    // As defined in MavenProject.getName();
+                    String name = Objects.toString( model.getName(), 
model.getArtifactId() );
+                    
+                    String message = MessageFormat.format( 
resourceBundle.getString( messageKey ), name, projectId );
+                    
                     nextVersion = prompter.prompt( message, suggestedVersion );
 
-                  //@todo validate next version, maybe with 
DefaultArtifactVersion
+                    //@todo validate next version, maybe with 
DefaultArtifactVersion
                 }
                 else if ( defaultVersion == null )
                 {
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhase.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhase.java
index 9801c12..e694880 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhase.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhase.java
@@ -45,11 +45,11 @@ public class RunPerformGoalsPhase
                                   List<MavenProject> reactorProjects )
         throws ReleaseExecutionException
     {
-        return runLogic( releaseDescriptor, releaseEnvironment, 
reactorProjects, false );
+        return runLogic( releaseDescriptor, releaseEnvironment, false );
     }
 
     private ReleaseResult runLogic( ReleaseDescriptor releaseDescriptor, 
ReleaseEnvironment releaseEnvironment,
-                                  List<MavenProject> reactorProjects, boolean 
simulate )
+                                  boolean simulate )
         throws ReleaseExecutionException
     {
         String additionalArguments = 
releaseDescriptor.getAdditionalArguments();
@@ -142,7 +142,7 @@ public class RunPerformGoalsPhase
                                    List<MavenProject> reactorProjects )
         throws ReleaseExecutionException
     {
-        return runLogic( releaseDescriptor, releaseEnvironment, 
reactorProjects, true );
+        return runLogic( releaseDescriptor, releaseEnvironment, true );
     }
 
     @Override
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java
index 218a529..a660333 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java
@@ -68,7 +68,7 @@ public class ScmBranchPhase
         validateConfiguration( releaseDescriptor );
 
         ReleaseDescriptor basedirAlignedReleaseDescriptor =
-            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor, reactorProjects );
+            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor );
 
         logInfo( relResult, "Branching release with the label " + 
basedirAlignedReleaseDescriptor.getScmReleaseLabel()
             + "..." );
@@ -133,7 +133,7 @@ public class ScmBranchPhase
 
         validateConfiguration( releaseDescriptor );
         ReleaseDescriptor basedirAlignedReleaseDescriptor =
-            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor, reactorProjects );
+            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor );
 
         logInfo( result, "Full run would be branching " + 
basedirAlignedReleaseDescriptor.getWorkingDirectory() );
         if ( releaseDescriptor.getScmBranchBase() != null )
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmTagPhase.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmTagPhase.java
index 8a62f55..b406c5e 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmTagPhase.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmTagPhase.java
@@ -84,7 +84,7 @@ public class ScmTagPhase
         logInfo( relResult, "Tagging release with the label " + 
releaseDescriptor.getScmReleaseLabel() + "..." );
 
         ReleaseDescriptor basedirAlignedReleaseDescriptor =
-            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor, reactorProjects );
+            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor );
 
         ScmRepository repository;
         ScmProvider provider;
@@ -153,7 +153,7 @@ public class ScmTagPhase
         validateConfiguration( releaseDescriptor );
 
         ReleaseDescriptor basedirAlignedReleaseDescriptor =
-            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor, reactorProjects );
+            ReleaseUtil.createBasedirAlignedReleaseDescriptor( 
releaseDescriptor );
 
         if ( releaseDescriptor.isRemoteTagging() )
         {
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/ModelETLRequest.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/ModelETLRequest.java
index 22ec8b6..c9ce306 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/ModelETLRequest.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/ModelETLRequest.java
@@ -19,7 +19,6 @@ package org.apache.maven.shared.release.transform;
  * under the License.
  */
 
-import org.apache.maven.project.MavenProject;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
 
 /**
@@ -31,7 +30,7 @@ public class ModelETLRequest
 {
     private String lineSeparator;
 
-    private MavenProject project;
+    private String modelVersion;
 
     private ReleaseDescriptor releaseDescriptor;
 
@@ -45,14 +44,14 @@ public class ModelETLRequest
         this.lineSeparator = lineSeparator;
     }
 
-    public MavenProject getProject()
+    public String getModelVersion()
     {
-        return project;
+        return modelVersion;
     }
-
-    public void setProject( MavenProject project )
+    
+    public void setModelVersion( String modelVersion )
     {
-        this.project = project;
+        this.modelVersion = modelVersion;
     }
 
     public ReleaseDescriptor getReleaseDescriptor()
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETL.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETL.java
index 9aef4cf..64ee205 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETL.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETL.java
@@ -29,7 +29,6 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.maven.model.Model;
-import org.apache.maven.project.MavenProject;
 import org.apache.maven.shared.release.ReleaseExecutionException;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
 import org.apache.maven.shared.release.transform.ModelETL;
@@ -57,7 +56,7 @@ public class JDomModelETL implements ModelETL
 {
     private ReleaseDescriptor releaseDescriptor;
 
-    private MavenProject project;
+    private String modelVersion;
 
     private Document document;
 
@@ -76,11 +75,11 @@ public class JDomModelETL implements ModelETL
         this.releaseDescriptor = releaseDescriptor;
     }
 
-    public void setProject( MavenProject project )
+    public void setModelVersion( String modelVersion )
     {
-        this.project = project;
+        this.modelVersion = modelVersion;
     }
-
+    
     @Override
     public void extract( File pomFile ) throws ReleaseExecutionException
     {
@@ -156,7 +155,7 @@ public class JDomModelETL implements ModelETL
     @Override
     public void load( File targetFile ) throws ReleaseExecutionException
     {
-        writePom( targetFile, document, releaseDescriptor, 
project.getModelVersion(), intro, outtro );
+        writePom( targetFile, document, releaseDescriptor, modelVersion, 
intro, outtro );
     }
 
     @Override
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETLFactory.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETLFactory.java
index 88078e0..33d40ac 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETLFactory.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom/JDomModelETLFactory.java
@@ -38,7 +38,7 @@ public class JDomModelETLFactory implements ModelETLFactory
         JDomModelETL result = new JDomModelETL();
 
         result.setLs( request.getLineSeparator() );
-        result.setProject( request.getProject() );
+        result.setModelVersion( request.getModelVersion() );
         result.setReleaseDescriptor( request.getReleaseDescriptor() );
 
         return result;
diff --git 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/ReleaseUtil.java
 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/ReleaseUtil.java
index 7b64f20..beeab5c 100644
--- 
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/ReleaseUtil.java
+++ 
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/ReleaseUtil.java
@@ -163,8 +163,7 @@ public class ReleaseUtil
         return norm;
     }
 
-    public static ReleaseDescriptor createBasedirAlignedReleaseDescriptor( 
ReleaseDescriptor releaseDescriptor,
-                                                                           
List<MavenProject> reactorProjects )
+    public static ReleaseDescriptor createBasedirAlignedReleaseDescriptor( 
ReleaseDescriptor releaseDescriptor )
         throws ReleaseExecutionException
     {
         int parentLevels = Paths.get( releaseDescriptor.getPomFileName() 
).getNameCount() - 1;

-- 
To stop receiving notification emails like this one, please contact
rfscho...@apache.org.

Reply via email to