With ant 1.6.5 we used a javadoc task with sourcepathref and a packageList where packageList contains a list of packages which should only be used. Now with 1.8.4 the javadoc command is called (by Java13CommandLauncher) with all package names instead of only the package names from the packageList. The filename from packageList is still added at the end of the javadoc command line option. <property name="packagefile" value="${J_ROOT}/doc/package.lst"/> <path id="src.dirs"> <dirset dir="${J_ROOT}/projects"> <include name="**/src/main/java"/> </dirset> </path> <javadoc sourcepathref="src.dirs" destdir="${htmldestdir}" packageList="${packagefile}" Windowtitle="${windowtitle}" Doctitle="${doctitle}" Use="true" Splitindex="true" maxmemory="512M" overview="${overviewfile}" classpathref="classpath.extra" Version="${version}" Author="${author}"> </javadoc>
You are correct but I'm tempted to say it is by design: > NOTE: the packagelist attribute allows you to specify the list of packages to document outside of the Ant file. It's a much better practice to include everything inside the build.xml file. This option was added in order to make it easier to migrate from regular makefiles, where you would use this option of javadoc. The packages listed in packagelist are not checked, so the task performs even if some packages are missing or broken. Use this option if you wish to convert from an existing makefile. Once things are running you should then switch to the regular notation.
Seems pretty clear it is not by design. Debugging through the 1.9.8 code, on line 1787 of Javadoc.java, you'll see: if (packageList != null) { toExecute.createArgument().setValue("@" + packageList); } log(toExecute.describeCommand(), Project.MSG_VERBOSE); The command line after this point does not have the "@packageListFile" specified, but rather all packages found in the sources. This is a bug.