micronaut-projects / micronaut-maven-plugin

Maven plugin to execute Micronaut applications
https://micronaut-projects.github.io/micronaut-maven-plugin/latest/
Apache License 2.0
20 stars 19 forks source link

micronaut-maven-plugin outputs unnecessary log information regardless of Maven Command Execution #1005

Closed alapierre closed 4 months ago

alapierre commented 5 months ago

I've encountered an issue with the micronaut-maven-plugin where it outputs unnecessary log information, regardless of the Maven command being executed. This behavior persists even when using Maven's quiet mode (-q).

Issue Description: Regardless of the specific Maven command being run, micronaut-maven-plugin always prints an additional log message that seems unnecessary for the operation being performed. Specifically, the log message is:

[info] Cannot find Micronaut Test Resources service settings, server may already be shutd

eg:

mvn help:evaluate -Dexpression=project.version -q -DforceStdout
0.6-SNAPSHOT[info] Cannot find Micronaut Test Resources service settings, server may already be shutdown.

This message appears even for commands that should not initiate or interact with any test resources or server operations, such as mvn help:evaluate -Dexpression=project.version -q -DforceStdout.

Expected Behavior: The expected behavior is that the plugin should either respect Maven's logging levels (including quiet mode) or provide a configuration option to suppress such informational logs that are not relevant to the execution context. Test Resources should be only "called" on test maven goal, not for all goals.

I used

    <parent>
        <groupId>io.micronaut.platform</groupId>
        <artifactId>micronaut-parent</artifactId>
        <version>4.3.2</version>
    </parent>

and I'm sure that issue was not present in previews versions.

alapierre commented 4 months ago

fixed in 4.4.1, thank you.