commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1075925 - /commons/proper/commons-skin/trunk/src/main/resources/META-INF/maven/site.vm
Date Tue, 01 Mar 2011 17:09:12 GMT
Author: sebb
Date: Tue Mar  1 17:09:11 2011
New Revision: 1075925

URL: http://svn.apache.org/viewvc?rev=1075925&view=rev
Log:
Add workround to allow $relativePath in site.xml URLs

Modified:
    commons/proper/commons-skin/trunk/src/main/resources/META-INF/maven/site.vm

Modified: commons/proper/commons-skin/trunk/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/commons/proper/commons-skin/trunk/src/main/resources/META-INF/maven/site.vm?rev=1075925&r1=1075924&r2=1075925&view=diff
==============================================================================
--- commons/proper/commons-skin/trunk/src/main/resources/META-INF/maven/site.vm (original)
+++ commons/proper/commons-skin/trunk/src/main/resources/META-INF/maven/site.vm Tue Mar  1
17:09:11 2011
@@ -486,15 +486,17 @@
     <meta http-equiv="Content-Language" content="$locale.language" />
 #end
     #if ( $decoration.body.head )
+      ## Workround to allow site.xml to use $relativePath in URLs
+      #set ( $rp = '$'+'relativePath' )
       #foreach( $item in $decoration.body.head.getChildren() )
         ## Workaround for DOXIA-150 due to a non-desired behaviour in p-u
         ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toString()
         ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toUnescapedString()
         #set ( $documentHeader = '<?xml version="1.0" encoding="UTF-8"?>' )
         #if ( $item.name == "script" )
-          $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" )
+          $StringUtils.replace( $StringUtils.replace( $item.toUnescapedString(), $documentHeader,
"" ), $rp , $relativePath )
         #else
-          $StringUtils.replace( $item.toString(), $documentHeader, "" )
+          $StringUtils.replace( $StringUtils.replace( $item.toString(), $documentHeader,
"" ), $rp , $relativePath )
         #end
       #end
     #end



Mime
View raw message