From 6456a2191dba28ad919fd3dc4f7beae44d8313a5 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 3 Feb 2021 12:16:59 +0000 Subject: [PATCH 1/2] checking test code is disabled by default fixes #142 --- .../mojo/animal_sniffer/enforcer/CheckSignatureRule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/animal-sniffer-enforcer-rule/src/main/java/org/codehaus/mojo/animal_sniffer/enforcer/CheckSignatureRule.java b/animal-sniffer-enforcer-rule/src/main/java/org/codehaus/mojo/animal_sniffer/enforcer/CheckSignatureRule.java index e148c0a4..3b031b6e 100644 --- a/animal-sniffer-enforcer-rule/src/main/java/org/codehaus/mojo/animal_sniffer/enforcer/CheckSignatureRule.java +++ b/animal-sniffer-enforcer-rule/src/main/java/org/codehaus/mojo/animal_sniffer/enforcer/CheckSignatureRule.java @@ -134,10 +134,10 @@ public class CheckSignatureRule /** * Should test classes be checked. * - * //parameter default-value="true" + * //parameter default-value="false" * @since 1.19 */ - private boolean checkTestClasses = true; + private boolean checkTestClasses = false; public void execute( EnforcerRuleHelper helper ) throws EnforcerRuleException From fa48d535a3b72ed02f1c3ef9254fcfc8c8abccf7 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 3 Feb 2021 12:24:05 +0000 Subject: [PATCH 2/2] fix the mojo and IT --- .../src/it/github-5-test-classes/invoker.properties | 4 ++-- .../mojo/animal_sniffer/maven/CheckSignatureMojo.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/animal-sniffer-maven-plugin/src/it/github-5-test-classes/invoker.properties b/animal-sniffer-maven-plugin/src/it/github-5-test-classes/invoker.properties index 1c2b2875..6055e202 100644 --- a/animal-sniffer-maven-plugin/src/it/github-5-test-classes/invoker.properties +++ b/animal-sniffer-maven-plugin/src/it/github-5-test-classes/invoker.properties @@ -21,7 +21,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # -invoker.goals.1=verify -Danimal.sniffer.checkTestClasses=false +invoker.goals.1=verify -invoker.goals.2=verify +invoker.goals.2=verify -Danimal.sniffer.checkTestClasses=true invoker.buildResult.2=failure \ No newline at end of file diff --git a/animal-sniffer-maven-plugin/src/main/java/org/codehaus/mojo/animal_sniffer/maven/CheckSignatureMojo.java b/animal-sniffer-maven-plugin/src/main/java/org/codehaus/mojo/animal_sniffer/maven/CheckSignatureMojo.java index 15b665fc..47661b0b 100644 --- a/animal-sniffer-maven-plugin/src/main/java/org/codehaus/mojo/animal_sniffer/maven/CheckSignatureMojo.java +++ b/animal-sniffer-maven-plugin/src/main/java/org/codehaus/mojo/animal_sniffer/maven/CheckSignatureMojo.java @@ -86,7 +86,7 @@ public class CheckSignatureMojo * * @since 1.19 */ - @Parameter( property = "animal.sniffer.checkTestClasses", defaultValue = "true" ) + @Parameter( property = "animal.sniffer.checkTestClasses", defaultValue = "false" ) protected boolean checkTestClasses; /**