diff --git a/maven-enforcer-plugin/src/it/projects/always-pass/verify.groovy b/maven-enforcer-plugin/src/it/projects/always-pass/verify.groovy index ee55f39c..5ae92d6e 100644 --- a/maven-enforcer-plugin/src/it/projects/always-pass/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/always-pass/verify.groovy @@ -17,7 +17,7 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass executed' ) +assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass passed' ) \ No newline at end of file diff --git a/maven-enforcer-plugin/src/it/projects/ban-distribution-management/verify.groovy b/maven-enforcer-plugin/src/it/projects/ban-distribution-management/verify.groovy index 99dcdeb1..9e3d918e 100644 --- a/maven-enforcer-plugin/src/it/projects/ban-distribution-management/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/ban-distribution-management/verify.groovy @@ -17,4 +17,4 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.BanDistributionManagement executed' ) +assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.BanDistributionManagement passed' ) diff --git a/maven-enforcer-plugin/src/it/projects/dependency-convergence_transitive_provided/verify.groovy b/maven-enforcer-plugin/src/it/projects/dependency-convergence_transitive_provided/verify.groovy index 23c21909..5461e69b 100644 --- a/maven-enforcer-plugin/src/it/projects/dependency-convergence_transitive_provided/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/dependency-convergence_transitive_provided/verify.groovy @@ -20,7 +20,7 @@ File buildLog = new File(basedir, 'build.log') rulesExecuted = buildLog.readLines() - .findAll {it == '[INFO] Rule 0: org.apache.maven.enforcer.rules.dependency.DependencyConvergence executed'} + .findAll {it == '[INFO] Rule 0: org.apache.maven.enforcer.rules.dependency.DependencyConvergence passed'} // Rule should be executed in each module assert rulesExecuted.size() == 3 \ No newline at end of file diff --git a/maven-enforcer-plugin/src/it/projects/evaluate-beanshell/verify.groovy b/maven-enforcer-plugin/src/it/projects/evaluate-beanshell/verify.groovy index 64c5dc60..491bf209 100644 --- a/maven-enforcer-plugin/src/it/projects/evaluate-beanshell/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/evaluate-beanshell/verify.groovy @@ -18,5 +18,5 @@ */ File buildLog = new File(basedir, 'build.log') -assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.EvaluateBeanshell executed') -assert buildLog.text.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.EvaluateBeanshell executed') +assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.EvaluateBeanshell passed') +assert buildLog.text.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.EvaluateBeanshell passed') diff --git a/maven-enforcer-plugin/src/it/projects/external-rules-always-pass/verify.groovy b/maven-enforcer-plugin/src/it/projects/external-rules-always-pass/verify.groovy index 67f16ae5..04e7641e 100644 --- a/maven-enforcer-plugin/src/it/projects/external-rules-always-pass/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/external-rules-always-pass/verify.groovy @@ -19,5 +19,5 @@ File buildLog = new File(basedir, 'build.log') assert buildLog.text.contains('[INFO] Rule Config Provider org.apache.maven.enforcer.rules.ExternalRules executed') -assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass executed') -assert buildLog.text.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.AlwaysPass executed') +assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass passed') +assert buildLog.text.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.AlwaysPass passed') diff --git a/maven-enforcer-plugin/src/it/projects/non-exeisting-optional-dependency/verify.groovy b/maven-enforcer-plugin/src/it/projects/non-exeisting-optional-dependency/verify.groovy index 4529a4a6..3d9bf552 100644 --- a/maven-enforcer-plugin/src/it/projects/non-exeisting-optional-dependency/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/non-exeisting-optional-dependency/verify.groovy @@ -22,9 +22,9 @@ def buildLog = new File( basedir, 'build.log' ).text assert buildLog.contains( '[WARNING] The POM for org.example:test-not-existing:jar:1.0 is missing, no dependency information available' ) // rule executed -assert buildLog.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass executed' ) -assert buildLog.contains( '[INFO] Rule 1: org.apache.maven.enforcer.rules.dependency.BanTransitiveDependencies executed' ) -assert buildLog.contains( '[INFO] Rule 2: org.apache.maven.enforcer.rules.dependency.BannedDependencies executed' ) -assert buildLog.contains( '[INFO] Rule 3: org.apache.maven.enforcer.rules.dependency.DependencyConvergence executed') -assert buildLog.contains( '[INFO] Rule 4: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps executed') -assert buildLog.contains( '[INFO] Rule 5: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps executed') +assert buildLog.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass passed' ) +assert buildLog.contains( '[INFO] Rule 1: org.apache.maven.enforcer.rules.dependency.BanTransitiveDependencies passed' ) +assert buildLog.contains( '[INFO] Rule 2: org.apache.maven.enforcer.rules.dependency.BannedDependencies passed' ) +assert buildLog.contains( '[INFO] Rule 3: org.apache.maven.enforcer.rules.dependency.DependencyConvergence passed') +assert buildLog.contains( '[INFO] Rule 4: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps passed') +assert buildLog.contains( '[INFO] Rule 5: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-environment-variable/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-environment-variable/verify.groovy index 008b2dea..ac388a3f 100644 --- a/maven-enforcer-plugin/src/it/projects/require-environment-variable/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-environment-variable/verify.groovy @@ -18,4 +18,4 @@ */ File buildLog = new File(basedir, 'build.log') -assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.property.RequireEnvironmentVariable executed') +assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.property.RequireEnvironmentVariable passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-file-checksum/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-file-checksum/verify.groovy index 7fc215d1..034a54b4 100644 --- a/maven-enforcer-plugin/src/it/projects/require-file-checksum/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-file-checksum/verify.groovy @@ -19,8 +19,8 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum executed') -assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum executed') -assert buildLog.contains('[INFO] Rule 2: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum executed') -assert buildLog.contains('[INFO] Rule 3: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum executed') -assert buildLog.contains('[INFO] Rule 4: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum passed') +assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum passed') +assert buildLog.contains('[INFO] Rule 2: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum passed') +assert buildLog.contains('[INFO] Rule 3: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum passed') +assert buildLog.contains('[INFO] Rule 4: org.apache.maven.enforcer.rules.checksum.RequireFileChecksum passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-files-dont-exist/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-files-dont-exist/verify.groovy index 0a223672..4dd75163 100644 --- a/maven-enforcer-plugin/src/it/projects/require-files-dont-exist/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-files-dont-exist/verify.groovy @@ -19,4 +19,4 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesDontExist executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesDontExist passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-files-exist/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-files-exist/verify.groovy index b0b02f1d..cf9a9b55 100644 --- a/maven-enforcer-plugin/src/it/projects/require-files-exist/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-files-exist/verify.groovy @@ -19,4 +19,4 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesExist executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesExist passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-files-size/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-files-size/verify.groovy index e710b4b0..2cb772b8 100644 --- a/maven-enforcer-plugin/src/it/projects/require-files-size/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-files-size/verify.groovy @@ -19,4 +19,4 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesSize executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesSize passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/verify.groovy index 7fdcfe38..7c20803a 100644 --- a/maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/verify.groovy @@ -20,6 +20,6 @@ File buildLog = new File(basedir, 'build.log') rulesExecuted = buildLog.readLines() - .findAll {it == '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireJavaVendor executed'} + .findAll {it == '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireJavaVendor passed'} assert rulesExecuted.size() == 1 \ No newline at end of file diff --git a/maven-enforcer-plugin/src/it/projects/require-java-version/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-java-version/verify.groovy index e029bdb5..2a35d5c8 100644 --- a/maven-enforcer-plugin/src/it/projects/require-java-version/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-java-version/verify.groovy @@ -19,5 +19,5 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion executed') -assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed') +assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-maven-version/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-maven-version/verify.groovy index 9b01abe9..f1a981a0 100644 --- a/maven-enforcer-plugin/src/it/projects/require-maven-version/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-maven-version/verify.groovy @@ -19,5 +19,5 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion executed') -assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed') +assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-no-repositories/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-no-repositories/verify.groovy index 97cb89f4..60e7176f 100644 --- a/maven-enforcer-plugin/src/it/projects/require-no-repositories/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-no-repositories/verify.groovy @@ -17,4 +17,4 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories executed' ) +assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories passed' ) diff --git a/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm/verify.groovy index 97cb89f4..60e7176f 100644 --- a/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm/verify.groovy @@ -17,4 +17,4 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories executed' ) +assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories passed' ) diff --git a/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/verify.groovy index 97cb89f4..60e7176f 100644 --- a/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/verify.groovy @@ -17,4 +17,4 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories executed' ) +assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories passed' ) diff --git a/maven-enforcer-plugin/src/it/projects/require-os/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-os/verify.groovy index d030b542..b53f516c 100644 --- a/maven-enforcer-plugin/src/it/projects/require-os/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-os/verify.groovy @@ -18,4 +18,4 @@ */ File buildLog = new File(basedir, 'build.log') assert buildLog.text.contains('OS Info - Arch') -assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireOS executed') +assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireOS passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-property/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-property/verify.groovy index e8bcceb5..da1e2d61 100644 --- a/maven-enforcer-plugin/src/it/projects/require-property/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-property/verify.groovy @@ -17,4 +17,4 @@ * under the License. */ File buildLog = new File(basedir, 'build.log') -assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.property.RequireProperty executed') +assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.property.RequireProperty passed') diff --git a/maven-enforcer-plugin/src/it/projects/require-textfile-checksum/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-textfile-checksum/verify.groovy index b74bdfe4..340b48e6 100644 --- a/maven-enforcer-plugin/src/it/projects/require-textfile-checksum/verify.groovy +++ b/maven-enforcer-plugin/src/it/projects/require-textfile-checksum/verify.groovy @@ -19,8 +19,8 @@ def buildLog = new File(basedir, 'build.log').text // rule executed -assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum executed') -assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum executed') -assert buildLog.contains('[INFO] Rule 2: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum executed') -assert buildLog.contains('[INFO] Rule 3: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum executed') -assert buildLog.contains('[INFO] Rule 4: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum executed') +assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum passed') +assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum passed') +assert buildLog.contains('[INFO] Rule 2: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum passed') +assert buildLog.contains('[INFO] Rule 3: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum passed') +assert buildLog.contains('[INFO] Rule 4: org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum passed') diff --git a/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java b/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java index fa01727e..2e4c478d 100644 --- a/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java +++ b/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java @@ -328,7 +328,7 @@ private void executeRule(int ruleIndex, EnforcerRuleDesc ruleDesc, EnforcerRuleH if (getLog().isDebugEnabled()) { long workTime = System.currentTimeMillis() - startTime; getLog().debug(String.format( - "Finish Rule %d: %s take %d ms", ruleIndex, getRuleName(ruleDesc), workTime)); + "Finish Rule %d: %s takes %d ms", ruleIndex, getRuleName(ruleDesc), workTime)); } } } @@ -340,7 +340,7 @@ private void executeRuleOld(int ruleIndex, EnforcerRuleDesc ruleDesc, EnforcerRu if (ignoreCache || shouldExecute(rule)) { rule.execute(helper); - getLog().info(String.format("Rule %d: %s executed", ruleIndex, getRuleName(ruleDesc))); + getLog().info(String.format("Rule %d: %s passed", ruleIndex, getRuleName(ruleDesc))); } } @@ -349,7 +349,7 @@ private void executeRuleNew(int ruleIndex, EnforcerRuleDesc ruleDesc) throws Enf AbstractEnforcerRule rule = (AbstractEnforcerRule) ruleDesc.getRule(); if (ignoreCache || !ruleCache.isCached(rule)) { rule.execute(); - getLog().info(String.format("Rule %d: %s executed", ruleIndex, getRuleName(ruleDesc))); + getLog().info(String.format("Rule %d: %s passed", ruleIndex, getRuleName(ruleDesc))); } } diff --git a/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/TestEnforceMojo.java b/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/TestEnforceMojo.java index 2938a681..e51755a7 100644 --- a/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/TestEnforceMojo.java +++ b/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/TestEnforceMojo.java @@ -127,7 +127,7 @@ void breakBuildImmediately() throws Exception { assertTrue(((MockEnforcerRule) rules[0].getRule()).executed, "Expected this rule to be executed."); assertFalse(((MockEnforcerRule) rules[2].getRule()).executed, "Expected this rule to be not executed."); - verify(logSpy).info(Mockito.contains("Rule 0: org.apache.maven.plugins.enforcer.MockEnforcerRule executed")); + verify(logSpy).info(Mockito.contains("Rule 0: org.apache.maven.plugins.enforcer.MockEnforcerRule passed")); } @Test