You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/08/09 21:12:19 UTC
(maven-rar-plugin) branch master updated: Replace PlexusTestCase.getBasedir() with the plexus-testing shim
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-rar-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 7c21c0b Replace PlexusTestCase.getBasedir() with the plexus-testing shim
7c21c0b is described below
commit 7c21c0b0ae2c95c6823114db430352443919f2e0
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sun Aug 9 22:47:38 2026 +0200
Replace PlexusTestCase.getBasedir() with the plexus-testing shim
RarMavenProjectStub only used PlexusTestCase for its static
getBasedir() helper. Swap it for PlexusExtension.getBasedir() from
org.codehaus.plexus:plexus-testing, and add junit-jupiter-api plus
junit-vintage-engine test dependencies so the class compiles and the
existing JUnit 3-style AbstractMojoTestCase-based test keeps running
under the vintage engine.
RarMojoTest itself still extends AbstractMojoTestCase, which extends
PlexusTestCase transitively via maven-plugin-testing-harness; that
dependency is out of this plugin's control.
Generated-by: Claude Opus 5 (1M context)
---
pom.xml | 10 ++++++++++
.../apache/maven/plugins/rar/stubs/RarMavenProjectStub.java | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5a2eb34..4983d7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -141,6 +141,16 @@ under the License.
<version>4.13.2</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
diff --git a/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java b/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java
index 8eb5b64..87fd44b 100644
--- a/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java
+++ b/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java
@@ -31,7 +31,7 @@ import org.apache.maven.model.Build;
import org.apache.maven.model.Model;
import org.apache.maven.model.Organization;
import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.testing.PlexusExtension;
/**
* @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
@@ -90,7 +90,7 @@ public class RarMavenProjectStub extends MavenProject {
}
public File getBasedir() {
- return new File(PlexusTestCase.getBasedir());
+ return new File(PlexusExtension.getBasedir());
}
public Artifact getArtifact() {