maven-dependency-plugin/0001-Port-tests-to-maven-model-3.6.X.patch

60 lines
2.5 KiB
Diff
Raw Normal View History

From eba97b2aff5bff0b67e62c1ffd87e02ccf28a7f2 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Tue, 25 Aug 2020 12:12:09 +0200
Subject: [PATCH] Port tests to maven model 3.6.X
---
.../plugins/dependency/analyze/TestAnalyzeDepMgt.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDepMgt.java b/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDepMgt.java
index d3392a2..5e80388 100644
--- a/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDepMgt.java
+++ b/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDepMgt.java
@@ -119,33 +119,42 @@ public class TestAnalyzeDepMgt
// sure it's ok before
// testing the next one
dep.setType( "t" );
+ dep.clearManagementKey();
assertNotEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setType( "type" );
+ dep.clearManagementKey();
assertEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setArtifactId( "a" );
+ dep.clearManagementKey();
assertNotEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setArtifactId( "artifact" );
+ dep.clearManagementKey();
assertEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setClassifier( "c" );
+ dep.clearManagementKey();
assertNotEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setClassifier( "class" );
+ dep.clearManagementKey();
assertEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setGroupId( "g" );
+ dep.clearManagementKey();
assertNotEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setGroupId( "group" );
dep.setClassifier( null );
artifact = stubFactory.createArtifact( "group", "artifact", "1.0", Artifact.SCOPE_COMPILE, "type", null );
+ dep.clearManagementKey();
assertEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
dep.setClassifier( "" );
artifact = stubFactory.createArtifact( "group", "artifact", "1.0", Artifact.SCOPE_COMPILE, "type", "" );
+ dep.clearManagementKey();
assertEquals( dep.getManagementKey(), mojo.getArtifactManagementKey( artifact ) );
}
--
2.35.1