@Override
    public void execute() throws MojoExecutionException {
        ReportGenerator.Format parsedFormat = ReportGenerator.Format.fromStringOrNull(format);
        selectOutputDirectory(parsedFormat);
        try {
            if (!outputDirectory.exists() && !outputDirectory.mkdirs()) {
                throw new MojoExecutionException("Error while trying to create output directory " + outputDirectory);
            }
            getLog().info(JGIVEN + parsedFormat + " report source directory: " + sourceDirectory);
            getLog().info(JGIVEN + parsedFormat + " report output directory: " + outputDirectory);
            if (customCssFile != null && customCssFile.exists()) {
                getLog().info(JGIVEN + parsedFormat + " report custom CSS file: " + customCssFile);
            }
            if (customJsFile != null && customJsFile.exists()) {
                getLog().info(JGIVEN + parsedFormat + " report custom JS file: " + customJsFile);
            }
            getLog().info("Generating " + parsedFormat + " reports to " + outputDirectory + "...");

            AbstractReportConfig config;
            AbstractReportGenerator generator;

            switch (parsedFormat) {
                case ASCIIDOC:
                    config = new AsciiDocReportConfig();
                    generator = new AsciiDocReportGenerator();
                    break;
                case TEXT:
                    config = new PlainTextReportConfig();
                    generator = new PlainTextReportGenerator();
                    break;
                case HTML:
                case HTML5:
                default:
                    Html5ReportConfig customConf = new Html5ReportConfig();
                    customConf.setShowThumbnails(thumbnailsAreShown);
                    customConf.setCustomCss(customCssFile);
                    customConf.setCustomJs(customJsFile);
                    config = customConf;
                    generator = ReportGenerator.generateHtml5Report();
                    break;
            }
            config.setTitle(title);
            config.setSourceDir(sourceDirectory);
            config.setTargetDir(outputDirectory);
            config.setExcludeEmptyScenarios(excludeEmptyScenarios);
            generator.generateWithConfig(config);
            getLog().info("-------------------------------------------------------------------");
            getLog().info("Generated JGiven " + parsedFormat + " reports to directory " + outputDirectory);
            getLog().info("-------------------------------------------------------------------");
        } catch (Exception e) {
            throw new MojoExecutionException("Error while trying to generate " + parsedFormat + " reports", e);
        }
    }
Whether to show thumbnails for image attachments, otherwise a clip-icon is shown
jgiven-maven-plugin/src/main/java/com/tngtech/jgiven/maven/JGivenReportMojo.java