sormuras / junit-platform-maven-plugin

Maven Plugin launching the JUnit Platform
Apache License 2.0
61 stars 15 forks source link

Quiet configuration #112

Open delanym opened 11 months ago

delanym commented 11 months ago

Is there a parameter to control this output?

image

sormuras commented 10 months ago

Do you mean to suppress the entire output - or just the WARNING: ...?

delanym commented 10 months ago

So we've got a banner, a warning, a summary, and test results.

Ideally I want control over each of these individually AND collectively.

sormuras commented 10 months ago

Except for the warning, you have control over the output using the details tweak. If that's not enough, try setting additionalLauncherOptions (for the Java Executor) or have full control over the launcher using the overrideLauncherOptions.

The warning is due to a missing execute in the command line for the launcher and needs a fix in the plugin.

delanym commented 10 months ago

What details tweak? https://github.com/sormuras/junit-platform-maven-plugin/#plugin-configuration-tweaks Perhaps you could include a Maven site to produced standardized documentation like https://maven.apache.org/surefire/maven-surefire-plugin/

sormuras commented 10 months ago

What details tweak?

https://github.com/sormuras/junit-platform-maven-plugin/blob/e5dc3527002fc5c14b87a890d716ced08b92d09a/src/main/java/de/sormuras/junit/platform/maven/plugin/Tweaks.java#L32-L33

delanym commented 10 months ago

Ok thanks. Banner, results, summary gone. I tried hiding the warning with https://www.slf4j.org/legacy.html#jul-to-slf4jBridge

          <dependencies>
            <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>jul-to-slf4j</artifactId>
              <version>2.0.9</version>
            </dependency>
          </dependencies>

but admittedly I'm just guessing

sormuras commented 10 months ago

Yeah. Tuning the logger used by JUnit to only emit errors is way to mute the warning.

An actual fix just landed in this plugin's code via https://github.com/sormuras/junit-platform-maven-plugin/commit/b9bbccb72ac0e1b072884d5ec7ffcbb27305262d here:

https://github.com/sormuras/junit-platform-maven-plugin/blob/b9bbccb72ac0e1b072884d5ec7ffcbb27305262d/src/main/java/de/sormuras/junit/platform/maven/plugin/JavaExecutor.java#L210

delanym commented 9 months ago

What do you wait for to release?