maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r407726 - /maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
Date Fri, 19 May 2006 06:14:06 GMT
Author: oching
Date: Thu May 18 23:14:06 2006
New Revision: 407726

URL: http://svn.apache.org/viewvc?rev=407726&view=rev
Log:
PR: MJAVADOC-56

Fixed exclude when the specified values have wildcard characters on the last part of the package
name.

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java?rev=407726&r1=407725&r2=407726&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
Thu May 18 23:14:06 2006
@@ -1456,6 +1456,7 @@
             {
                 // handle wildcards (*) in the excludePackageNames
                 String[] excludeName = excludePackages[k].split( "[*]" );
+
                 if ( excludeName.length > 1 )
                 {
                     int u = 0;
@@ -1472,7 +1473,24 @@
                 {
                     if ( fileList[j].startsWith( sourceDirectory + File.separatorChar + excludeName[0]
) )
                     {
-                        include = false;
+                        if ( excludeName[0].endsWith( String.valueOf( File.separatorChar
) ) )
+                        {
+                            int i = fileList[j].lastIndexOf( File.separatorChar );
+                            String packageName = fileList[j].substring( 0, i + 1 );
+                            if ( packageName.equals( sourceDirectory + File.separatorChar
+ excludeName[0] ) &&
+                                fileList[j].substring( i ).indexOf( ".java" ) != -1 )
+                            {
+                                include = true;
+                            }
+                            else
+                            {
+                                include = false;
+                            }
+                        }
+                        else
+                        {
+                            include = false;
+                        }
                     }
                 }
             }



Mime
View raw message