Skip to content

Commit 7fb65f7

Browse files
Add migration notes for 3.4.0 (#240)
1 parent 53bcad7 commit 7fb65f7

File tree

1 file changed

+20
-1
lines changed
  • maven-plugin-testing-harness/src/site/markdown

1 file changed

+20
-1
lines changed

maven-plugin-testing-harness/src/site/markdown/index.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,28 @@ date: February 2008
2323

2424
The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojos, i.e. by pre-constructing the [Plexus](http://plexus.codehaus.org) components, providing stub objects for Maven functionality such as projects, and populating fields from an XML file that resembles the plugin configuration in the POM.
2525

26-
2726
The best way to start is to read the cookbook [How to use Maven Plugin Testing Harness](./getting-started/index.html).
2827

28+
### Migration to 3.4.0
29+
30+
Since version `3.4.0`, the Maven Plugin Testing Harness has been migrated to use JUnit 5 as the testing framework.
31+
This change allows for more modern testing practices and improved integration with other tools.
32+
33+
JUnit 5 extension `MojoExtension` and annotation `@MojoTest` have similar functionalities
34+
as in [Maven 4](https://maven.apache.org/ref/4-LATEST/maven-impl-modules/maven-testing/apidocs/index.html)
35+
for easier migration of tests for Maven 4.
36+
37+
Project still supports JUnit 3/4 `AbstractMojoTestCase` and JUnit 4 `MojoRule` tests for backward compatibility
38+
but new tests should be written using JUnit 5.
39+
40+
Therefore, some project dependencies have been set as optional to avoid conflicts with existing JUnit 3/4 and JUnit 5 tests.
41+
42+
Your project should depend on the following artifacts, if needed:
43+
44+
- `org.codehaus.plexus:plexus-archiver` - used by `ArtifactStubFactory`
45+
- `org.apache.maven:maven-compat` - used by `MojoRule`
46+
- `org.junit.jupiter:junit-jupiter-api` - used for JUnit 5 tests
47+
- `junit:junit` - used for JUnit 3/4 tests
2948

3049
### Examples
3150

0 commit comments

Comments
 (0)