org.codehaus.plexus:plexus-testing is a JUnit 5 extension for testing JSR-330 components: annotate a
test with @PlexusTest and @Inject fields are populated from a container built for that test. It
exists so other Codehaus Plexus projects can test components without each building a harness. The
public classes are PlexusTest, PlexusExtension and PlexusTestConfiguration. junit-jupiter-api
and org.eclipse.sisu.plexus are compile dependencies; Mockito and javax.inject are test-only, used
by this repository's own tests.
- CI calls the shared
codehaus-plexus/.githubmaven.yml@masterworkflow, which runsmvn verify javadoc:javadocon JDK 8, 21 and 25 and on Linux, Windows and macOS. This repository's.github/workflows/maven.ymlhas no deploy job, so master does not publish snapshots from CI. - Main code must use the Java 8 API (
javaVersion8 from theplexusparent). - Unit tests use JUnit 5, with Mockito through
mockito-junit-jupiter; the code snippets on the site are taken fromsrc/test/javabyMACRO{snippet}, so keep theSTART SNIPPETandEND SNIPPETmarkers inPlexusTestJavaxTest,PlexusTestCustomizeTest,TestJavaxComponentandTestJavaxComponent2. - The JAR sets
Automatic-Module-Name: org.codehaus.plexus.testing; keep that name stable. - Run
mvn spotless:applyon JDK 17 to 21 before pushing; it also formats Markdown, exceptsrc/site/markdown.
A change that users or contributors can notice ships with the documentation it affects, in the same pull request. A refactor with no visible effect needs none.
- Behaviour of
@PlexusTest,PlexusExtensionorPlexusTestConfiguration(container setup, base directory, configuration lookup): their Javadoc, the matching section ofsrc/site/markdown/index.md, and the example inREADME.md. src/site/markdown/index.mdis the only page, listed as Introduction insrc/site/site.xmltogether with the Javadoc; add a menu item there when adding a page.- The Java requirement, or how to build and release:
README.md. - A new convention, build gate or test fixture: this file.