Author: ltheussl
Date: Thu Sep 22 22:42:42 2005
New Revision: 291077
URL: http://svn.apache.org/viewcvs?rev=291077&view=rev
Log:
MPXDOC-141: Perform JSL transforms on xdocs *only* when they have changed. New
property 'maven.xdoc.skip.uptodate'.
Modified:
maven/maven-1/plugins/trunk/xdoc/plugin.jelly
maven/maven-1/plugins/trunk/xdoc/plugin.properties
maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml
Modified: maven/maven-1/plugins/trunk/xdoc/plugin.jelly
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.jelly?rev=291077&r1=291076&r2=291077&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.jelly Thu Sep 22 22:42:42 2005
@@ -440,7 +440,21 @@
<!-- generate output file name -->
<util:replace var="outFileForward" oldChar="\" newChar="/"
value="${file.toString()}"/>
<j:set var="outFile"
value="${mapper.mapFileName(outFileForward).0}"/>
-
+
+ <j:set var="varname" value="up${file.toString()}"/>
+ <uptodate
+ property="${varname}"
+ srcfile="${file.toString()}"
+ targetfile="${outFile.toString()}" />
+
+ <j:set var="speedup" value="${maven.xdoc.skip.uptodate}"/>
+ <j:choose>
+ <j:when test="${context.getVariable(varname) and
speedup.equals('true')}">
+ <!-- <echo>${outFile} is up to date.</echo> -->
+ </j:when>
+ <j:otherwise>
+
+
<echo>Generating ${outFile} from ${file}</echo>
<!-- work out relative path -->
<util:replace var="docsForward" oldChar="\" newChar="/"
value="${srcdir}"/>
@@ -479,6 +493,10 @@
prettyPrint="no">
<j:include uri="${stylesheet.toString()}"/>
</j:file>
+
+ </j:otherwise>
+ </j:choose>
+
</j:forEach>
</util:available>
Modified: maven/maven-1/plugins/trunk/xdoc/plugin.properties
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.properties?rev=291077&r1=291076&r2=291077&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.properties Thu Sep 22 22:42:42 2005
@@ -84,6 +84,8 @@
# Note that navigation.xml and ${maven.xdoc.xml.copy} are included implicitly
maven.xdoc.validate.exclude=changes.xml
+maven.xdoc.skip.uptodate=false
+
#
# I18N Preferences
#
Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml?rev=291077&r1=291076&r2=291077&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml Thu Sep 22 22:42:42 2005
@@ -27,6 +27,7 @@
</properties>
<body>
<release version="1.10" date="in SVN">
+ <action dev="ltheussl" type="add" issue="MPXDOC-141" due-to="M. Sean
Gilligan">Perform JSL transforms on xdocs <strong>only</strong> when they have
changed.</action>
<action dev="ltheussl" type="add" issue="MPXDOC-169">Add xdoc tag
library documentation to the plugin site.</action>
<action dev="ltheussl" type="fix" issue="MPXDOC-87">Fix
<code>xdoc:validate</code>.</action>
<action dev="ltheussl" type="fix" issue="MPXDOC-106" due-to="Jerome
Lacoste">One cannot call xdoc:copy-user-resources directly.</action>
Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml?rev=291077&r1=291076&r2=291077&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml Thu Sep 22 22:42:42
2005
@@ -61,6 +61,15 @@
<code>${maven.build.dir}/generated-xdocs</code>.
</td>
</tr>
+ </table>
+ </section>
+ <section name="Performance Properties">
+ <table>
+ <tr>
+ <th>Property name</th>
+ <th>Optional?</th>
+ <th>Description</th>
+ </tr>
<tr>
<td>maven.xdoc.xml.copy</td>
<td>Yes</td>
@@ -100,6 +109,22 @@
<code>${maven.xdoc.navigation.file}</code>,
<code>${maven.xdoc.xml.copy}</code>,
<code>changes.xml</code>.
+ </td>
+ </tr>
+ <tr>
+ <td>maven.xdoc.skip.uptodate</td>
+ <td>Yes</td>
+ <td>
+ If set to <code>true</code>, Maven compares the timestamps
+ of corresponding source- and generated files and only
+ performs a transformation if they are different.
+ This leads to a speedup of the site generation by eliminating
+ tranforms of unchanged documents. <strong>Note</strong>:
+ this only applies to user-supplied source documents, if you
+ change settings in <code>project.xml</code>,
<code>navigation.xml</code>
+ or any other properties- or configuration file, you should
+ generate the site from scratch to make sure all cross-links
+ are correct. Defaults to <code>false</code>.
</td>
</tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]