From 1900a67fb694c655542350cba444fef85aa2121e Mon Sep 17 00:00:00 2001 From: Rob Tompkins Date: Wed, 13 Jun 2018 12:47:19 -0400 Subject: [PATCH] (fix) checkstyle and StagingMojoTest --- .../CommonsDistributionStagingMojoTest.java | 40 +-- .../DistributionDetachmentProjectStub.java | 284 +++++++++--------- 2 files changed, 162 insertions(+), 162 deletions(-) diff --git a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java index 9b40cc75f..e5d473462 100755 --- a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java +++ b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java @@ -96,28 +96,28 @@ private void assertRequisiteFilesExist() { File headerHtml = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/HEADER.html"); File binariesReadmeHtml = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/README.html"); File binariesHeaderHtml = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/HEADER.html"); - File binTar = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedTar-bin.tar.gz"); - File binTarASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedTar-bin.tar.gz.asc"); - File binTarMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedTar-bin.tar.gz.md5"); - File binTarSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedTar-bin.tar.gz.sha1"); - File binTarSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedTar-bin.tar.gz.sha256"); - File binZip = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedZip-bin.zip"); - File binZipASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedZip-bin.zip.asc"); - File binZipMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedZip-bin.zip.md5"); - File binZipSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedZip-bin.zip.sha1"); - File binZipSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/mockAttachedZip-bin.zip.sha256"); + File binTar = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.tar.gz"); + File binTarASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.tar.gz.asc"); + File binTarMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.tar.gz.md5"); + File binTarSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.tar.gz.sha1"); + File binTarSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.tar.gz.sha256"); + File binZip = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.zip"); + File binZipASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.zip.asc"); + File binZipMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.zip.md5"); + File binZipSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.zip.sha1"); + File binZipSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/commons-text-1.4-bin.zip.sha256"); File sourcesReadmeHtml = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/README.html"); File sourceHeaderHtml = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/binaries/HEADER.html"); - File srcTar = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedTar-src.tar.gz"); - File srcTarASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedTar-src.tar.gz.asc"); - File srcTarMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedTar-src.tar.gz.md5"); - File srcTarSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedTar-src.tar.gz.sha1"); - File srcTarSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedTar-src.tar.gz.sha256"); - File srcZip = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedZip-src.zip"); - File srcZipASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedZip-src.zip.asc"); - File srcZipMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedZip-src.zip.md5"); - File srcZipSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedZip-src.zip.sha1"); - File srcZipSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/mockAttachedZip-src.zip.sha256"); + File srcTar = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.tar.gz"); + File srcTarASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.tar.gz.asc"); + File srcTarMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.tar.gz.md5"); + File srcTarSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.tar.gz.sha1"); + File srcTarSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.tar.gz.sha256"); + File srcZip = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.zip"); + File srcZipASC = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.zip.asc"); + File srcZipMD5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.zip.md5"); + File srcZipSHA1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.zip.sha1"); + File srcZipSHA256 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/source/commons-text-1.4-src.zip.sha256"); File site = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/site"); File siteIndexHtml = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/site/index.html"); File siteSubdirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm/1.0-SNAPSHOT-RC1/site/subdirectory"); diff --git a/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java b/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java index 9201fbc8a..d392915ec 100755 --- a/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java +++ b/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java @@ -59,148 +59,148 @@ public String getUrl() { public List getAttachedArtifacts() { attachedArtifacts = new ArrayList<>(); attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.tar.gz"), - "tar.gz", - "commons-text", - "bin", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.tar.gz.asc"), - "tar.gz.asc", - "commons-text", - "bin", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.zip"), - "zip", - "commons-text", - "bin", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.zip.asc"), - "zip.asc", - "commons-text", - "bin", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.tar.gz"), - "tar.gz", - "commons-text", - "src", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.tar.gz.asc"), - "tar.gz.asc", - "commons-text", - "src", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.zip"), - "zip", - "commons-text", - "src", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.zip.asc"), - "zip.asc", - "commons-text", - "src", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.jar"), - "jar", - "commons-text", - "jar", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.jar.asc"), - "jar.asc", - "commons-text", - "jar", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.pom"), - "pom", - "commons-text", - "pom", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.pom.asc"), - "pom.asc", - "commons-text", - "pom", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-javadoc.jar"), - "jar", - "commons-text", - "javadoc", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-javadoc.jar.asc"), - "jar.asc", - "commons-text", - "javadoc", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-sources.jar"), - "jar", - "commons-text", - "sources", - "1.4" - ) - ); - attachedArtifacts.add( - new DistributionDetachmentArtifactStub( - new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-sources.jar.asc"), - "jar.asc", - "commons-text", - "sources", - "1.4" - ) + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.tar.gz"), + "tar.gz", + "commons-text", + "bin", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.tar.gz.asc"), + "tar.gz.asc", + "commons-text", + "bin", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.zip"), + "zip", + "commons-text", + "bin", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-bin.zip.asc"), + "zip.asc", + "commons-text", + "bin", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.tar.gz"), + "tar.gz", + "commons-text", + "src", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.tar.gz.asc"), + "tar.gz.asc", + "commons-text", + "src", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.zip"), + "zip", + "commons-text", + "src", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-src.zip.asc"), + "zip.asc", + "commons-text", + "src", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.jar"), + "jar", + "commons-text", + "jar", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.jar.asc"), + "jar.asc", + "commons-text", + "jar", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.pom"), + "pom", + "commons-text", + "pom", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4.pom.asc"), + "pom.asc", + "commons-text", + "pom", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-javadoc.jar"), + "jar", + "commons-text", + "javadoc", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-javadoc.jar.asc"), + "jar.asc", + "commons-text", + "javadoc", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-sources.jar"), + "jar", + "commons-text", + "sources", + "1.4" + ) + ); + attachedArtifacts.add( + new DistributionDetachmentArtifactStub( + new File("src/test/resources/mojos/detach-distributions/target/commons-text-1.4-sources.jar.asc"), + "jar.asc", + "commons-text", + "sources", + "1.4" + ) ); return attachedArtifacts; }