Commit 34d8e87d authored by Emmanuel Bourg's avatar Emmanuel Bourg

Don't use the javadoc --ignore-source-errors option when using a custom doclet (Closes: #893547)

parent f3157f0f
......@@ -5,6 +5,8 @@ ant (1.10.3-1) UNRELEASED; urgency=medium
- Changed the source/target level to 1.8 when building Ant
- Build the new optional ant-xz module
- Require Java 8 or higher to run Ant
* Don't use the javadoc --ignore-source-errors option when using
a custom doclet (Closes: #893547)
* Adjust the source/target level to 1.7 in anticipation of the 1.6 removal
in Java 11
* Added activation.jar to the build classpath to fix the empty ant-javamail
......
......@@ -39,17 +39,12 @@ Forwarded: no
if (hasPath(src)) {
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -2174,7 +2174,12 @@
@@ -2174,7 +2174,7 @@
: getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE);
if (sourceArg != null) {
toExecute.createArgument().setValue("-source");
- toExecute.createArgument().setValue(sourceArg);
+ toExecute.createArgument().setValue(LanguageLevel.adjust(sourceArg, "javadoc -source", this));
+ }
+
+ if (LanguageLevel.isDebianBuild() && !LanguageLevel.isPreJava9()) {
+ toExecute.createArgument().setValue("--ignore-source-errors");
+ log("Debian build on Java >=9: Adding --ignore-source-errors.");
}
if (linksource && doclet == null) {
......
Description: Ignore source errors when using the default doclet with Java 9
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -2177,6 +2177,11 @@
toExecute.createArgument().setValue(LanguageLevel.adjust(sourceArg, "javadoc -source", this));
}
+ if (doclet == null && LanguageLevel.isDebianBuild() && !LanguageLevel.isPreJava9()) {
+ toExecute.createArgument().setValue("--ignore-source-errors");
+ log("Debian build on Java 9+ detected: Adding the --ignore-source-errors option");
+ }
+
if (linksource && doclet == null) {
toExecute.createArgument().setValue("-linksource");
}
......@@ -2,4 +2,5 @@
0010-reproducible-javadoc-task.patch
0011-reproducible-propertyfile-task.patch
0013-auto-adjust-target.patch
0015-javadoc-ignore-source-errors.patch
0014-remove-java-activation-module.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment