ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Kuperus Heun <matthew.k.h...@gaerospace.com>
Subject Re: Javadoc task not correctly interpreting ** in paths?
Date Fri, 23 Nov 2001 17:26:36 GMT
Stefan:

Thanks for your response.

>  > I'm trying to use the javadoc task with "Ant version 1.4.1 compiled
>>  on October 11 2001".  I don't think it handles "**" characters or
>>  implied "**" characters in pathelements of a nested sourcepath element.
>
><javadoc> is not a "directory based task", it doesn't support filesets
>or patternsets.

I don't believe I'm using a fileset or patternset.  I'm just using a 
nested sourcepath element as the documentation suggests.

I assumed, however, that <javadoc> worked similar to <javac> (i.e., 
that it was "directory based").  Is there a list of tasks that are 
"directory based" in the docs?  I looked in the natural place 
(http://jakarta.apache.org/ant/manual/dirtasks.html) and didn't find 
it.

This begs the question: could <javadoc> be made into a "directory 
based task" and operate just like <javac>?  If not, why not?  It 
would seem natural since the javadoc command actually uses info from 
a javac pass over the files, according to Sun's documentation.  Would 
it be as simple as making <javadoc> extend MatchingTask instead of 
Task?

><path> and <pathelement> don't think that ** would be something
>special, they'll go out and look for a file with two consecutive * in
>their name.

Agreed, if <javadoc> is not "directory based".

>  > See the snippet of my build.xml file below for the comments which
>>  discuss the errors I receive.
>
>I see the snippet, but cannot understand what you want to achieve
>there - trying to avoid listing the source directories explicitly?

Yes.  Exactly.  My doc task would require NO maintenance if I could say

<pathelement path="${basedir}/src/"/>

because any subdirectories added when the project grows would 
automatically be covered.  I wouldn't have to go into the build file 
and add the (potentially deeply nested) paths manually.

>  >          <!-- The next line should be equivalent to the above code
>>           that works.  But, it fails, saying "No packages or classes
>>           specified." -->
>  >     <!-- <pathelement path="${basedir}/src/"/> -->
>
>why should it be equivalent? From your description, there is no com
>directory inside of ${basedir}/src/, therefore the package
>specification com.foo* won't match here.

I thought it should be equivalent because I assumed that an implied 
"**" would be appended and that it would, therefore, match

${basedir}/src/SrcDir1
and
${basedir}/src/SrcDir2

which DO contain "com" subdirectories.  It would also match other 
subdirectories, but none of them contain a "com" subdirectory and 
would, presumably, be ignored by <javadoc>.

Sorry if I wasn't exactly clear.

So, it seems the big question is: could <javadoc> be "directory-based"?

Cheers,

Matt
-- 

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message