maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r392180 - in /maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer: DefaultSiteRenderer.java DocumentRenderer.java DoxiaDocumentRenderer.java
Date Fri, 07 Apr 2006 04:34:29 GMT
Author: brett
Date: Thu Apr  6 21:34:27 2006
New Revision: 392180

URL: http://svn.apache.org/viewcvs?rev=392180&view=rev
Log:
[MSITE-40] always overwrite reports

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

Modified: maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java?rev=392180&r1=392179&r2=392180&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
(original)
+++ maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Thu Apr  6 21:34:27 2006
@@ -217,7 +217,13 @@
 
             File inputFile = new File( renderingContext.getBasedir(), renderingContext.getInputName()
);
 
+            boolean modified = false;
             if ( !outputFile.exists() || inputFile.lastModified() > outputFile.lastModified()
)
+            {
+                modified = true;
+            }
+
+            if ( modified || docRenderer.isOverwrite() )
             {
                 if ( !outputFile.getParentFile().exists() )
                 {

Modified: maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java?rev=392180&r1=392179&r2=392180&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java
(original)
+++ maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java
Thu Apr  6 21:34:27 2006
@@ -35,4 +35,10 @@
     String getOutputName();
 
     RenderingContext getRenderingContext();
+
+    /**
+     * Whether to always overwrite the document, or only do so when it is changed.
+     * @return whether to overwrite
+     */
+    boolean isOverwrite();
 }

Modified: maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java?rev=392180&r1=392179&r2=392180&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java
(original)
+++ maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java
Thu Apr  6 21:34:27 2006
@@ -53,4 +53,9 @@
         return renderingContext;
     }
 
+    public boolean isOverwrite()
+    {
+        return false;
+    }
+
 }



Mime
View raw message