Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E69818564 for ; Wed, 30 Dec 2015 01:10:50 +0000 (UTC) Received: (qmail 30482 invoked by uid 500); 30 Dec 2015 01:10:50 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 30421 invoked by uid 500); 30 Dec 2015 01:10:50 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 30412 invoked by uid 99); 30 Dec 2015 01:10:50 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2015 01:10:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id EA1C3C0DBA for ; Wed, 30 Dec 2015 01:10:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.246 X-Spam-Level: * X-Spam-Status: No, score=1.246 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id GQ5sJUvvAb8H for ; Wed, 30 Dec 2015 01:10:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id A1EEC24C68 for ; Wed, 30 Dec 2015 01:10:44 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5090AE0479 for ; Wed, 30 Dec 2015 01:10:43 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 21DB53A0A9F for ; Wed, 30 Dec 2015 01:10:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@maven.apache.org From: hboutemy@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151230011043.21DB53A0A9F@svn01-us-west.apache.org> 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. 4.0.0 test - MSITE-550 + template-velocity 1.0-SNAPSHOT pom - MSITE-550 Velocity attributes - Test Velocity attributes, ie attributes parameter of site:site + Check template Velocity context, particularly MSITE-550 regarding attributes + Test Velocity context for template, ie attributes parameter of site:site value 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 @@ + ## 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. + + -====================================================================== -====== default variables defined by doxia-siterenderer -====================================================================== -relativePath=$relativePath -authors=$authors -title=$title -dateCreation=$dateCreation -dateRevision=$dateRevision +

variables available in templates' Velocity context

+ +

Variables are prepared in template's Velocity context by doxia-siterenderer.

+ +

default variables defined by doxia-siterenderer

+ +

document variables

+
+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
+
+ +

tools

+
 FileUtils=$FileUtils
-StringUtils=$StringUtils
 i18n=$i18n
+PathTool=$PathTool
+StringUtils=$StringUtils
+
+ +

Velocity Generic Tools

+
+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)
+
+ +

Site template-specific variables

+
+authors=$authors
+dateCreation=$dateCreation
+shortTitle=$shortTitle
+title=$title
 headContent=$headContent
 bodyContent=$bodyContent
-decoration=$decoration
+
+

default properties defined by maven-site-plugin

-====================================================================== -====== default properties defined by maven-site-plugin -====================================================================== -project=$project +
 inputEncoding=$inputEncoding
 outputEncoding=$outputEncoding
+project=$project
 (project property) dummy=$dummy
 (attribute defined in attributes parameter of site plugin) att1=$att1
+
+ + + \ 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 ) {