Skip to content

build-info doesn't support seconds since the epoch from project.build.outputTimestamp #42871

@ahoehma

Description

@ahoehma

I'm trying to enable https://maven.apache.org/guides/mini/guide-reproducible-builds.html for my springboot project.

I'm using maven-git-version-extension. And found that springboot can't handle seconds,

Caused by: java.time.format.DateTimeParseException: Text '1729757074' could not be parsed at index 0
    at java.time.format.DateTimeFormatter.parseResolved0 (DateTimeFormatter.java:2052)
    at java.time.format.DateTimeFormatter.parse (DateTimeFormatter.java:1954)
    at java.time.Instant.parse (Instant.java:397)
    at org.springframework.boot.maven.BuildInfoMojo.getBuildTime (BuildInfoMojo.java:157)
    at org.springframework.boot.maven.BuildInfoMojo.getProjectDetails (BuildInfoMojo.java:131)
    at org.springframework.boot.maven.BuildInfoMojo.execute (BuildInfoMojo.java:114)

See for details qoomon/maven-git-versioning-extension#340.

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildInfoMojo.java#L149

A alternative round of parsing for the epoch seconds would be an improvement.

Metadata

Metadata

Assignees

Labels

status: supersededAn issue that has been superseded by anothertype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions