Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
HIVE-1135. Use Anakia for version controlled documentation
Browse files Browse the repository at this point in the history
(Edward Capriolo via jvs)



git-svn-id: https://svn.apache.org/repos/asf/hadoop/hive/trunk@959481 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
John Sichi committed Jul 1, 2010
1 parent 4679649 commit 533504c
Show file tree
Hide file tree
Showing 13 changed files with 1,280 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -259,6 +259,9 @@ Release 0.6.0 - Unreleased
HIVE-1359. Unit test should be shim-aware
(Ning Zhang via jvs)

HIVE-1135. Use Anakia for version controlled documentation
(Edward Capriolo via jvs)

OPTIMIZATIONS

HIVE-1348. Move inputFileChanged() from ExecMapper to where it is needed
Expand Down
8 changes: 8 additions & 0 deletions build-common.xml
Expand Up @@ -179,6 +179,14 @@
pattern="${build.dir.hadoop}/[artifact]-[revision].[ext]"/>
</target>

<target name="ivy-docs" depends="ivy-init"
description="Resolve, Retrieve Ivy-managed artifacts for docs configuration">
<ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="docs"/>
<ivy:retrieve settingsRef="${ant.project.name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" conf="docs"/>
<ivy:cachepath pathid="docs-classpath" conf="docs"/>
</target>

<available property="hadoopcore.${hadoop.version.ant-internal}.install.done"
file="${build.dir.hadoop}/hadoop-${hadoop.version.ant-internal}.installed"/>

Expand Down
32 changes: 31 additions & 1 deletion build.xml
Expand Up @@ -36,6 +36,8 @@
<property name="build.docs" value="${target.dir}/docs"/>
<property name="build.javadoc" value="${build.docs}/api"/>
<property name="docs.src" value="${hive.root}/docs"/>
<property name="anakia.docs.src" value="${docs.src}/xdocs"/>
<property name="anakia.docs.dest" value="${target.dir}/docs"/>
<property name="changes.src" value="${docs.src}/changes"/>
<property name="images.src" value="${docs.src}/images"/>
<property name="javadoc.link.java"
Expand Down Expand Up @@ -388,8 +390,9 @@
<!-- Documentation -->
<!-- ================================================================== -->

<target name="docs">
<target name="docs" description="Generate documentation">
<antcall target="changes-to-html"/>
<antcall target="docs-anakia"/>
</target>

<target name="changes-to-html" description="Convert CHANGES.txt into an html file">
Expand Down Expand Up @@ -552,4 +555,31 @@
</available>
</target>

<target name="docs-anakia" depends="ivy-docs">
<echo message="Building xdocs with anakia"/>
<mkdir dir="${build.dir.hive}/docs"/>
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
<classpath refid="common-classpath"/>
<classpath refid="docs-classpath"/>
</taskdef>
<anakia basedir="${anakia.docs.src}" destdir="${anakia.docs.dest}"
extension=".html" style="./docs/stylesheets/site.vsl"
projectFile="../stylesheets/project.xml"
excludes="**/stylesheets/**"
includes="**/*.xml"
lastModifiedCheck="false"
velocityPropertiesFile="${docs.src}/velocity.properties">
</anakia>
<copy todir="${anakia.docs.dest}/images" filtering="no">
<fileset dir="${docs.src}/images">
<include name="**/*.gif"/>
<include name="**/*.jpeg"/>
<include name="**/*.jpg"/>
<include name="**/*.png"/>
</fileset>
</copy>
<copy file="${docs.src}/site.css" tofile="${anakia.docs.dest}/site.css" />
</target>


</project>
305 changes: 305 additions & 0 deletions docs/site.css
@@ -0,0 +1,305 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/


/** defined standard tags **/
body {
background-color: #ffffff;
color: #000000;
}

a:link, a:active, a:visited {
color: #525D76;
}


h1 {
background-color: #525D76;
color: #ffffff;
font-family: arial,helvetica,sanserif;
font-size: large;
padding-left:2px;
}

h2 {
background-color: #828DA6;
color: #ffffff;
font-family: arial,helvetica,sanserif;
font-size: medium;
padding-left:2px;
}

table {
border: none;
border-spacing:0px;
border-collapse: collapse;
}

img {
border: none 0px;
}

/** define layout **/

/** table used to force footer to end of page **/
table#layout {
width:100%;
}

table#layout td {
padding:0px;
}

div#container {
width: 95%;
margin: 10px;
margin-left: 0;
margin-right: auto;
padding: 10px;
}

div#header {
padding: 5px;
margin: 0px;
margin-top:5px;
margin-bottom:5px;
height:80px;
border-bottom: 1px solid #333333;
}

div#menu {
float: left;
width: 200px;
margin: 0;
margin-left: 0px;
margin-right: 5px;

/** little higher margin since it doesn't start with a header **/
margin-top:10px;
margin-bottom:0px;

padding: 5px;
}

div#body {
margin-right:0px;
margin-left: 215px;
margin-top:5px;
margin-bottom:0px;

padding: 5px;

}

div#footer {

clear: both;

padding-top:15px;
margin-top:25px;
border-top: 1px solid #333333;


text-align:center;
color: #525D76;
font-style: italic;
font-size: smaller;
}

div#logo1 {
float:left;
margin-left:5px;
margin-top:10px;
}


div#logo2 {
float:right;
margin-top:10px;
}


/** define body tag redefinitions **/


div#body th {
background-color: #039acc;
color: #000000;
font-family: arial,helvetica,sanserif;
font-size: smaller;
vertical-align: top;
text-align:left;
border:1px #FFFFFF solid;
padding: 2px;
}

div#body td {
background-color: #a0ddf0;
color: #000000;
font-family: arial,helvetica,sanserif;
font-size: smaller;
vertical-align: top;
text-align:left;
border:1px #FFFFFF solid;
padding: 2px;
}


div#body li {
margin-top:3px;
}

/** define other body styles **/

div.section {
margin-left: 25px;
}

div.subsection {
margin-left: 25px;
}

div.source {
margin-left:25px;
margin-top:20px;
margin-bottom:20px;
padding-left:4px;
padding-right:4px;
padding-bottom:4px;
padding-top:5px;

width:600;

border: 1px solid #333333;
background-color: #EEEEEE;
color: #333333;

/** bug: puts a extra line before the block in IE and after the block in FireFox **/
white-space: pre;

font-family: Courier;
font-size: smaller;
text-align: left;

overflow:auto;
}


div.license {
margin-left:0px;
margin-top:20px;
margin-bottom:20px;
padding:5px;

border: 1px solid #333333;
background-color: #EEEEEE;
color: #333333;

text-align: left;
}

/** define menu styles **/

div.menusection {
margin-bottom:10px;
}

.menuheader {
font-weight:bold;
margin-bottom:0px;
}

div.menusection ul {
margin-top:5px;

}
div.menusection li {

}




/** printing **/
@page Section1
{
size:8.5in 11.0in;
margin:1.0in .75in 1.0in .75in;
}

@media print {

/** make sure this fits the page **/
div#container {
width:100%;
min-height:0px;
}


div#menu {
display:none;
}

div#header {
display:none;
}

div#body {
margin-left:5px;
}


div.source {
width:95%;
margin-left:0px;
}

/** make a bit more room on the page **/
div.section {
margin-left: 0px;
}

div.subsection {
margin-left: 0px;
}

h1 {
background-color: #FFFFFF;
color: #000000;
}

h2 {
background-color: #FFFFFF;
color: #000000;
}

div#body td {
background-color: #FFFFFF;
color: #000000;
border: #333333 1px solid;
}

div#body th {
background-color: #FFFFFF;
color: #000000;
border: #333333 1px solid;
font-style:bold;
}

}

0 comments on commit 533504c

Please sign in to comment.