maven icon indicating copy to clipboard operation
maven copied to clipboard

To help debugging, add the time zone to the Maven banner

Open garydgregory opened this issue 10 months ago • 5 comments

New feature, improvement proposal

The current banner reports, for example:

Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1)
Maven home: /usr/share/apache-maven-3.9.12
Java version: 25.0.1, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/temurin-25-jdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "6.11.0-1018-azure", arch: "amd64", family: "unix"

It would be helpful in debugging builds, especially on remote CIs, to report the time zone, for example:

...
Default locale: en, platform encoding: UTF-8, time zone: America/New_York
...

garydgregory avatar Jan 21 '26 13:01 garydgregory

Hi @garydgregory , I’d like to work on this improvement and submit a PR. Could I work on it?

assokhi avatar Jan 23 '26 10:01 assokhi

Hello @assokhi

I just wrote the feature request. Go for it 😉

garydgregory avatar Jan 23 '26 10:01 garydgregory

Hi @garydgregory and @assokhi,

I'd like to work on this issue if it's still available.

Proposed approach:

  1. Locate the banner output code in MavenCli or invoker classes
  2. Add timezone information using ZoneId.systemDefault()
  3. Update banner format to include: Timezone: America/New_York (UTC-05:00)
  4. Add unit tests for the new output

Can I proceed with this implementation?

chanani avatar Jan 27 '26 04:01 chanani

hi @chanani Hi, thanks for your interest in this issue! I’ve already opened a pull request that addresses it and is currently under review. Feel free to take a look at the PR, and happy to incorporate any suggestions or improvements you might have. https://github.com/apache/maven/pull/11681

assokhi avatar Jan 27 '26 08:01 assokhi

Hi @cstamas Any thoughts on merging the PR?

garydgregory avatar Feb 19 '26 13:02 garydgregory