maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1722255 - in /maven/plugins/trunk/maven-site-plugin/src/it: MSITE-550/ template/ template/pom.xml template/src/site/site.vm template/verify.bsh
Date Wed, 30 Dec 2015 01:10:42 GMT
Author: hboutemy
Date: Wed Dec 30 01:10:42 2015
New Revision: 1722255

URL: http://svn.apache.org/viewvc?rev=1722255&view=rev
Log:
[DOXIASITETOOLS-67] test Velocity context for template

Added:
    maven/plugins/trunk/maven-site-plugin/src/it/template/
      - copied from r1722197, maven/plugins/trunk/maven-site-plugin/src/it/MSITE-550/
Removed:
    maven/plugins/trunk/maven-site-plugin/src/it/MSITE-550/
Modified:
    maven/plugins/trunk/maven-site-plugin/src/it/template/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/template/src/site/site.vm
    maven/plugins/trunk/maven-site-plugin/src/it/template/verify.bsh

Modified: maven/plugins/trunk/maven-site-plugin/src/it/template/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/template/pom.xml?rev=1722255&r1=1722197&r2=1722255&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/template/pom.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/template/pom.xml Wed Dec 30 01:10:42 2015
@@ -24,12 +24,12 @@ under the License.
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>test</groupId>
-  <artifactId>MSITE-550</artifactId>
+  <artifactId>template-velocity</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
-  <name>MSITE-550 Velocity attributes</name>
-  <description>Test Velocity attributes, ie attributes parameter of site:site</description>
+  <name>Check template Velocity context, particularly MSITE-550 regarding attributes</name>
+  <description>Test Velocity context for template, ie attributes parameter of site:site</description>
 
   <properties>
     <dummy>value</dummy>

Modified: maven/plugins/trunk/maven-site-plugin/src/it/template/src/site/site.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/template/src/site/site.vm?rev=1722255&r1=1722197&r2=1722255&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/template/src/site/site.vm (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/template/src/site/site.vm Wed Dec 30 01:10:42
2015
@@ -1,3 +1,4 @@
+<html>
 ## Licensed to the Apache Software Foundation (ASF) under one
 ## or more contributor license agreements.  See the NOTICE file
 ## distributed with this work for additional information
@@ -14,35 +15,76 @@
 ## KIND, either express or implied.  See the License for the
 ## specific language governing permissions and limitations
 ## under the License.
+<head></head>
+<body>
 
-======================================================================
-====== default variables defined by doxia-siterenderer
-======================================================================
-relativePath=$relativePath
-authors=$authors
-title=$title
-dateCreation=$dateCreation
-dateRevision=$dateRevision
+<h1>variables available in templates' Velocity context</h1>
+
+<p>Variables are prepared in template's Velocity context by <a href="http://maven.apache.org/doxia/doxia-sitetools/doxia-site-renderer/">doxia-siterenderer</a>.</p>
+
+<h2>default variables defined by doxia-siterenderer</h2>
+
+<h3>document variables</h3>
+<pre>
+alignedFileName=$alignedFileName
 currentDate=$currentDate
-dateFormat=$dateFormat
 currentFileName=$currentFileName
-alignedFileName=$alignedFileName
+dateFormat=$dateFormat
+dateRevision=$dateRevision
+doxiaSiteRendererVersion=$doxiaSiteRendererVersion
 locale=$locale
+publishDate=$publishDate
+relativePath=$relativePath
 supportedLocales=$supportedLocales
-PathTool=$PathTool
+decoration=$decoration
+</pre>
+
+<h3>tools</h3>
+<pre>
 FileUtils=$FileUtils
-StringUtils=$StringUtils
 i18n=$i18n
+PathTool=$PathTool
+StringUtils=$StringUtils
+</pre>
+
+<h3>Velocity Generic Tools</h3>
+<pre>
+alternator=$alternator
+convert=$convert
+date=$date
+display=$display
+esc=$esc
+field=$field
+loop=$loop
+math=$math
+number=$number
+render=$render
+text=$text
+sorter=$sorter
+xml=$xml
+context (cause NullPointerException)
+link (cause NullPointerException)
+</pre>
+
+<h3>Site template-specific variables</h3>
+<pre>
+authors=$authors
+dateCreation=$dateCreation
+shortTitle=$shortTitle
+title=$title
 headContent=$headContent
 bodyContent=$bodyContent
-decoration=$decoration
+</pre>
 
+<h2>default properties defined by maven-site-plugin</h2>
 
-======================================================================
-====== default properties defined by maven-site-plugin
-======================================================================
-project=$project
+<pre>
 inputEncoding=$inputEncoding
 outputEncoding=$outputEncoding
+project=$project
 (project property) dummy=$dummy
 (attribute defined in attributes parameter of site plugin) att1=$att1
+</pre>
+
+</body>
+</html>
\ No newline at end of file

Modified: maven/plugins/trunk/maven-site-plugin/src/it/template/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/template/verify.bsh?rev=1722255&r1=1722197&r2=1722255&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/template/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/template/verify.bsh Wed Dec 30 01:10:42 2015
@@ -34,7 +34,7 @@ try
 
     String content = FileUtils.fileRead( index, "UTF-8" );
     int index1 = content.indexOf( "dummy=value" );
-    int index2 = content.indexOf( "att1=val1" );
+    int index2 = content.indexOf( "att1=val1" ); // MSITE-550
 
     if ( index1 < 0 || index2 < 0 )
     {



Mime
View raw message