Author: bodewig
Date: Mon Nov 24 01:31:32 2008
New Revision: 720143
URL: http://svn.apache.org/viewvc?rev=720143&view=rev
Log:
remove non-1.4 stuff from javadoc
Modified:
ant/core/trunk/docs/manual/CoreTasks/javadoc.html
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
Modified: ant/core/trunk/docs/manual/CoreTasks/javadoc.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/javadoc.html?rev=720143&r1=720142&r2=720143&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/javadoc.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/javadoc.html Mon Nov 24 01:31:32 2008
@@ -35,9 +35,6 @@
"changed" files, unlike the <a href="javac.html">javac</a> task.
This means
all packages will be processed each time this task is run. In general, however,
this task is used much less frequently.</p>
-<p>This task works seamlessly between different javadoc versions (1.2 and 1.4),
-with the obvious restriction that the 1.4 attributes
-will be ignored if run in a 1.2 VM.</p>
<p>NOTE: since javadoc calls System.exit(), javadoc cannot be run inside the
same VM as Ant without breaking functionality. For this reason, this task
always forks the VM. This overhead is not significant since javadoc is
normally a heavy
@@ -58,7 +55,7 @@
<p>In the table below, 1.2 means available if your current Java VM is
a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4,
otherwise
-any VM of at least version 1.2 is acceptable. JDK 1.1 is no longer supported.
+any VM of at least version 1.2 is acceptable. JDKs <1.4 are no longer
supported.
If you specify the <code>executable</code> attribute it is up to you
to ensure that this command supports the attributes you wish to use.</p>
@@ -202,7 +199,11 @@
</tr>
<tr>
<td valign="top">Old</td>
- <td valign="top">Generate output using JDK 1.1 emulating doclet</td>
+ <td valign="top">Generate output using JDK 1.1 emulating
+ doclet.<br>
+ <b>Note:</b> as of Ant 1.8.0 this attribute doesn't have any
+ effect since the javadoc of Java 1.4 (required by Ant 1.8.0)
+ doesn't support the -1.1 switch anymore.</td>
<td align="center" valign="top">1.2</td>
<td align="center" valign="top">No</td>
</tr>
@@ -703,9 +704,6 @@
<h4><a name="tagelement">tag</a></h4>
-<p>The tag nested element is used to specify custom tags. This option
-is only available with Java 1.4.</p>
-
<p>If you want to specify a standard tag using a nested tag element
because you want to determine the order the tags are output, you must
not set the description attribute for those tags.</p>
@@ -764,8 +762,7 @@
<h4><a name="tagletelement">taglet</a></h4>
<p>The taglet nested element is used to specify custom
-<a
href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/taglet/overview.html">taglets</a>.
-This option is only available with Java 1.4 or newer.</p>
+ <a
href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/taglet/overview.html">taglets</a>.</p>
<h5>Parameters</h5>
<table width="90%" border="1" cellpadding="2" cellspacing="0">
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?rev=720143&r1=720142&r2=720143&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Mon Nov
24 01:31:32 2008
@@ -77,12 +77,8 @@
public class Javadoc extends Task {
// Whether *this VM* is 1.4+ (but also check executable != null).
- private static final boolean JAVADOC_4 =
- !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)
- && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3);
-
- private static final boolean JAVADOC_5 = JAVADOC_4
- && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4);
+ private static final boolean JAVADOC_5 =
+ !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4);
/**
* Inner class used to manage doclet parameters.
@@ -452,7 +448,6 @@
private boolean breakiterator = false;
private String noqualifier;
private boolean includeNoSourcePackages = false;
- private boolean old = false;
private String executable = null;
private ResourceCollectionContainer nestedSourceFiles
@@ -766,7 +761,8 @@
* @param b if true attempt to generate old style documentation.
*/
public void setOld(boolean b) {
- old = b;
+ log("Javadoc 1.4 doesn't support the -1.1 switch anymore",
+ Project.MSG_WARN);
}
/**
@@ -1678,28 +1674,12 @@
doGroup(toExecute); // group attribute
doGroups(toExecute); // groups attribute
- // Javadoc 1.4 parameters
- if (JAVADOC_4 || executable != null) {
- doJava14(toExecute);
- if (breakiterator && (doclet == null || JAVADOC_5)) {
- toExecute.createArgument().setValue("-breakiterator");
- }
- } else {
- doNotJava14();
- }
- // Javadoc 1.2/1.3 parameters:
- if (!JAVADOC_4 || executable != null) {
- if (old) {
- toExecute.createArgument().setValue("-1.1");
- }
- } else {
- if (old) {
- log("Javadoc 1.4 doesn't support the -1.1 switch anymore",
- Project.MSG_WARN);
- }
+ doJava14(toExecute);
+ if (breakiterator && (doclet == null || JAVADOC_5)) {
+ toExecute.createArgument().setValue("-breakiterator");
}
// If using an external file, write the command line options to it
- if (useExternalFile && JAVADOC_4) {
+ if (useExternalFile) {
writeExternalArgs(toExecute);
}
@@ -2151,30 +2131,6 @@
}
}
- private void doNotJava14() {
- // Not 1.4+.
- if (!tags.isEmpty()) {
- log("-tag and -taglet options not supported on Javadoc < 1.4",
- Project.MSG_VERBOSE);
- }
- if (source != null) {
- log("-source option not supported on Javadoc < 1.4",
- Project.MSG_VERBOSE);
- }
- if (linksource) {
- log("-linksource option not supported on Javadoc < 1.4",
- Project.MSG_VERBOSE);
- }
- if (breakiterator) {
- log("-breakiterator option not supported on Javadoc < 1.4",
- Project.MSG_VERBOSE);
- }
- if (noqualifier != null) {
- log("-noqualifier option not supported on Javadoc < 1.4",
- Project.MSG_VERBOSE);
- }
- }
-
private void doSourceAndPackageNames(
Commandline toExecute,
Vector packagesToDoc,
@@ -2200,7 +2156,7 @@
if (useExternalFile) {
// XXX what is the following doing?
// should it run if !javadoc4 && executable != null?
- if (JAVADOC_4 && sourceFileName.indexOf(" ") > -1) {
+ if (sourceFileName.indexOf(" ") > -1) {
String name = sourceFileName;
if (File.separatorChar == '\\') {
name = sourceFileName.replace(File.separatorChar, '/');