Skip to content
Permalink
Browse files
COMMONSSITE-98: setting up for multimodule builds
  • Loading branch information
chtompki committed Feb 21, 2018
1 parent d60d88d commit a1cbc9dd987aa1a599a8f7ba0547b30c02a8bdb1
Showing 3 changed files with 11 additions and 4 deletions.
@@ -26,6 +26,7 @@

<body>
<release version="1.1" date="2018-02-15" description="1.1">
<action issue="COMMONSSITE-98" type="add" dev="chtompki">Making the project more multi-module compatible</action>
<action issue="COMMONSSITE-102" type="fix" dev="chtompki">Commons Release Plugin doesn't work with Commons Release Plugin</action>
<action issue="COMMONSSITE-101" type="fix" dev="chtompki">Make -Dcommons.release.dryRun=true our commit toggle</action>
</release>
@@ -83,6 +83,12 @@ public class CommonsDistributionStagingMojo extends AbstractMojo {
@Parameter(defaultValue = "${project.build.directory}/commons-release-plugin/scm", alias = "outputDirectory")
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 <code>true</code>, we do all but make the commits. We do checkout the repository in question
@@ -178,12 +184,11 @@ public void execute() throws MojoExecutionException, MojoFailureException {
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 @@ private List<File> copyDistributionsIntoScmDirectoryStructure() throws MojoExecu
filesForMavenScmFileSet.add(copy);
}
}
filesForMavenScmFileSet.add(new File(distCheckoutDirectory + "/RELEASE-NOTES.txt"));
filesForMavenScmFileSet.add(releaseNotesFile);
return filesForMavenScmFileSet;
}

@@ -45,6 +45,7 @@
<project implementation="org.apache.commons.release.plugin.stubs.DistributionDetachmentProjectStub" />
<workingDirectory>target/testing-commons-release-plugin</workingDirectory>
<distCheckoutDirectory>target/testing-commons-release-plugin/scm</distCheckoutDirectory>
<releaseNotesFile>src/test/resources/mojos/stage-distributions/RELEASE-NOTES.txt</releaseNotesFile>
<distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/release-plugin</distSvnStagingUrl>
<dryRun>true</dryRun>
</configuration>

0 comments on commit a1cbc9d

Please sign in to comment.