From cc6201144a9cb708a60ec4323dfc4d38d36ae8d6 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Thu, 30 Jun 2022 21:46:39 +0200 Subject: [PATCH] Get rid maven-plugin-testing-harness from dependency It only one class was used from this project. This dependency takes much old stuff like maven 2 --- pom.xml | 6 ------ .../ReflectionValueExtractorTest.java | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index c8ed858b..df60e8f0 100644 --- a/pom.xml +++ b/pom.xml @@ -55,12 +55,6 @@ limitations under the License. - - org.apache.maven.shared - maven-plugin-testing-harness - 1.1 - test - org.openjdk.jmh jmh-core diff --git a/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java b/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java index c6f23e2a..44533bfa 100644 --- a/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java +++ b/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java @@ -27,7 +27,6 @@ import java.util.List; import java.util.Map; -import org.apache.maven.plugin.testing.stubs.MavenProjectStub; import org.junit.Before; import org.junit.Test; @@ -462,6 +461,7 @@ public static class Project private String version; private Map artifactMap = new HashMap(); + private String description; public void setModelVersion( String modelVersion ) { @@ -569,6 +569,16 @@ public Map getArtifactMap() { return artifactMap; } + + public void setDescription( String description ) + { + this.description = description; + } + + public String getDescription() + { + return description; + } } public static class Build @@ -630,7 +640,7 @@ public Object getValue() public void testRootPropertyRegression() throws Exception { - MavenProjectStub project = new MavenProjectStub(); + Project project = new Project(); project.setDescription( "c:\\\\org\\apache\\test" ); Object evalued = ReflectionValueExtractor.evaluate( "description", project ); assertNotNull( evalued );