All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cucumber.htmlformatter.Main Maven / Gradle / Ivy

There is a newer version: 21.8.0
Show newest version
package io.cucumber.htmlformatter;

import io.cucumber.messages.Messages;
import io.cucumber.messages.NdjsonToMessageIterable;

import java.io.OutputStreamWriter;

import static java.nio.charset.StandardCharsets.UTF_8;

public class Main {
    public static void main(String[] args) {
        OutputStreamWriter writer = new OutputStreamWriter(System.out, UTF_8);
        NdjsonToMessageIterable envelopes = new NdjsonToMessageIterable(System.in);
        try (MessagesToHtmlWriter htmlWriter = new MessagesToHtmlWriter(writer)) {
            for (Messages.Envelope envelope : envelopes) {
                htmlWriter.write(envelope);
            }
        } catch (Throwable e) {
            // Workaround for https://github.com/mojohaus/exec-maven-plugin/issues/141
            e.printStackTrace();
            System.exit(1);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy