props.put( "reports", "<menu ref=\"reports\"/>\n" );
props.put( "modules", "<menu ref=\"modules\"/>\n" );
MavenProject parentProject = getParentProject( project, reactorProjects, localRepository );
DecorationModel decorationModel =
getDecorationModel( project, parentProject, reactorProjects, localRepository, repositories, siteDirectory,
llocale, props );
if ( decorationModel == null )
{
String siteDescriptorContent;
InputStream in = null;
try
{
// Note the default is not a super class - it is used when nothing else is found
in = getClass().getResourceAsStream( "/default-site.xml" );
siteDescriptorContent = IOUtil.toString( in, "UTF-8" );
}
catch ( IOException e )
{
throw new SiteToolException( "Error reading default site descriptor: " + e.getMessage(), e );
}
finally
{
IOUtil.close( in );
}
siteDescriptorContent = getInterpolatedSiteDescriptorContent( props, project, siteDescriptorContent );
decorationModel = readDecorationModel( siteDescriptorContent );
}
if ( parentProject != null )
{
populateParentMenu( decorationModel, llocale, project, parentProject, true );
}
populateModulesMenu( project, reactorProjects, localRepository, decorationModel, llocale, true );
if ( decorationModel.getBannerLeft() == null )
{
// extra default to set
Banner banner = new Banner();
banner.setName( project.getName() );
decorationModel.setBannerLeft( banner );
}
return decorationModel;
}