Skip to content

git.build.time has wrong time when using maven 4 #874

@RalfNaujokat

Description

@RalfNaujokat

Describe the bug (required)

This is from my build log:

[INFO] --- git-commit-id:9.0.2:revision (revision) @ java-test ---
[INFO] Collected git.branch with value main
[INFO] Collected git.commit.id.abbrev with value ef3a35e
[INFO] Collected git.commit.time with value 2025-09-03T17:52:51+02:00[Europe/Berlin]
[INFO] Collected git.build.time with value 1980-02-01T01:00:00+01:00[Europe/Berlin]
[INFO] Collected git.build.version with value 25.9.0-SNAPSHOT

Tell us about your plugin configuration (required)

							<executions>
								<execution>
									<id>revision</id>
									<phase>generate-resources</phase>
									<goals>
										<goal>revision</goal>
									</goals>
								</execution>
							</executions>
							<configuration>
								<verbose>true</verbose>
								<generateGitPropertiesFile>true</generateGitPropertiesFile>
								<generateGitPropertiesFilename>${project.build.outputDirectory}/${project.groupId}.${project.artifactId}.git.properties</generateGitPropertiesFilename>
								<includeOnlyProperties>
									<includeOnlyProperty>^git.branch$</includeOnlyProperty>
									<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
									<includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
									<includeOnlyProperty>^git.build.version$</includeOnlyProperty>
									<includeOnlyProperty>^git.build.time$</includeOnlyProperty>
								</includeOnlyProperties>
								<commitIdGenerationMode>full</commitIdGenerationMode>
								<dateFormat>${timestamp.17.format}</dateFormat>
							</configuration>

Tell us about the Plugin version used (required)

9.0.2

Tell us about the Maven version used (required)

maven 4.0.0-rc-4

Steps to Reproduce (required)

I run the plugin with ``mvn clean install`...

Are there any stacktraces or any error messages? (required)

No stacktraces, just the wrong timestamp

Is there a (public) project where this issue can be reproduced? (optional)

No response

Your Environment (optional)

No response

Context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions