Registry / testing / maven-plugin-testing-harness

maven-plugin-testing-harness

JSON →
library3.5.1javamavenunverified

Provides mechanisms to manage and execute tests for Maven plugins (Mojo).

<dependency> <groupId>org.apache.maven.plugin-testing</groupId> <artifactId>maven-plugin-testing-harness</artifactId> <version>3.5.1</version> </dependency>
INSTALL
IMPORT
SIG · MAVEN-PLUGIN-TESTI
M
maven-plugin-testing-harness
testingjavav3.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AbstractMojoTestCase
org.apache.maven.plugin.testing.AbstractMojoTestCase

Tests a Maven plugin Mojo by loading it from a test POM and executing it.

import org.apache.maven.plugin.testing.AbstractMojoTestCase; import java.io.File; public class MyMojoTest extends AbstractMojoTestCase { public void testSomething() throws Exception { File pom = getTestFile("src/test/resources/test-pom.xml"); MyMojo mojo = (MyMojo) lookupMojo("mygoal", pom); mojo.execute(); } }
Debug
Known issues
gotchaRequires Maven 3.x and compatible plugin API
fix
Ensure your Maven version and plugin API dependencies are compatible.
affects: *
Upgrade
Version history
3.5.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
maven-plugin-testing-harness — mvn dependency:get maven-plugin-testing-harness · libregistry