[maven-javadoc-plugin] 01/05: Use SOURCE_DATE_EPOCH to set the current year displayed in the javadoc footer
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Nov 16 00:29:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository maven-javadoc-plugin.
commit 3aa1acac209ebd0f419c52af4510c45c2f1f8c63
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Mon Nov 16 01:01:58 2015 +0100
Use SOURCE_DATE_EPOCH to set the current year displayed in the javadoc footer
---
debian/changelog | 8 ++++++++
debian/patches/reproducible-footer.patch | 26 ++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 35 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 96ae604..c6406e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+maven-javadoc-plugin (2.10.3-2) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Use the SOURCE_DATE_EPOCH variable to set the current year displayed
+ in the javadoc footer generated by the plugin.
+
+ -- Emmanuel Bourg <ebourg at apache.org> Mon, 16 Nov 2015 01:00:40 +0100
+
maven-javadoc-plugin (2.10.3-1) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/reproducible-footer.patch b/debian/patches/reproducible-footer.patch
new file mode 100644
index 0000000..a0e4394
--- /dev/null
+++ b/debian/patches/reproducible-footer.patch
@@ -0,0 +1,26 @@
+Description: Use the SOURCE_DATE_EPOCH variable to set the current year displayed in the javadoc footer
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
++++ b/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
+@@ -2714,6 +2714,20 @@
+ private String getBottomText()
+ {
+ int currentYear = Calendar.getInstance().get( Calendar.YEAR );
++ if ( System.getenv("SOURCE_DATE_EPOCH") != null )
++ {
++ try
++ {
++ Calendar calendar = Calendar.getInstance( java.util.TimeZone.getTimeZone("UTC") );
++ calendar.setTimeInMillis(Long.parseLong( System.getenv("SOURCE_DATE_EPOCH") ) * 1000);
++ currentYear = calendar.get( Calendar.YEAR );
++ }
++ catch (Exception e)
++ {
++ e.printStackTrace();
++ }
++ }
++
+ String year = String.valueOf( currentYear );
+
+ String inceptionYear = project.getInceptionYear();
diff --git a/debian/patches/series b/debian/patches/series
index b5339b8..7dd77d3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
plexus-utils2-compatibility.patch
fix-unmappable-characters.patch
missing-maven-plugin-plugin-declaration.patch
+reproducible-footer.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-javadoc-plugin.git
More information about the pkg-java-commits
mailing list