You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2022/07/17 12:28:23 UTC
[axis-axis2-java-core] 08/08: Use project.build.outputTimestamp as release date
This is an automated email from the ASF dual-hosted git repository.
veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit dafcdc937ec014408a760133587a6f21efff58e0
Author: Andreas Veithen <an...@gmail.com>
AuthorDate: Sun Jul 17 12:07:12 2022 +0000
Use project.build.outputTimestamp as release date
This should make building the distributions reproducible. The timestamp
is updated automatically during the release.
---
modules/distribution/pom.xml | 7 ++++---
pom.xml | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 6bf8280c63..2d571fa849 100755
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -377,9 +377,10 @@
<configuration>
<scripts>
<script>
- import java.util.Date
- import java.text.MessageFormat
- project.properties['buildTimestamp'] = MessageFormat.format("{0,date,dd-MM-yyyy}", new Date())
+ import java.time.*
+ import java.time.format.*
+
+ project.properties['buildTimestamp'] = DateTimeFormatter.ofPattern("dd-MM-yyyy").withZone(ZoneId.of("Z")).format(OffsetDateTime.parse(project.properties['project.build.outputTimestamp']).toInstant())
project.properties['release_version'] = project.version.replaceAll("-SNAPSHOT", "")
</script>
</scripts>
diff --git a/pom.xml b/pom.xml
index 42f2417c8d..d6142be95b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1445,9 +1445,10 @@
<configuration>
<scripts>
<script>
- import java.util.Date
- import java.text.MessageFormat
- project.properties['release_date'] = MessageFormat.format("{0,date,MMMMM dd, yyyy}", new Date())
+ import java.time.*
+ import java.time.format.*
+
+ project.properties['release_date'] = DateTimeFormatter.ofPattern("MMMM dd, yyyy").withZone(ZoneId.of("Z")).format(OffsetDateTime.parse(project.properties['project.build.outputTimestamp']).toInstant())
project.properties['release_version'] = project.version.replaceAll("-SNAPSHOT", "")
project.properties['skipSiteSite'] = String.valueOf(!new File(project.basedir, 'src/site/site.xml').exists())
</script>