You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2006/09/14 00:16:07 UTC
svn commit: r443145 - in /logging/log4j/branches/v1_2-branch:
build.properties.sample build.xml docs/HISTORY.txt docs/css/
docs/css/site.css src/xdocs/download.xml src/xdocs/stylesheets/site.vsl
Author: carnold
Date: Wed Sep 13 15:16:06 2006
New Revision: 443145
URL: http://svn.apache.org/viewvc?view=rev&rev=443145
Log:
Bug 37960: Update site generation to Velocity 1.4
Added:
logging/log4j/branches/v1_2-branch/docs/css/
logging/log4j/branches/v1_2-branch/docs/css/site.css
logging/log4j/branches/v1_2-branch/src/xdocs/stylesheets/site.vsl (with props)
Modified:
logging/log4j/branches/v1_2-branch/build.properties.sample
logging/log4j/branches/v1_2-branch/build.xml
logging/log4j/branches/v1_2-branch/docs/HISTORY.txt
logging/log4j/branches/v1_2-branch/src/xdocs/download.xml
Modified: logging/log4j/branches/v1_2-branch/build.properties.sample
URL: http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/build.properties.sample?view=diff&rev=443145&r1=443144&r2=443145
==============================================================================
--- logging/log4j/branches/v1_2-branch/build.properties.sample (original)
+++ logging/log4j/branches/v1_2-branch/build.properties.sample Wed Sep 13 15:16:06 2006
@@ -32,6 +32,10 @@
# Required to run Checkstyle. Available from http://checkstyle.sf.net
checkstyle.jar=${lib.home.dir}/checkstyle-2.2/checkstyle-all-2.2.jar
-# The templates for the creation of the web-pages are inherited
-# from the parent project.
-logging-site=../logging-site
\ No newline at end of file
+# Velocity's Anakia task is used in the generation of the documentation
+# download from http://jakarta.apache.org
+velocity.jar=${lib.home.dir}/velocity-1.4/velocity-dep-1.4.jar
+# Velocity's Anakia task requires JDOM,
+# but Velocity 1.4 is not compatible with JDOM 1.0, but beta 8 works okay
+# download for http://www.jdom.org/dist/binary/archive
+jdom.jar=${lib.home.dir}/jdom-b8/build/jdom.jar
Modified: logging/log4j/branches/v1_2-branch/build.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/build.xml?view=diff&rev=443145&r1=443144&r2=443145
==============================================================================
--- logging/log4j/branches/v1_2-branch/build.xml (original)
+++ logging/log4j/branches/v1_2-branch/build.xml Wed Sep 13 15:16:06 2006
@@ -89,9 +89,8 @@
<!-- Construct classpath for building the html pages-->
<path id="site.classpath">
- <fileset dir="${logging-site}/lib">
- <include name="*.jar"/>
- </fileset>
+ <pathelement location="${velocity.jar}"/>
+ <pathelement location="${jdom.jar}"/>
</path>
<!-- ================================================================= -->
@@ -538,10 +537,10 @@
</target>
<target name="checkSite" depends="prepareSite" unless="AnakiaTask.present">
- <echo>
+ <fail>
AnakiaTask is not present! Please check to make sure that
velocity.jar is in your classpath.
- </echo>
+ </fail>
</target>
<target name="clean-site">
@@ -561,7 +560,7 @@
</taskdef>
<mkdir dir="${docs.dest}/css"/>
- <copy file="${logging-site}/docs/css/site.css" tofile="${docs.dest}/css/site.css"/>
+ <copy file="docs/css/site.css" tofile="${docs.dest}/css/site.css"/>
<anakia basedir="${xdocs.src}" destdir="${docs.dest}/"
extension=".html"
@@ -570,7 +569,7 @@
excludes="**/stylesheets/**, empty.xml"
includes="**/*.xml"
lastModifiedCheck="true"
- templatePath="${logging-site}/src/xdocs/stylesheets">
+ templatePath="${xdocs.src}/stylesheets">
</anakia>
</target>
Modified: logging/log4j/branches/v1_2-branch/docs/HISTORY.txt
URL: http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/docs/HISTORY.txt?view=diff&rev=443145&r1=443144&r2=443145
==============================================================================
--- logging/log4j/branches/v1_2-branch/docs/HISTORY.txt (original)
+++ logging/log4j/branches/v1_2-branch/docs/HISTORY.txt Wed Sep 13 15:16:06 2006
@@ -37,6 +37,7 @@
40412: NOTICE file added to distribution and jars.
40378: Chainsaw of log4j 1.2 does not show TRACE level.
40501: TRACE level missing in short introduction to log4j.
+ 37960: Update site generation to velocity 1.4 and remove dependency on logging/site project.
December 4th, 2005
Added: logging/log4j/branches/v1_2-branch/docs/css/site.css
URL: http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/docs/css/site.css?view=auto&rev=443145
==============================================================================
--- logging/log4j/branches/v1_2-branch/docs/css/site.css (added)
+++ logging/log4j/branches/v1_2-branch/docs/css/site.css Wed Sep 13 15:16:06 2006
@@ -0,0 +1,140 @@
+
+H1, H2, H3 {
+ color: #101099;
+}
+
+A:link, A:visited {
+ text-decoration: none;
+ color: #006699;
+}
+
+A:link:hover {
+ text-decoration: underline;
+}
+
+.centercol {
+ margin-top: 120px;
+ margin-left: 210px;
+ margin-right:210px;
+ max-width: 800px;
+}
+
+.leftcol {
+ position: absolute;
+ left: 10px;
+ top: 130px;
+ width: 190px;
+}
+
+.banner {
+ position: absolute;
+ left: 10px;
+ top: 10px;
+ height: 130px;
+ width: 1000px;
+}
+
+.menu_header, .menu_item {
+/* width: 190px; */
+ font-family: "trebuchet MS", Arial, Helvetica, sans-serif;
+ font-size: smaller;
+}
+
+.menu_header {
+ border:1px solid #AAAAAA;
+ background: #CCCCCC;
+ padding-left: 1ex;
+}
+
+.menu_item:hover {
+ background: #DDD;
+}
+
+.menu_item {
+ background: #EEEEEE;
+ padding-left: 2ex;
+ border-top: 0px solid #AAAAAA;
+ border-right: 1px solid #AAAAAA;
+ border-bottom:1px solid #AAAAAA;
+ border-left: 1px solid #AAAAAA;
+}
+
+.source {
+ border-top: 1px solid #DDDDDD;
+ border-bottom: 1px solid #DDDDDD;
+ background:#eee;
+ font-family: Courier, "MS Courier New", Prestige, Everson Monocourrier, monospace;
+ font-size: smaller;
+ padding-bottom: 0.5ex;
+ padding-top: 0.5ex;
+ padding-left: 2ex;
+}
+
+table.ls {
+ background: #FFFFFF;
+}
+table.ls td {
+ background: #f4f4f4;
+ vertical-align: top;
+ padding-bottom: 1ex;
+}
+
+table.ls th {
+ background: #E4E4E4;
+}
+
+.index-faqSection {
+ font-size: larger;
+ padding-left: 0em;
+ font-weight: bolder;
+}
+.index-question {
+ padding-left: 1em;
+}
+
+.faqSection {
+ font-size: larger;
+ font-weight: bolder;
+}
+
+.question {
+ font-weight: bolder;
+}
+
+/* this class is used for screen output placed in <pre></pre> tags */
+.screen_output {
+ padding-left: 1em;
+ padding-right: 1em;
+ border-top: 1px solid #AAAAAA;
+ border-right: 1px solid #AAAAAA;
+ border-bottom:1px solid #AAAAAA;
+ border-left: 1px solid #AAAAAA;
+}
+
+
+.big {
+ font-size: larger;
+ font-weight: bold;
+}
+
+.small {
+ font-size: smaller;
+}
+
+.red {
+ color: #AA0000;
+}
+
+.msg_title {
+ padding-left: 1ex;
+ padding-right: 1ex;
+ font-family: Courier, "MS Courier New", Prestige, Everson Monocourrier, monospace;
+ border: 1px solid #AAAAAA;
+ background: #DDDDFF;
+
+}
+
+.msg_meaning {
+ padding-left: 1em;
+ padding-right: 1em;
+}
Modified: logging/log4j/branches/v1_2-branch/src/xdocs/download.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/xdocs/download.xml?view=diff&rev=443145&r1=443144&r2=443145
==============================================================================
--- logging/log4j/branches/v1_2-branch/src/xdocs/download.xml (original)
+++ logging/log4j/branches/v1_2-branch/src/xdocs/download.xml Wed Sep 13 15:16:06 2006
@@ -47,7 +47,8 @@
</li><li><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=23021">23021</a>: AsyncAppender blocks on thread death.
</li><li><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=40412">40412</a>: NOTICE file added to distribution and jar.
</li><li><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=40378">40378</a>: Chainsaw of log4j 1.2 does not show TRACE level.
- </li><li><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=40378">40501</a>: TRACE level missing in short introduction to log4j.
+ </li><li><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=40501">40501</a>: TRACE level missing in short introduction to log4j.
+ </li><li><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37960">37960</a>: Update site generation to velocity 1.4 and remove dependency on logging/site project.
</li></ul>
</li>
</ul>
Added: logging/log4j/branches/v1_2-branch/src/xdocs/stylesheets/site.vsl
URL: http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/xdocs/stylesheets/site.vsl?view=auto&rev=443145
==============================================================================
--- logging/log4j/branches/v1_2-branch/src/xdocs/stylesheets/site.vsl (added)
+++ logging/log4j/branches/v1_2-branch/src/xdocs/stylesheets/site.vsl Wed Sep 13 15:16:06 2006
@@ -0,0 +1,318 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!-- Content Stylesheet for Site -->
+
+ ## Defined variables
+ #set ($bodybg = "#ffffff")
+ #set ($bodyfg = "#000000")
+ #set ($bodylink = "#525D76")
+
+ #set ($titlebg = "#FFFFFF")
+ #set ($titlefg = "#2222AA")
+
+ #set ($bannerbg = "#FFFFFF")
+ #set ($bannerfg = "#2222AA")
+
+ #set ($subbannerbg = "#828DA6")
+ #set ($subbannerfg = "#ffffff")
+
+<!-- start the processing -->
+#document()
+<!-- end the processing -->
+
+## This is where the macro's live
+
+#macro ( projectanchor $name $value )
+ #if ($value.startsWith("http://"))
+ <a href="$value">$name</a>
+ #else
+ <a href="$relativePath$value">$name</a>
+ #end
+#end
+
+#macro ( metaauthor $author $email )
+ <meta name="author" value="$author">
+ <meta name="email" value="$email">
+#end
+
+#macro ( image $value )
+#if ($value.getAttributeValue("width"))
+#set ($width=$value.getAttributeValue("width"))
+#end
+#if ($value.getAttributeValue("height"))
+#set ($height=$value.getAttributeValue("height"))
+#end
+#if ($value.getAttributeValue("align"))
+#set ($align=$value.getAttributeValue("align"))
+#end
+<img src="$relativePath$value.getAttributeValue("src")" width="$!width" height="$!height" align="$!align">
+#end
+
+## ============================================
+## subsection macro
+## ============================================
+#macro ( subsection $subsection)
+ <h3>$subsection.getAttributeValue("name")</strong></h3>
+ #foreach ( $items in $subsection.getChildren() )
+ #if ($items.getName().equals("img"))
+ #image ($items)
+ #elseif ($items.getName().equals("source"))
+ #source ($items)
+ ## #elseif ($items.getName().equals("table"))
+ ## #table ($items)
+ #else
+ $items
+ #end
+ #end
+#end
+
+## ===================================
+## titleSection macro
+## ===================================
+#macro ( titleSection $titleSection)
+ <font size="+2" color="$titlefg"><b>$titleSection.getAttributeValue("name")</b></font>
+#end
+
+## ================================
+## section macro
+## ================================
+#macro ( section $section)
+ <h1>$section.getAttributeValue("name")</strong></h1>
+ #foreach ( $items in $section.getChildren() )
+ #if ($items.getName().equals("img"))
+ #image ($items)
+ #elseif ($items.getName().equals("source"))
+ #source ($items)
+ ##elseif ($items.getName().equals("table"))
+ ## #table ($items)
+ #elseif ($items.getName().equals("subsection"))
+ #subsection ($items)
+ #else
+ $items
+ #end
+ #end
+#end
+
+## ===================================
+## make navigation bar
+## ===================================
+
+#macro ( makeNavigationBar )
+ <!-- ============================================================ -->
+ <div class="leftcol">
+ #set ($menus = $project.getChild("body").getChildren("menu"))
+ #foreach ( $menu in $menus )
+ <div class="menu_header">$menu.getAttributeValue("name")</div>
+ #foreach ($item in $menu.getChildren() )
+ #set ($name = $item.getAttributeValue("name"))
+ <div class="menu_item">#projectanchor($name $item.getAttributeValue("href"))</div>
+ #end
+ #end
+ </div>
+
+#end
+
+## ====================================
+## getProjectImage
+## ====================================
+#macro (getProjectImage)
+ ##<div class="banner">
+ ##<table class="banner" width="100%" border="0">
+ <table class="banner" border="0">
+ <tr>
+ <td valign="top">
+ <a href="http://logging.apache.org/">
+ <img src="http://logging.apache.org/images/ls-logo.jpg" border="0"/>
+ </a>
+ <td align="right">
+ #if ($project.getChild("logo"))
+ #set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
+ #if ( $logoString.startsWith("/") )
+ <a href="$project.getAttributeValue("href")">
+ <img src="$relativePath$logoString"
+ alt="$project.getChild("logo").getText()" border="0"/>
+ </a>
+ #else
+ <a href="$project.getAttributeValue("href")">
+ <img src="$relativePath/$logoString" alt="$project.getChild("logo").getText()" border="0"/>
+ </a>
+ #end
+ #end
+ </td>
+ </tr>
+ </table>
+ ##</div>
+#end
+
+#macro (printMeta $metaElement)
+<meta #set ($attribs = $metaElement.getAttributes())
+#foreach ($a in $attribs) $a.getName()="$a.getValue()" #end />
+#end
+
+#macro (faqIndex $root)
+
+ #set( $section = 1 )
+
+ #foreach ( $s in $root.getChild("body").getChildren() )
+ #if ($s.getName().equals("faqSection"))
+ #set( $counter = 1 )
+ <br/>
+ <div class="index-faqSection">
+ Section $section. <a href="#$section"> $s.getChild("title").getContent()</a>
+ </div>
+
+ #foreach ( $q in $s.getChildren() )
+ #if ($q.getName().equals("question"))
+ <table class="index-question">
+ <td nowrap="true" valign="top">Question $section.$counter</td>
+ <td><a href="#$section.$counter">$q.getChild("title").getContent()</a></td>
+ </table>
+ #set( $counter = $counter + 1 )
+ #end
+ #end
+ #set( $section = $section + 1 )
+ #end
+ #end
+#end
+
+#macro (faqContents $root)
+ <hr/>
+
+ #set( $section = 1 )
+
+ #foreach ( $s in $root.getChild("body").getChildren() )
+ #if ($s.getName().equals("faqSection"))
+ #set( $counter = 1 )
+ <div class="faqSection">
+ <a name="$section">Section $section.</a> $s.getChild("title").getContent()
+ </div>
+ #foreach ( $i in $s.getChildren() )
+ #if ($i.getName().equals("question"))
+ <div class="question">
+ <a name="$section.$counter">$section.$counter $i.getChild("title").getContent()</a>
+ </div>
+ #set( $counter = $counter + 1 )
+ $i.getChild("answer").getContent()
+ #elseif ($i.getName().equals("text"))
+ $i.getContent()
+ #end
+ #end
+ #set( $section = $section + 1 )
+ #end
+ #end
+#end
+
+
+#macro (messages $root)
+ #foreach ( $m in $root.getChild("body").getChildren() )
+ #if ($m.getName().equals("message"))
+ <div class="big">
+ <a name="$m.getAttributeValue('ref')">
+ <table>
+ <tr>
+ <td valign="top"><b>Message:</b></td>
+ <td class="msg_title">$m.getChild("title").getContent()</td>
+ </tr>
+ </table>
+ </a>
+ </div>
+ <div class="msg_meaning">
+ $m.getChild("explanation").getContent()
+ </div>
+ #end
+ #end
+#end
+
+#macro (document)
+ #set ($properties = $root.getChild("properties") )
+ <!-- ====================================================================== -->
+ <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
+ <!-- Main Page Section -->
+ <!-- ====================================================================== -->
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+
+ #set ($authors = $properties.getChildren("author"))
+ #foreach ( $au in $authors )
+ #metaauthor ( $au.getText() $au.getAttributeValue("email") )
+ #end
+
+ #set ($metas = $root.getChildren("meta"))
+
+ ## Parse meta directives such as
+ ## <meta name="keyword" content="jakarta, java"/>
+ #foreach ($meta in $metas) #printMeta($meta) #end
+
+ ## Support for <base> tags.
+ #if ($properties.getChild("base"))
+ #set ($url = $properties.getChild("base").getAttributeValue("href"))
+ <base href="$url"/>
+ #end
+
+ <link href="$relativePath/css/site.css" rel="stylesheet" type="text/css"/>
+ #set ($links = $properties.getChildren("link"))
+ #foreach ( $l in $links )
+ <link href="$l.getAttributeValue("href")" rel="stylesheet" type="text/css"/>
+ #end
+
+
+ <title>$project.getChild("title").getText() - $properties.getChild("title").getText()</title>
+ </head>
+
+ <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
+ <!-- START Header table -->
+ #getProjectImage()
+ <!-- END Header table -->
+
+ <div class="centercol">
+ <hr noshade="" size="1"/>
+
+ #foreach ( $item in $root.getChild("body").getChildren() )
+ #if ($item.getName().equals("img"))
+ #image ($item)
+ #elseif ($item.getName().equals("section"))
+ #section ($item)
+ #elseif ($item.getName().equals("faqSection"))
+ ## do nothing, we'll handle the faq later
+ #elseif ($item.getName().equals("message"))
+ ## do nothing, we'll handle the faq later
+ #else
+ $item
+ #end
+ #end
+
+ #faqIndex ($root)
+ #faqContents ($root)
+ #messages ($root)
+
+## #if ($root.getChild("body").getChild("titleSection"))
+## #set ($titleSection = $root.getChild("body").getChild("titleSection"))
+## #titleSection($titleSection)
+## #end
+##
+## #set ($allSections = $root.getChild("body").getChildren("section"))
+## #foreach ( $section in $allSections )
+## #section ($section)
+## #end
+
+
+ <!-- FOOTER -->
+ <div align="center"><font color="$bodylink" size="-1"><em>
+ Copyright © 1999-2006, Apache Software Foundation.<br />
+Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+ </em></font></div>
+
+ <!-- END main table -->
+
+ <!-- LEFT SIDE NAVIGATION -->
+ #makeNavigationBar()
+
+ </body>
+ </html>
+#end
+
+
+
+
+
Propchange: logging/log4j/branches/v1_2-branch/src/xdocs/stylesheets/site.vsl
------------------------------------------------------------------------------
svn:executable = *
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org