Skip to content
Permalink
Browse files
Better logging and fix one typo.
  • Loading branch information
garydgregory committed May 30, 2018
1 parent 0cae8c6 commit c0c8fb3dfea13a16e11211c7c5d67741dbf07f80
Showing 1 changed file with 7 additions and 3 deletions.
@@ -210,10 +210,11 @@ private void putAttachedArtifactInSha256Map(Artifact artifact) throws MojoExecut
/**
* Writes to ./target/commons-release-plugin/sha1.properties the artifact sha1's.
*
* @throws MojoExecutionException if we cant write the file due to an {@link IOException}.
* @throws MojoExecutionException if we can't write the file due to an {@link IOException}.
*/
private void writeAllArtifactsInSha1PropertiesFile() throws MojoExecutionException {
File propertiesFile = new File(workingDirectory, "sha1.properties");
getLog().info("Writting " + propertiesFile);
try (FileOutputStream fileWriter = new FileOutputStream(propertiesFile)) {
artifactSha1s.store(fileWriter, "Release SHA-1s");
} catch (IOException e) {
@@ -228,6 +229,7 @@ private void writeAllArtifactsInSha1PropertiesFile() throws MojoExecutionExcepti
*/
private void writeAllArtifactsInSha256PropertiesFile() throws MojoExecutionException {
File propertiesFile = new File(workingDirectory, "sha256.properties");
getLog().info("Writting " + propertiesFile);
try (FileOutputStream fileWriter = new FileOutputStream(propertiesFile)) {
artifactSha256s.store(fileWriter, "Release SHA-256s");
} catch (IOException e) {
@@ -244,10 +246,12 @@ private void writeAllArtifactsInSha256PropertiesFile() throws MojoExecutionExcep
*/
private void copyRemovedArtifactsToWorkingDirectory() throws MojoExecutionException {
StringBuffer copiedArtifactAbsolutePath;
getLog().info("Copying detached artifacts to working directory.");
final String wdAbsolutePath = workingDirectory.getAbsolutePath();
getLog().info(
"Copying " + detachedArtifacts.size() + " detached artifacts to working directory " + wdAbsolutePath);
for (Artifact artifact: detachedArtifacts) {
File artifactFile = artifact.getFile();
copiedArtifactAbsolutePath = new StringBuffer(workingDirectory.getAbsolutePath());
copiedArtifactAbsolutePath = new StringBuffer(wdAbsolutePath);
copiedArtifactAbsolutePath.append("/");
copiedArtifactAbsolutePath.append(artifactFile.getName());
File copiedArtifact = new File(copiedArtifactAbsolutePath.toString());

0 comments on commit c0c8fb3

Please sign in to comment.