class WebsterMojo extends AbstractMojo {

    @Nullable WebsterPlan.FixtureProvider getFixtureProvider() {
        if (websterOakRunArgs != null && !websterOakRunArgs.trim().isEmpty()) {
            getLog().info("Using webster.oakRunArgsString to configure NodeStore: " +
                    websterOakRunArgs);
            return () -> JcrFactory.getNodeStoreFixture(true,
                    CliArgParser.parse(websterOakRunArgs));
        } else if (websterRepositoryHome != null
                && websterRepositoryHome.isDirectory()) {
            getLog().info("Using webster.repositoryHome to configure NodeStore: " +
                    websterRepositoryHome.getAbsolutePath());
            final File segmentStore = new File(websterRepositoryHome, "segmentstore");
            if (!(new File(segmentStore, "journal.log")).isFile()) {
                getLog().info("segmentstore/journal.log file not found in configured webster.repositoryHome.");
                return null;
            }

            return () -> JcrFactory.getReadOnlyFixture(segmentStore);
        }
        return null;
    }

}