ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@ca.ibm.com
Subject Re: Exclude attribute to javadoc
Date Fri, 20 Oct 2000 13:43:01 GMT


The way the current implementation of the <javadoc> task works is to assume
the the package names you specify correspond to directory names.  If you
have extraneous directories and use the * wildcard, you will pick up those
directories and pass them on to Javadoc as if they were valid package
names.

Hmm... just took a peek at our own stuff and realized that the build for
Ant can have the same problem if any of the CVS directories include .java
files.

Well, there are two ways we can fix this.  Either add a matching task like
functionality to javadoc (which I'm not really willing to do with being so
close to a release) or copy the source tree into a clean directory and then
build the Javadoc.  I'm leaning towards the latter becuase doing the
Javadoc is a farily infrequent event.

So in your case, you may need to do

<copy todir="${doc.src.dir}">
  <fileset dir="../Util/java">
    <include name="**/*.java" />
    <exclude name="**/SCCS" />
  </fileset>
</copy>

<javadoc packagenames="se.lentus.util.*"
         sourcepath="${doc.src.dir}"
         destdir="${javadoc}"
         author="true"
         version="true"
         use="true"
         windowtitle="Test API"
         doctitle="Test"
         bottom="&lt;i>Copyright &#169; 2000 Dummy Corp. All Rights
Reserved.&lt;/i>">
</javadoc>

<delete dir="${doc.src.dir}" />

Not elegant, but it does get us around the problem.  Comments?

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey


Please respond to ant-dev@jakarta.apache.org

To:   ant-dev@jakarta.apache.org
cc:
Subject:  Exclude attribute to javadoc

Hi,

I think I need an exclude attribute to javadoc,

I am trying to run javadoc and it seems like
I need an exclude attribute, since I have a lot of SCCS direcories
laying all around in my source-code, (they originate from my source-code
control system, bitkeeper)

or am I using javadoc in the wrong way?


I am using ant/2000-10-12

and the target looks like

<target name="javadoc" depends="prepare">
  <javadoc packagenames="se.lentus.util.*"
           sourcepath="../Util/java"
           destdir="${javadoc}"
           author="true"
           version="true"
           use="true"
           windowtitle="Test API"
           doctitle="Test"
           bottom="&lt;i>Copyright &#169; 2000 Dummy Corp. All Rights
Reserved.&lt;/i>">
  </javadoc>
</target>


Output is:
javadoc:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Loading source files for package se.lentus.util...
  [javadoc] Loading source files for package se.lentus.util.swing...
  [javadoc] Loading source files for package
se.lentus.util.swing.SCCS...
  [javadoc]
/home/users/alu/bk/LENTUS/Util/java/se/lentus/util/swing/SCCS/s.Tree
TableModel.java:1: Invalid character in input.


/Regards,
Peter




Mime
View raw message