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 7c5a04705..f9eba3234 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 @@ -280,7 +280,7 @@ private void transformDocument( MavenProject project, Model modelTarget, Release String projectId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ); - rewriteVersion( modelTarget, releaseDescriptor, projectId, project, parentVersion ); + rewriteVersion( modelTarget, releaseDescriptor, projectId, project ); Build buildTarget = modelTarget.getBuild(); if ( buildTarget != null ) @@ -400,7 +400,7 @@ else if ( buildOutputTimestamp.length() <= 1 ) } private void rewriteVersion( Model modelTarget, ReleaseDescriptor releaseDescriptor, String projectId, - MavenProject project, String parentVersion ) + MavenProject project ) throws ReleaseFailureException { String version = getNextVersion( releaseDescriptor, projectId ); 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 7b6004f89..fc6381487 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 @@ -134,22 +134,20 @@ private void generateReleasePoms( ReleaseDescriptor releaseDescriptor, ReleaseEn { logInfo( result, "Generating release POM for '" + project.getName() + "'..." ); - releasePoms.add( generateReleasePom( project, releaseDescriptor, releaseEnvironment, reactorProjects, - simulate, result ) ); + releasePoms.add( generateReleasePom( project, releaseDescriptor, releaseEnvironment, result ) ); } addReleasePomsToScm( releaseDescriptor, releaseEnvironment, reactorProjects, simulate, result, releasePoms ); } private File generateReleasePom( MavenProject project, ReleaseDescriptor releaseDescriptor, - ReleaseEnvironment releaseEnvironment, List reactorProjects, - boolean simulate, ReleaseResult result ) + ReleaseEnvironment releaseEnvironment, + ReleaseResult result ) throws ReleaseExecutionException, ReleaseFailureException { // create release pom - Model releasePom = createReleaseModel( project, releaseDescriptor, releaseEnvironment, reactorProjects, - result ); + Model releasePom = createReleaseModel( project, releaseDescriptor, releaseEnvironment, result ); // write release pom to file @@ -212,7 +210,7 @@ private void addReleasePomsToScm( ReleaseDescriptor releaseDescriptor, ReleaseEn } private Model createReleaseModel( MavenProject project, ReleaseDescriptor releaseDescriptor, - ReleaseEnvironment releaseEnvironment, List reactorProjects, + ReleaseEnvironment releaseEnvironment, ReleaseResult result ) throws ReleaseFailureException, ReleaseExecutionException { @@ -229,7 +227,7 @@ private Model createReleaseModel( MavenProject project, ReleaseDescriptor releas // update project version String projectVersion = releaseModel.getVersion(); String releaseVersion = - getNextVersion( releaseDescriptor, project.getGroupId(), project.getArtifactId(), projectVersion ); + getNextVersion( releaseDescriptor, project.getGroupId(), project.getArtifactId() ); releaseModel.setVersion( releaseVersion ); String originalFinalName = releaseModel.getBuild().getFinalName(); @@ -416,8 +414,7 @@ public ReleaseResult simulate( ReleaseDescriptor releaseDescriptor, ReleaseEnvir return execute( releaseDescriptor, releaseEnvironment, reactorProjects, true ); } - private String getNextVersion( ReleaseDescriptor releaseDescriptor, String groupId, String artifactId, - String version ) + private String getNextVersion( ReleaseDescriptor releaseDescriptor, String groupId, String artifactId ) throws ReleaseFailureException { // TODO: share with RewritePomsForReleasePhase.rewriteVersion 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 68d2e7ab1..3d405ebc8 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 @@ -116,7 +116,7 @@ public ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnviro String projectId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ); - String nextVersion = resolveNextVersion( project, projectId, releaseDescriptor, result ); + String nextVersion = resolveNextVersion( project, projectId, releaseDescriptor ); if ( !convertToSnapshot ) { @@ -169,7 +169,7 @@ else if ( releaseDescriptor.isBranchCreation() && convertToBranch ) { String projectId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ); - String nextVersion = resolveNextVersion( project, projectId, releaseDescriptor, result ); + String nextVersion = resolveNextVersion( project, projectId, releaseDescriptor ); if ( !convertToSnapshot ) { @@ -193,8 +193,7 @@ else if ( releaseDescriptor.isBranchCreation() && convertToBranch ) private String resolveNextVersion( MavenProject project, String projectId, - ReleaseDescriptor releaseDescriptor, - ReleaseResult result ) + ReleaseDescriptor releaseDescriptor ) throws ReleaseExecutionException { String defaultVersion; 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 7c63a5fdc..2e3a8437b 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 ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnviro List reactorProjects ) throws ReleaseExecutionException { - return runLogic( releaseDescriptor, releaseEnvironment, reactorProjects, false ); + return runLogic( releaseDescriptor, releaseEnvironment, false ); } private ReleaseResult runLogic( ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, - List reactorProjects, boolean simulate ) + boolean simulate ) throws ReleaseExecutionException { String additionalArguments = getAdditionalArguments( releaseDescriptor ); @@ -134,7 +134,7 @@ public ReleaseResult simulate( ReleaseDescriptor releaseDescriptor, ReleaseEnvir List reactorProjects ) throws ReleaseExecutionException { - return runLogic( releaseDescriptor, releaseEnvironment, reactorProjects, true ); + return runLogic( releaseDescriptor, releaseEnvironment, true ); } @Override