mirror of https://github.com/apache/maven.git
Upgraded to plexus-site-renderer-1.0-alpha-2 and corrected a NPE
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21e050e5fa
commit
5f412ebb40
|
@ -48,7 +48,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>plexus</groupId>
|
<groupId>plexus</groupId>
|
||||||
<artifactId>plexus-site-renderer</artifactId>
|
<artifactId>plexus-site-renderer</artifactId>
|
||||||
<version>1.0-alpha-1</version>
|
<version>1.0-alpha-2-20050715.080727-2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
<groupId>org.apache.maven.wagon</groupId>
|
||||||
|
|
|
@ -548,6 +548,11 @@ public class DoxiaMojo
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ( ( directories == null ) || ( directories.length == 0 ) )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
List indexFound = new ArrayList();
|
List indexFound = new ArrayList();
|
||||||
for ( int i = 0; i < directories.length; i++ )
|
for ( int i = 0; i < directories.length; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,28 +39,27 @@
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
#macro ( displayTree $display $item)
|
||||||
|
#if ( $item.getChildren() && $item.getChildCount() > 0 )
|
||||||
|
#foreach( $subitem in $item.getChildren() )
|
||||||
|
#set ( $subitemHref = $PathTool.calculateLink( $subitem.getAttribute( "href" ), $relativePath ) )
|
||||||
|
#set ( $subitemHref = $$subitemHref.replaceAll( "\\", "/" ) )
|
||||||
|
|
||||||
|
#if ( $currentFileName == $subitemHref )
|
||||||
|
#set ( $display = true )
|
||||||
|
#end
|
||||||
|
|
||||||
|
#displayTree($display $subitem)
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
#macro ( menuItem $item )
|
#macro ( menuItem $item )
|
||||||
#set ( $collapse = "none" )
|
#set ( $collapse = "none" )
|
||||||
#set ( $currentItemHref = $PathTool.calculateLink( $item.getAttribute( "href" ), $relativePath ) )
|
#set ( $currentItemHref = $PathTool.calculateLink( $item.getAttribute( "href" ), $relativePath ) )
|
||||||
#set ( $currentFileName = $currentFileName.replaceAll( "\\", "/" ) )
|
#set ( $currentFileName = $currentFileName.replaceAll( "\\", "/" ) )
|
||||||
#set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
|
#set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
|
||||||
|
|
||||||
#set ( $currentFileNameLastSlash = $currentFileName.lastIndexOf( "/" ) )
|
|
||||||
#if ( $currentFileNameLastSlash != -1)
|
|
||||||
#set ( $currentFileNameTmp = $currentFileName.substring( 0, $currentFileNameLastSlash ) )
|
|
||||||
#else
|
|
||||||
#set ( $currentFileNameTmp = $currentFileName.substring( 0, $currentFileName.lengh() ) )
|
|
||||||
#end
|
|
||||||
|
|
||||||
#set ( $currentItemHrefLastSlash = $currentItemHref.lastIndexOf( "/" ) )
|
|
||||||
#if ( $currentItemHrefLastSlash != -1)
|
|
||||||
#set ( $currentItemHrefTmp = $currentItemHref.substring( 0, $currentItemHrefLastSlash ) )
|
|
||||||
#else
|
|
||||||
#set ( $currentItemHrefTmp = $currentItemHref.substring( 0, $currentItemHref.lengh() ) )
|
|
||||||
#end
|
|
||||||
|
|
||||||
#set ( $tree = $currentFileNameTmp && $currentItemHrefTmp && $currentFileNameTmp.startsWith( $currentItemHrefTmp ) )
|
|
||||||
|
|
||||||
#if ( $item.getChildCount() > 0 )
|
#if ( $item.getChildCount() > 0 )
|
||||||
#if ( ( $item.getAttribute( "collapse" ) ) && ( $item.getAttribute( "collapse" ).equalsIgnoreCase( "false" ) ) )
|
#if ( ( $item.getAttribute( "collapse" ) ) && ( $item.getAttribute( "collapse" ).equalsIgnoreCase( "false" ) ) )
|
||||||
#set ( $collapse = "expanded" )
|
#set ( $collapse = "expanded" )
|
||||||
|
@ -72,21 +71,20 @@
|
||||||
#if ( $currentFileName == $currentItemHref )
|
#if ( $currentFileName == $currentItemHref )
|
||||||
#set ( $collapse = "expanded" )
|
#set ( $collapse = "expanded" )
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#if ( $tree )
|
|
||||||
#set ( $collapse = "expanded" )
|
|
||||||
#end
|
#end
|
||||||
#end
|
<li class="$collapse">
|
||||||
<li class="$collapse" $currentFileName $currentItemHref>
|
|
||||||
#if ( $currentFileName == $currentItemHref )
|
#if ( $currentFileName == $currentItemHref )
|
||||||
<strong><a href="$currentItemHref">$item.getAttribute( "name" )</a></strong>
|
<strong><a href="$currentItemHref">$item.getAttribute( "name" )</a></strong>
|
||||||
#else
|
#else
|
||||||
<a href="$currentItemHref">$item.getAttribute( "name" )</a>
|
<a href="$currentItemHref">$item.getAttribute( "name" )</a>
|
||||||
#end
|
#end
|
||||||
</li>
|
</li>
|
||||||
#if ( $item.getChildren() )
|
#if ( $item.getChildren() && $item.getChildCount() > 0 )
|
||||||
#if ( $item.getChildCount() > 0 )
|
#set ( $display = false )
|
||||||
#if ( $collapse == "expanded" || $tree )
|
#set ( $itemTmp = $item )
|
||||||
|
#displayTree($display $itemTmp)
|
||||||
|
|
||||||
|
#if ( $collapse == "expanded" || $display )
|
||||||
<ul>
|
<ul>
|
||||||
#foreach( $subitem in $item.getChildren() )
|
#foreach( $subitem in $item.getChildren() )
|
||||||
#menuItem( $subitem )
|
#menuItem( $subitem )
|
||||||
|
@ -95,7 +93,6 @@
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
|
||||||
|
|
||||||
#macro ( mainMenu )
|
#macro ( mainMenu )
|
||||||
#set ( $menus = $siteDescriptor.getChild( "body" ).getChildren( "menu" ) )
|
#set ( $menus = $siteDescriptor.getChild( "body" ).getChildren( "menu" ) )
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
Site Plugin Index
|
Site Plugin Index
|
||||||
|
|
||||||
From /theta/index.apt
|
From /gamma/index.apt
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
Site Plugin Index
|
Site Plugin Index
|
||||||
|
|
||||||
From /theta/two/index.apt
|
From /gamma/two/index.apt
|
||||||
|
|
Loading…
Reference in New Issue