ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19018] New: - Using packagenames="*" for javadoc fails in Java 1.4.1 for unnamed package
Date Tue, 15 Apr 2003 04:54:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19018>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19018

Using packagenames="*" for javadoc fails in Java 1.4.1 for unnamed package

           Summary: Using packagenames="*" for javadoc fails in Java 1.4.1
                    for unnamed package
           Product: Ant
           Version: 1.5.3
          Platform: Macintosh
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: hanming@mac.com


Say I have the following simple javadoc task:

  <target name="javadoc" description="Create javadoc.">
    <property name="javadoc.window.title" value="myweb API Documentation"/>
    <property name="javadoc.doc.title" value="myweb API"/>
    <property name="javadoc.bottom.title" 
      value="Copyright &#169; 2003 __MyCompanyName__.  All Rights Reserved."/>
        
    <property name="javadoc.dist.dir" value="ant.dist/javadoc"/>
    <property name="javadoc.excludepackagenames" value=""/>
    
    <delete dir="${javadoc.dist.dir}"/>
    <mkdir dir="${javadoc.dist.dir}"/>
      <javadoc
        destdir="${javadoc.dist.dir}"
        packagenames="*"
        excludepackagenames="${javadoc.excludepackagenames}"
        sourcepathref="javadoc.src.dir"
        author="true"
        version="true"
        windowtitle="${javadoc.window.title}"
        doctitle="${javadoc.doc.title}"
        bottom="${javadoc.bottom.title}">
        
        <classpath refid="module.classpath"/>
    </javadoc>
  </target>

This usually works in both Java 1.3.1 and 1.4.1. There is a pretty common case
when it fails only in 1.4.1: when you have classes that are in unnamed package.
The error is:

javadoc:
   [delete] Deleting directory /tmp/myweb/ant.dist/javadoc
    [mkdir] Created dir: /tmp/myweb/ant.dist/javadoc
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] javadoc: Illegal package name: ""
  [javadoc] Loading source files for package hello...
  [javadoc] 1 error

For some reason, when there is unnamed package, "" is passed to javadoc. It used
to work in 1.3.1. Passing "*" should work for 1.3.1 and 1.4.1.

Mime
View raw message