[ant] 02/03: Set the locale of the javadoc task to 'en' if none was specified and SOURCE_DATE_EPOCH is set

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Mar 28 09:44:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository ant.

commit 3704d21a1aaf45d83a9a855039486e34521b8a8a
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon Mar 28 02:00:16 2016 +0200

    Set the locale of the javadoc task to 'en' if none was specified and SOURCE_DATE_EPOCH is set
---
 debian/changelog                                   |  2 ++
 .../patches/0010-reproducible-javadoc-task.patch   | 33 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c37fa28..c53773c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 ant (1.9.6-2) UNRELEASED; urgency=medium
 
   * Added support for the SOURCE_DATE_EPOCH variable in the Tstamp task
+  * Set the locale of the javadoc task to 'en' if none was specified
+    and SOURCE_DATE_EPOCH is set.
   * Restored the XSL files in /usr/share/ant/etc which were removed
     in the version 1.7.1-1 (LP: #563899)
   * Install the missing ant-junit4 pom
diff --git a/debian/patches/0010-reproducible-javadoc-task.patch b/debian/patches/0010-reproducible-javadoc-task.patch
new file mode 100644
index 0000000..ee03abd
--- /dev/null
+++ b/debian/patches/0010-reproducible-javadoc-task.patch
@@ -0,0 +1,33 @@
+Description: Set the locale of the javadoc task to 'en' if none was specified and SOURCE_DATE_EPOCH is set.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
++++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+@@ -472,6 +472,7 @@
+     private String excludeDocFilesSubDir = null;
+     private String docEncoding = null;
+     private boolean postProcessGeneratedJavadocs = true;
++    private String locale;
+ 
+     private final ResourceCollectionContainer nestedSourceFiles
+         = new ResourceCollectionContainer();
+@@ -895,6 +896,8 @@
+      * @param locale the locale to use.
+      */
+     public void setLocale(final String locale) {
++        this.locale = locale;
++
+         // createArgument(true) is necessary to make sure -locale
+         // is the first argument (required in 1.3+).
+         cmd.createArgument(true).setValue(locale);
+@@ -1703,6 +1706,10 @@
+      */
+     @Override
+     public void execute() throws BuildException {
++        if (locale == null && System.getenv("SOURCE_DATE_EPOCH") != null) {
++            setLocale("en");
++        }
++
+         checkTaskName();
+ 
+         final Vector<String> packagesToDoc = new Vector<String>();
diff --git a/debian/patches/series b/debian/patches/series
index bdad8ed..45995ac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0007-use-build.classpath.patch
 0008-junit4-replace-assumeFalse.patch
 0009-reproducible-timestamp-task.patch
+0010-reproducible-javadoc-task.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/ant.git



More information about the pkg-java-commits mailing list