From commits-return-61585-archive-asf-public=cust-asf.ponee.io@commons.apache.org Wed Feb 21 15:09:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8DD4918061A for ; Wed, 21 Feb 2018 15:09:09 +0100 (CET) Received: (qmail 7172 invoked by uid 500); 21 Feb 2018 14:09:08 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 7163 invoked by uid 99); 21 Feb 2018 14:09:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2018 14:09:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 689B6DFAF5; Wed, 21 Feb 2018 14:09:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chtompki@apache.org To: commits@commons.apache.org Message-Id: <575d009e10504114bba0dfb808a8c35c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: commons-release-plugin git commit: COMMONSSITE-98: setting up for multimodule builds Date: Wed, 21 Feb 2018 14:09:08 +0000 (UTC) Repository: commons-release-plugin Updated Branches: refs/heads/master a661fe800 -> 701579fd3 COMMONSSITE-98: setting up for multimodule builds Project: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/commit/701579fd Tree: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/tree/701579fd Diff: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/diff/701579fd Branch: refs/heads/master Commit: 701579fd3d04bca40ff446ee12f2198f2dff75b8 Parents: a661fe8 Author: Rob Tompkins Authored: Wed Feb 21 09:05:04 2018 -0500 Committer: Rob Tompkins Committed: Wed Feb 21 09:05:04 2018 -0500 ---------------------------------------------------------------------- src/changes/changes.xml | 1 + .../plugin/mojos/CommonsDistributionStagingMojo.java | 13 +++++++++---- .../mojos/stage-distributions/stage-distributions.xml | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/701579fd/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 3d26f69..6d23369 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -26,6 +26,7 @@ + Making the project more multi-module compatible Commons Release Plugin doesn't work with Commons Release Plugin Make -Dcommons.release.dryRun=true our commit toggle http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/701579fd/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java index 8e982ac..031b541 100644 --- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java +++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java @@ -84,6 +84,12 @@ public class CommonsDistributionStagingMojo extends AbstractMojo { private File distCheckoutDirectory; /** + * The location of the RELEASE-NOTES.txt file such that multimodule builds can configure it. + */ + @Parameter(defaultValue = "${basedir}/RELEASE-NOTES.txt", alias = "releaseNotesLocation") + private File releaseNotesFile; + + /** * A boolean that determines whether or not we actually commit the files up to the subversion repository. * If this is set to true, we do all but make the commits. We do checkout the repository in question * though. @@ -178,12 +184,11 @@ public class CommonsDistributionStagingMojo extends AbstractMojo { private void copyReleaseNotesToWorkingDirectory() throws MojoExecutionException { StringBuffer copiedReleaseNotesAbsolutePath; getLog().info("Copying RELEASE-NOTES.txt to working directory."); - File releaseNotes = new File(basedir + "/RELEASE-NOTES.txt"); copiedReleaseNotesAbsolutePath = new StringBuffer(workingDirectory.getAbsolutePath()); copiedReleaseNotesAbsolutePath.append("/scm/"); - copiedReleaseNotesAbsolutePath.append(releaseNotes.getName()); + copiedReleaseNotesAbsolutePath.append(releaseNotesFile.getName()); File copiedReleaseNotes = new File(copiedReleaseNotesAbsolutePath.toString()); - SharedFunctions.copyFile(getLog(), releaseNotes, copiedReleaseNotes); + SharedFunctions.copyFile(getLog(), releaseNotesFile, copiedReleaseNotes); } /** @@ -233,7 +238,7 @@ public class CommonsDistributionStagingMojo extends AbstractMojo { filesForMavenScmFileSet.add(copy); } } - filesForMavenScmFileSet.add(new File(distCheckoutDirectory + "/RELEASE-NOTES.txt")); + filesForMavenScmFileSet.add(releaseNotesFile); return filesForMavenScmFileSet; } http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/701579fd/src/test/resources/mojos/stage-distributions/stage-distributions.xml ---------------------------------------------------------------------- diff --git a/src/test/resources/mojos/stage-distributions/stage-distributions.xml b/src/test/resources/mojos/stage-distributions/stage-distributions.xml index 17a0bb3..75e038b 100644 --- a/src/test/resources/mojos/stage-distributions/stage-distributions.xml +++ b/src/test/resources/mojos/stage-distributions/stage-distributions.xml @@ -45,6 +45,7 @@ target/testing-commons-release-plugin target/testing-commons-release-plugin/scm + src/test/resources/mojos/stage-distributions/RELEASE-NOTES.txt scm:svn:https://dist.apache.org/repos/dist/dev/commons/release-plugin true