Skip to content

Service loader for TemplateExtension #7

@kyle-winkelman

Description

@kyle-winkelman

Summary

I was curious why the META-INF/services/com.github.tomakehurst.wiremock.extension.ExtensionFactory file is only added to the shadowJar.

I believe there is benefit in only having the TemplateExtension class rather than having both TemplateExtension and StandaloneTemplateExtension. For example, if we always added the service loader the below code would work regardless of if we are using the normal jar or the standalone jar.

@RegisterExtension
static WireMockExtension wm = WireMockExtension.newInstance()
        .options(wireMockConfig().extensionScanningEnabled(true))
        .build();

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions