This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 151813 - javadoc build task regression - doc-files directory ignored
Summary: javadoc build task regression - doc-files directory ignored
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 177555 (view as bug list)
Depends on: 187934
Blocks:
  Show dependency tree
 
Reported: 2008-10-30 03:37 UTC by brucechapman
Modified: 2010-10-25 15:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brucechapman 2008-10-30 03:37:14 UTC
Files in doc-files subdirectories of java source package directories are no longer copied over when javadoc task is run.

Ugrading from 6.1 to 6.5RC1 has caused this change to build-imp.xml

@@ -803,11 +718,9 @@
             <classpath>
                 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
             </classpath>
-            <sourcepath>
-                <pathelement location="${src.dir}"/>
-            </sourcepath>
-            <packageset dir="${src.dir}" includes="*/**"/>
-            <fileset dir="${src.dir}" includes="*.java"/>
+            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
         </javadoc>
     </target>

Which I suspect is causing the javadoc tool to be unaware of doc-files subdirectories.

manually reinserting the sourcepath element fixes the problem.
Comment 1 David Konecny 2008-10-30 07:44:50 UTC
This is caused by integration of Java includes/excludes from J2SE project to Web/J2EE projects in NB6.5. But the same
problem exists in J2SE project type. Google says that doc-files folders are copied only when packages are enumerated for
javadoc tool but not when files are enumerated. And we seem to enumerate files.

Anyway, could you guys fixed it in J2SE project and I will clone the fix to other project types? Thanks. 
Comment 2 Jana Maleckova 2008-11-13 08:02:27 UTC
issue has lower priority then P2, please enclose evaluation why this fix should be a part of 65patch1. Thanks
Comment 3 David Konecny 2008-11-13 18:41:05 UTC
Everything is already written in issue description: regression from 6.1; if you have doc-files subdirectories their are
ignored and resulting Javadoc will have broken links.
Comment 4 pgebauer 2008-11-24 09:30:52 UTC
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
Comment 5 pgebauer 2009-01-14 09:37:30 UTC
The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3.
Comment 6 pgebauer 2009-04-08 14:11:15 UTC
The status whiteboard "65fixes4-candidate" has been removed.
At this time our proactive patches for the NetBeans 6.5.x IDE have concluded.

If you own a Sun service plan contract for NetBeans, you may wish to contact
Sun Service http://www.sun.com/contact/support.jsp to request a fix via the
product defect escalation process.

For more information on purchasing a Sun service plan contract for NetBeans,
refer to the service plan item "Sun Software Service Plans (S3P) for Developers"
in the Sun Service table found on our NetBeans Support Resources
page http://www.netbeans.org/kb/support.html
Comment 7 brucechapman 2010-05-29 08:40:17 UTC
Still broken in 6.9 RC1.

Could someone who actually understands javadoc please look at this fault, and acknowledge that it is a stupidly obvious bug and just fix it. It has been a regression error since 6.5 for goodness sake.
Comment 8 David Konecny 2010-05-30 20:29:01 UTC
I agree that this should have been fixed a while ago.
Comment 9 Tomas Zezula 2010-06-01 15:44:38 UTC
Unfortunately it's not an obvious bug. Due to exclude support the jdoc target had to be rewritten to use fileset not a packageset.
Comment 10 brucechapman 2010-06-02 21:34:12 UTC
OK, if the change was to make include and exclude work, then the doc-files can be copied over separately after the javadoc task. This works for me on my 6.8 project.

    <target depends="init" name="javadoc-build">
        <mkdir dir="${dist.javadoc.dir}"/>
        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
            <classpath>
                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
            </classpath>
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
                <filename name="**/*.java"/>
            </fileset>
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
                <include name="**/*.java"/>
            </fileset>
        </javadoc>
        <copy todir="${dist.javadoc.dir}">
            <fileset dir="${src.dir}" includes="**/doc-files/**" erroronmissingdir="false"/>
            <fileset dir="${build.generated.sources.dir}" includes="**/doc-files/**" erroronmissingdir="false"/>
        </copy>
    </target>

I don't know if you'd also want to put the exclude / include stuff in the copy as well, there is arguably more harm in not copying enough, than there is in copying too much, so on that basis I've elided the exclude/include from the copy.
Comment 11 rbalada 2010-06-22 07:49:37 UTC
Please report on progress, especially if you can make it into 6.9.1, if not please consider removing 6.9.1_CANDIDATE keyword.

Thanks,
-R
Comment 12 Tomas Zezula 2010-06-22 09:48:13 UTC
Fixed for j2seproject.
jet-main 2de73777e986
I've created a new web project issue to port this patch.
Comment 13 Tomas Zezula 2010-06-22 09:48:57 UTC
The web project issue is 187934.
Comment 14 Quality Engineering 2010-06-23 03:28:58 UTC
Integrated into 'main-golden', will be available in build *201006230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2de73777e986
User: Tomas Zezula <tzezula@netbeans.org>
Log: #151813:javadoc build task regression - doc-files directory ignored
Comment 15 Peter Pis 2010-06-23 08:21:17 UTC
Verified.

Product Version: NetBeans IDE Dev (Build 201006230001)
Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13
System: Linux version 2.6.31-22-generic running on i386; UTF-8; en_US (nb)
Comment 16 rbalada 2010-06-28 09:29:13 UTC
main #2de73777e986 transplanted to release691 #8f8c07616911
Comment 17 Martin Fousek 2010-07-07 14:19:37 UTC
Verified in NetBeans IDE 6.9.1 Dev (Build 201007062301).
Comment 18 Tomas Zezula 2010-10-25 15:35:10 UTC
*** Bug 177555 has been marked as a duplicate of this bug. ***