[tor-commits] [metrics-base/master] Make `ant docs` work with excluded sources.

karsten at torproject.org karsten at torproject.org
Thu Jun 18 07:02:14 UTC 2020


commit 92e78eda6addb8692efa2fe236810f2b7cc65115
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Thu Jun 18 08:59:14 2020 +0200

    Make `ant docs` work with excluded sources.
    
    Turns out that Javadoc needs to know about other classes even if we
    exclude their sources. The reason for excluding sources is that we
    don't want to include their documentation in the generated
    documentation. We can fix this by including compiled classes while
    still excluding their sources.
---
 java/base.xml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/java/base.xml b/java/base.xml
index 9c47737..7dddff7 100644
--- a/java/base.xml
+++ b/java/base.xml
@@ -156,7 +156,7 @@
     </javac>
   </target>
 
-  <target name="docs" depends="gitrev" >
+  <target name="docs" depends="gitrev, compile" >
     <tstamp>
       <format property="copyyear"
               pattern="yyyy"
@@ -174,7 +174,10 @@
              overview="${basedir}/${resources}/overview.html"
              use="true"
              windowtitle="${javadoc-title}">
-      <classpath refid="classpath"/>
+      <classpath>
+        <path refid="classpath"/>
+        <pathelement location="${classes}"/>
+      </classpath>
       <fileset dir="${sources}" excludes="${javadoc-excludes}"/>
     </javadoc>
     <copy file="${javadocicon}" todir="${docs}"/>



More information about the tor-commits mailing list