Only thing I could come up with was to use an embedded script.  The 
reference "i2build.packages" is simply a patternset that has the packages 
I want to compile/javadoc, I include an example of it below.

  <patternset id="i2build.packages">
         <include name="com/i2/logistics/util"/>
         <include name="com/i2/logistics/util/test"/>
         <include name="com/i2/logistics/baz"/>
  </patternset>

<target name="javadoc" depends="init"
                  description="Creates the javadocs for all the 
sourcefiles for a project">
   <script language="javascript"> <![CDATA[
         var theTarget = javadoc;
         var theProject = theTarget.getProject();
         var docFileSet = theProject.createDataType("fileset");
         var packagePset = 
theProject.getReferences().get("i2build.packages");
         var packages = packagePset.getIncludePatterns(theProject);
 
         var docPackages = "";
         if(packages != null && packages.length > 0)
         {
                docPackages = packages[0].replace('/', '.').replace('\\', 
'.');
                for(var i = 1; i < packages.length; i++)
                {
                        docPackages = docPackages + "," + 
packages[i].replace('/', '.').replace('\\', '.');
                }
         }
         theProject.setProperty("i2build.javadoc.packages", docPackages);  

         ]]></script>
  <mkdir dir="${i2build.javadoc.outputdir}"/>
  <javadoc sourcepath="${i2build.srcroot}"
                          destdir="${i2build.javadoc.outputdir}"
                          classpathref="i2build.classpath"
                          packagenames="${i2build.javadoc.packages}">
  </javadoc>
</target>


On 06/27/2001 01:29:21 PM Jamie Lawrence wrote:
> 
> Is it possible to use the same patternset I define for javac in the 
javadoc
> task?  Basically I want to produce documentation only for the classes 
that
> were actually compiled.
> 
> Many thanks,
> 
>      Jamie
> 
> 
> (See attached file: Jamie Lawrence (E-mail).vcf) - Jamie Lawrence 
(E-mail).vcf

Reply via email to