Refactor the maven-site.vm: added a macro to handle the copyright

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@226349 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vincent Siveton 2005-07-29 11:49:47 +00:00
parent 2b8143ef42
commit 674bfaa0f4
1 changed files with 21 additions and 19 deletions

View File

@ -106,6 +106,26 @@
#end
#end
#macro ( copyright )
#if ( $project )
#set ( $currentYear = ${currentDate.year} + 1900 )
#if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) )
${project.inceptionYear}-${currentYear}
#else
${currentYear}
#end
#if ( ${project.organization} && ${project.organization.name} )
${project.organization.name}
#else
Apache Software Foundation
#end
#else
2002-2005, Apache Software Foundation
#end
#end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
@ -151,25 +171,7 @@
<hr/>
</div>
<div id="footer">
<div class="xright">&#169;
#if ( $project )
#set ( $currentYear = ${currentDate.year} + 1900 )
#if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) )
${project.inceptionYear}-${currentYear}
#else
${currentYear}
#end
#if ( ${project.organization} && ${project.organization.name} )
${project.organization.name}
#else
Apache Software Foundation
#end
#else
2002-2005, Apache Software Foundation
#end
</div>
<div class="xright">&#169;#copyright()</div>
<div class="clear">
<hr/>
</div>