Skip to content

Introduce Jupiter Extension - #296

Merged
rfscholte merged 4 commits into
masterfrom
jupiter-extension
Aug 1, 2026
Merged

rfscholte merged 4 commits into
masterfrom
jupiter-extension

Conversation

@rfscholte

Copy link
Copy Markdown
Member

This is Jupiter Extension variant of the mrm-maven-plugin and should support the same set of features.

Maven Integration Tests that depend on MRM has to use the Maven lifecycle:

  • pre-integration-test : start the MRM server
  • integration-test: run the integration tests
  • post-integration-test: shut down the MRM server
  • verify: verify the results of the integration tests.

Running a single integration test was a challenge.

By introducing this Jupiter Extension the test uses the JUnit Jupiter Lifecycle, making it much easier to run mrm dependend tests.
With this introduction the extension is buildtool UNAWARE.
This means it has no idea where the local repository is located (as defined in settings.xml or its default)
It is also not aware where the default remote repository is located (i,e. Central as defined in the superpom from Maven)

A test could look like this:

@MockRepositoryManager(
	localRepos = @LocalRepo(
			source = @Directory(
					value = ".m2/repositories", 
					baseBathResolver = UserHomePathResolver.class)), 
	remoteRepositories = @RemoteRepositories(
			cacheDirectory = @Directory(
					value = ".m2/repositories", 
					baseBathResolver = UserHomePathResolver.class), 
			repositories = @RemoteRepo(
					id = "central", 
					type = "default", 
					url = "https://repo.maven.apache.org/maven2")))
public class MavenRepositories {

	@Test
	void defaults(MockRepositoryManagerServer server) throws Exception {
		var mainArtifact = server.getUrl("org.codehaus.mojo", "mrm", "1.7.1", "pom");
// asserts
		
		var classifiedArtifact = server.getUrl("org.codehaus.mojo", "mrm", "1.7.1", "zip", "source-release");
// asserts
	}
}    

@rfscholte
rfscholte merged commit e0db83a into master Aug 1, 2026
23 checks passed
@rfscholte
rfscholte deleted the jupiter-extension branch August 1, 2026 07:41
@slachiewicz slachiewicz added the enhancement New feature or request label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants