Skip to content

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Oct 8, 2025

Backport

This will backport the following commits from master to maven-4.0.x:

Questions ?

Please refer to the Backport tool documentation

The issue was that LookupInvoker always called setRootLoggerLevel() with
INFO level even when no CLI options were specified, overriding configuration
file settings by setting a system property.

Changes:
- LookupInvoker.prepareLogging(): Only call setRootLoggerLevel() when CLI
  options (-X, -q) are explicitly specified, allowing config file to work
- MavenSimpleConfiguration: Improved switch statement clarity
- Added comprehensive unit tests for both logging configuration and CLI behavior

This ensures that maven.logger.defaultLogLevel=off in configuration files
is properly respected when no CLI logging options are provided, while
maintaining backward compatibility with CLI option overrides.

Fixes apache#11199

(cherry picked from commit 49d7f01)
@gnodet gnodet added bug Something isn't working backport labels Oct 8, 2025
@gnodet gnodet merged commit f3c445e into apache:maven-4.0.x Oct 9, 2025
19 checks passed
@github-actions github-actions bot added this to the 4.0.0 milestone Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant