maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r560597 - /maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Date Sat, 28 Jul 2007 19:33:16 GMT
Author: dennisl
Date: Sat Jul 28 12:33:16 2007
New Revision: 560597

URL: http://svn.apache.org/viewvc?view=rev&rev=560597
Log:
[DOXIA-86] The results of Site Renderer does not validate (CSS)

o If the skin or the project's site doesn't supply the file /css/site.css an empty such file
will be created.

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java

Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java?view=diff&rev=560597&r1=560596&r2=560597
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Sat Jul 28 12:33:16 2007
@@ -651,6 +651,20 @@
             copyDirectory( resourcesDirectory, outputDirectory );
         }
 
+        // Check for the existence of /css/site.css
+        File siteCssFile = new File( outputDirectory, "/css/site.css" );
+        if ( !siteCssFile.exists() )
+        {
+            // If it's not there - create an empty file, DOXIA-86
+            if ( getLogger().isDebugEnabled() )
+            {
+                getLogger().debug(
+                    "The file '" + siteCssFile.getAbsolutePath() + "' does not exists. Creating
an empty file." );
+            }
+            FileWriter w = new FileWriter( siteCssFile );
+            w.write( "" );
+            IOUtil.close( w );
+        }
     }
 
     private void copyFileFromZip( ZipFile file,



Mime
View raw message