Skip to content

Commit 685cc25

Browse files
committed
fix: Make reproducible
1 parent 3752a98 commit 685cc25

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

httpdlog/httpdlog-parser/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@
155155
<value>${git.commit.id.describe-short}</value>
156156
</replacement>
157157
<replacement>
158-
<token>@maven.build.timestamp@</token>
159-
<value>${maven.build.timestamp}</value>
158+
<token>@project.build.outputTimestamp@</token>
159+
<value>${project.build.outputTimestamp}</value>
160160
</replacement>
161161
<replacement>
162162
<token>@project.version@</token>

httpdlog/httpdlog-parser/src/main/java/nl/basjes/parse/httpdlog/HttpdLoglineParser.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
import org.slf4j.Logger;
3232
import org.slf4j.LoggerFactory;
3333

34-
import static nl.basjes.parse.httpdlog.Version.GIT_COMMIT_ID_DESCRIBE_SHORT;
35-
import static nl.basjes.parse.httpdlog.Version.MAVEN_BUILD_TIMESTAMP;
36-
import static nl.basjes.parse.httpdlog.Version.PROJECT_VERSION;
37-
3834
public class HttpdLoglineParser<RECORD> extends Parser<RECORD> {
3935

4036
private static final Logger LOG = LoggerFactory.getLogger(HttpdLoglineParser.class);
@@ -89,8 +85,8 @@ private static void logLine(String line, int width) {
8985
// --------------------------------------------
9086

9187
public static String getVersion() {
92-
return "LogParser " + PROJECT_VERSION +
93-
" (" + GIT_COMMIT_ID_DESCRIBE_SHORT + " @ " + MAVEN_BUILD_TIMESTAMP + ")";
88+
return "LogParser " + Version.getProjectVersion() +
89+
" (" + Version.getGitCommitIdDescribeShort() + " @ " + Version.getBuildTimestamp() + ")";
9490
}
9591

9692
public HttpdLoglineParser(

httpdlog/httpdlog-parser/src/main/resources/version/Version.java.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ package nl.basjes.parse.httpdlog;
1919
public final class Version {
2020

2121
public static final String GIT_COMMIT_ID_DESCRIBE_SHORT = "@git.commit.id.describe-short@";
22-
public static final String MAVEN_BUILD_TIMESTAMP = "@maven.build.timestamp@";
22+
public static final String PROJECT_BUILD_OUTPUTTIMESTAMP = "@project.build.outputTimestamp@";
2323
public static final String PROJECT_VERSION = "@project.version@";
2424

2525
public static String getGitCommitIdDescribeShort() {
2626
return GIT_COMMIT_ID_DESCRIBE_SHORT;
2727
}
2828

2929
public static String getBuildTimestamp() {
30-
return MAVEN_BUILD_TIMESTAMP;
30+
return PROJECT_BUILD_OUTPUTTIMESTAMP;
3131
}
3232

3333
public static String getProjectVersion() {

0 commit comments

Comments
 (0)