diff --git a/maven-plugins/maven-site-plugin/src/main/resources/org/apache/maven/plugins/site/maven-site.vm b/maven-plugins/maven-site-plugin/src/main/resources/org/apache/maven/plugins/site/maven-site.vm index 4c2234b029..470ac12b4f 100644 --- a/maven-plugins/maven-site-plugin/src/main/resources/org/apache/maven/plugins/site/maven-site.vm +++ b/maven-plugins/maven-site-plugin/src/main/resources/org/apache/maven/plugins/site/maven-site.vm @@ -10,6 +10,10 @@ #if( $e.getChild( "src" ) ) #set ( $src = $e.getChild( "src" ).getValue() ) + #if ( ! ( $src.toLowerCase().startsWith("http") || $src.toLowerCase().startsWith("https") ) ) + #set ( $src = $PathTool.calculateLink( $src, $relativePath ) ) + #set ( $src = $src.replaceAll( "\\", "/" ) ) + #end #if ( $e.getChild( "alt" ) ) #set ( $alt = $e.getChild( "alt" ).getValue() ) #else @@ -25,7 +29,7 @@ #else #end - #end + #end #end #macro ( links ) @@ -35,7 +39,7 @@ #set ( $counter = $counter + 1 ) $item.getAttribute( "name" ) #if ( $links.getChildCount() > $counter ) - | + | #end #end #end @@ -46,15 +50,15 @@ #set ( $subitemHref = $PathTool.calculateLink( $subitem.getAttribute( "href" ), $relativePath ) ) #set ( $subitemHref = $subitemHref.replaceAll( "\\", "/" ) ) - #if ( $currentFileName == $subitemHref ) + #if ( $currentFileName == $subitemHref ) #set ( $display = true ) #end - + #displayTree( $display $subitem ) #end #end #end - + #macro ( menuItem $item ) #set ( $collapse = "none" ) #set ( $currentItemHref = $PathTool.calculateLink( $item.getAttribute( "href" ), $relativePath ) ) @@ -68,13 +72,13 @@ ## By default collapsed #set ( $collapse = "collapsed" ) #end - - #if ( $currentFileName == $currentItemHref ) + + #if ( $currentFileName == $currentItemHref ) #set ( $collapse = "expanded" ) #end #end