• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

generating javadoc with ant

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
I am trying to generate javadocs using ant task "javadoc". Even though I explicitly say include only the specified files, the javadoc goes and includes every java file in that directory. Can someone tell me what I am missing?
<javadoc
destdir="docs/dummy"
author="true"
version="true"
use="false"
windowtitle="CO2 API">
<fileset dir="${projdir}" defaultexcludes="yes">
<include name="common/policy/common/PolicyModule.java" />
<include name="common/policy/common/PolicyModuleImpl.java" />
<include name="common/policy/common/RequestHandle.java" />
</fileset>
<doctitle><![CDATA[<h1>documentation</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2004 abc Inc. All Rights Reserved.</i>]]></bottom>
</javadoc>
Thanks,
--MS
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe the default is to include all files ending in .java in the fileset unless you explicitly exclude them. Perhaps you could put the files you want into a separate directory?
 
madhav srimadh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marilyn de Queiroz:
I believe the default is to include all files ending in .java in the fileset unless you explicitly exclude them. Perhaps you could put the files you want into a separate directory?


I think you are right in that the default for fileset is to include all .java files if not explicitly excluded. I even tried explicitly
excluding the files, the javadoc only loads the included files but
when it is creating the javadoc tree it starts to look at the rest
of the .java files (the ones that I have excluded).
I think this is a bug in the javadoc task, not sure if it's an open bug!
--MS
 
madhav srimadh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have finally figured it out, the problem was with the fileset dir field. I initially had it as the project root, when I changed it to the src root it all works just fine!
A snippet of the build file that does the job follows :
<?xml version ="1.0" encoding = "UTF-8" ?>
<!DOCTYPE doc_build>
<project name="documentation" default="doc" basedir=".">
<description>
co2 doc build file
</description>
<!-- set global properties for this build -->
<property environment="env" />
<property name="srcdir" value="${env.CO2ROOT}/com/abc/co2" />
<target name="doc"
description="generate documentation from the sources " >
<javadoc
destdir="dummy"
author="true"
version="true"
use="false"
windowtitle="CO2 API" >
<fileset dir="${srcdir}" defaultexcludes="yes">
<include name="common/appmgr/*.java" />
<exclude name="common/appmgr/Security.java" />
</fileset>
<doctitle><![CDATA[<h1>Content Over Optics Documentation</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2004 ABC Inc. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
</project>
reply
    Bookmark Topic Watch Topic
  • New Topic