Skip to content

Commit

Permalink
Polish "Complete support for project.build.outputTimestamp"
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Oct 30, 2024
1 parent 491515e commit 1a3f1a4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.time.Instant;
import java.util.Properties;
import java.util.function.Consumer;

Expand Down Expand Up @@ -85,12 +86,12 @@ void generatedBuildInfoReproducible(MavenBuild mavenBuild) {

@TestTemplate
void generatedBuildInfoReproducibleEpochSeconds(MavenBuild mavenBuild) {
mavenBuild.project("build-info-reproducible-epochseconds")
mavenBuild.project("build-info-reproducible-epoch-seconds")
.execute(buildInfo((buildInfo) -> assertThat(buildInfo).hasBuildGroup("org.springframework.boot.maven.it")
.hasBuildArtifact("build-reproducible-epochseconds")
.hasBuildArtifact("build-reproducible-epoch-seconds")
.hasBuildName("Generate build info with build time from project.build.outputTimestamp")
.hasBuildVersion("0.0.1.BUILD-SNAPSHOT")
.hasBuildTime("1976-01-09T12:00:00Z")));
.hasBuildTime(Instant.ofEpochSecond(1619004153).toString())));
}

@TestTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.boot.maven.it</groupId>
<artifactId>build-reproducible-epochseconds</artifactId>
<artifactId>build-reproducible-epoch-seconds</artifactId>
<version>0.0.1.BUILD-SNAPSHOT</version>
<name>Generate build info with build time from project.build.outputTimestamp</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>@java.version@</maven.compiler.source>
<maven.compiler.target>@java.version@</maven.compiler.target>
<!-- Epoch seconds should be support bey build-info plugin too -->
<project.build.outputTimestamp>190036800</project.build.outputTimestamp>
<project.build.outputTimestamp>1619004153</project.build.outputTimestamp>
</properties>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 1a3f1a4

Please sign in to comment.