maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r617986 - in /maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc: AbstractJavadocMojo.java JavadocUtil.java
Date Sun, 03 Feb 2008 13:26:22 GMT
Author: vsiveton
Date: Sun Feb  3 05:26:21 2008
New Revision: 617986

URL: http://svn.apache.org/viewvc?rev=617986&view=rev
Log:
MJAVADOC-173: JavadocUtil#copyJavadocResources( File outputDirectory, File javadocDir ) should
exclude default pattern

o added default pattern
o copying "doc-files" dir only if docfilessubdirs = true

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.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=617986&r1=617985&r2=617986&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
Sun Feb  3 05:26:21 2008
@@ -1256,13 +1256,16 @@
         // Copy javadoc resources
         // ----------------------------------------------------------------------
 
-        try
+        if ( docfilessubdirs )
         {
-            copyJavadocResources( javadocOutputDirectory );
-        }
-        catch ( IOException e )
-        {
-            throw new MavenReportException( "Unable to copy javadoc resources: " + e.getMessage(),
e );
+            try
+            {
+                copyJavadocResources( javadocOutputDirectory );
+            }
+            catch ( IOException e )
+            {
+                throw new MavenReportException( "Unable to copy javadoc resources: " + e.getMessage(),
e );
+            }
         }
 
         // ----------------------------------------------------------------------
@@ -1370,8 +1373,11 @@
             addArgIf( arguments, docfilessubdirs, "-docfilessubdirs", SINCE_JAVADOC_1_4 );
             addArgIfNotEmpty( arguments, "-docencoding", JavadocUtil.quotedArgument( docencoding
) );
             addArgIfNotEmpty( arguments, "-doctitle", JavadocUtil.quotedArgument( getDoctitle()
), false, false );
-            addArgIfNotEmpty( arguments, "-excludedocfilessubdir", JavadocUtil.quotedPathArgument(
excludedocfilessubdir ),
-                              SINCE_JAVADOC_1_4 );
+            if ( docfilessubdirs )
+            {
+                addArgIfNotEmpty( arguments, "-excludedocfilessubdir", JavadocUtil
+                    .quotedPathArgument( excludedocfilessubdir ), SINCE_JAVADOC_1_4 );
+            }
             addArgIfNotEmpty( arguments, "-footer", JavadocUtil.quotedArgument( footer ),
false, false );
             if ( groups != null )
             {

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=617986&r1=617985&r2=617986&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
Sun Feb  3 05:26:21 2008
@@ -215,7 +215,8 @@
     {
         if ( javadocDir.exists() && javadocDir.isDirectory() )
         {
-            List docFiles = FileUtils.getDirectoryNames( javadocDir, "**/doc-files", null,
false, true );
+            List docFiles = FileUtils.getDirectoryNames( javadocDir, "**/doc-files", StringUtils.join(
FileUtils
+                .getDefaultExcludes(), "," ), false, true );
             for ( Iterator it = docFiles.iterator(); it.hasNext(); )
             {
                 String docFile = (String) it.next();



Mime
View raw message