You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2006/02/15 06:27:58 UTC

svn commit: r377942 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java

Author: bodewig
Date: Tue Feb 14 21:27:55 2006
New Revision: 377942

URL: http://svn.apache.org/viewcvs?rev=377942&view=rev
Log:
javadoc doesn't like the palckage name '', skip it

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?rev=377942&r1=377941&r2=377942&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Tue Feb 14 21:27:55 2006
@@ -2136,12 +2136,20 @@
                     });
 
                 if (files.length > 0) {
+                    if ("".equals(dirs[i])) {
+                        log(baseDir
+                            + " contains source files in the default package,"
+                            + " you must specify them as source files"
+                            + " not packages.",
+                            Project.MSG_WARN);
+                    } else {
                     containsPackages = true;
                     String packageName =
                         dirs[i].replace(File.separatorChar, '.');
                     if (!addedPackages.contains(packageName)) {
                         addedPackages.addElement(packageName);
                         pn.addElement(packageName);
+                    }
                     }
                 }
             }



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


Re: svn commit: r377942 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 15 Feb 2006, Matt Benson <gu...@yahoo.com> wrote:

> Stefan, this one is a weird situation IMHO.... I'm not
> sure where Javadoc was complaining, but the way the
> tests were structured, they were looking at
> "src/etc/testcases/taskdefs/javadoc/java" as the
> source directory, while the test Java file there was
> in the package etc.testcases.taskdefs.javadoc.java,
> making its true source directory "src".

I know, I just copied the tests from the bug report and had to modify
them right from the start since the original poster doesn't understand
(or is not interested in) the difference between srcpath and srcfiles
in the case of javadoc.

I wanted to clean stuff up once I'm done (need to find a full hour
with no interruptions, sorry).

> But this doesn't _really_ test the package "*" functionality;

Oh, this is a different issue I'm going to raise in a separate thread
(one day ...).  It seems as if the packagenames attribute is (and
always has been) required unless you use srcfiles but neither the docs
nor the code say so.

> we may need to place an actual package structure beneath
> javadoc/java to (a) keep it self-contained and (b) test adequately.

I agree.

Stefan

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


Re: svn commit: r377942 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java

Posted by Matt Benson <gu...@yahoo.com>.
Stefan, this one is a weird situation IMHO.... I'm not
sure where Javadoc was complaining, but the way the
tests were structured, they were looking at
"src/etc/testcases/taskdefs/javadoc/java" as the
source directory, while the test Java file there was
in the package etc.testcases.taskdefs.javadoc.java,
making its true source directory "src".  Pulling
package "*" from
src/etc/testcases/taskdefs/javadoc/java was returning
the java directory itself, aka "" and caused the Java
file to be omitted in testPathelementPath.  My
temporary solution was to change the source directory
to ${root}/src just to quiet "Gumpster."  But this
doesn't _really_ test the package "*" functionality;
we may need to place an actual package structure
beneath javadoc/java to (a) keep it self-contained and
(b) test adequately.

WDYT (all)?

-Matt

--- bodewig@apache.org wrote:

> Author: bodewig
> Date: Tue Feb 14 21:27:55 2006
> New Revision: 377942
> 
> URL:
> http://svn.apache.org/viewcvs?rev=377942&view=rev
> Log:
> javadoc doesn't like the palckage name '', skip it
> 
> Modified:
>    
>
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
> 
> Modified:
>
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
> URL:
>
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?rev=377942&r1=377941&r2=377942&view=diff
>
==============================================================================
> ---
>
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
> (original)
> +++
>
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
> Tue Feb 14 21:27:55 2006
> @@ -2136,12 +2136,20 @@
>                      });
>  
>                  if (files.length > 0) {
> +                    if ("".equals(dirs[i])) {
> +                        log(baseDir
> +                            + " contains source
> files in the default package,"
> +                            + " you must specify
> them as source files"
> +                            + " not packages.",
> +                            Project.MSG_WARN);
> +                    } else {
>                      containsPackages = true;
>                      String packageName =
>                         
> dirs[i].replace(File.separatorChar, '.');
>                      if
> (!addedPackages.contains(packageName)) {
>                         
> addedPackages.addElement(packageName);
>                          pn.addElement(packageName);
> +                    }
>                      }
>                  }
>              }
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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