You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jose Alberto Fernandez <JF...@viquity.com> on 2000/09/14 20:32:41 UTC

RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdef s Javadoc.java

I have a problem with this fix.

It is only solving a very particular special case that you have faced in a
very particular build. What about directories containing "!" or "@" or some
other special character?

One of the problems with <javadoc> is that there is no way to specify
<include>/<exclude> patterns. So that we can dealt with this issue in
general. Some time ago a sent a wish list for <javadoc> (which I had no time
to work on :( ), but some of the issues I mentioned were the lack of a way
to specify the set of files for <javadoc> which usually are limited to those
we are compiling.

Jose Alberto

> -----Original Message-----
> From: bodewig@locus.apache.org [mailto:bodewig@locus.apache.org]
> Sent: Thursday, September 14, 2000 6:37 AM
> To: jakarta-ant-cvs@apache.org
> Subject: cvs commit: 
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> Javadoc.java
> 
> 
> bodewig     00/09/14 06:36:47
> 
>   Modified:    src/main/org/apache/tools/ant/taskdefs Javadoc.java
>   Log:
>   Make <javadoc> ignore .java files in directories containing a "-".
>   
>   You cannot have a package name with a "-" in it anyway so 
> these files
>   are something different. In my case I had example files in the
>   .../doc-files directory and javadoc died because I've used the same
>   classname (Example) in several places.
>   
>   Revision  Changes    Path
>   1.34      +2 -1      
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
>   
>   Index: Javadoc.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/J
> avadoc.java,v
>   retrieving revision 1.33
>   retrieving revision 1.34
>   diff -u -r1.33 -r1.34
>   --- Javadoc.java	2000/09/06 14:04:58	1.33
>   +++ Javadoc.java	2000/09/14 13:36:45	1.34
>   @@ -843,7 +843,8 @@
>        					return false;
>        				}
>        				File d = new File(dir1, name);
>   -    				if (d.isDirectory()) {
>   +    				if (d.isDirectory() 
>   +                                    && 
> d.getName().indexOf("-") == -1) {
>        					return true;
>        				}
>        				return false;
>   
>   
>   
> 

Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdef s Javadoc.java

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "JAF" == Jose Alberto Fernandez <JF...@viquity.com> writes:

 JAF> I have a problem with this fix.  It is only solving a very
 JAF> particular special case that you have faced in a very particular
 JAF> build. What about directories containing "!" or "@" or some
 JAF> other special character?

Yes, I know. It was some kind of quick fix I personally needed. But
directories named doc-files are special to javadoc (since Java 1.2) so
this case might be more common than others.

I'm going to change that to drop every directory whose name is not a
valid Java identifier - once get time and some other things have been
done to Ant before. Make that step 7 or 8 on my personal TODO list for
Ant.

 JAF> One of the problems with <javadoc> is that there is no way to
 JAF> specify <include>/<exclude> patterns.

This might be an even better solution (I could have set
excludes="**/doc-files/**" like I do on my javac target then). Maybe
you will find time to work on your wish list before I get there 8^).

Stefan