5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-02 07:21:58 +08:00

Add webdocs target to build release docs website.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149922 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Bayer 2011-07-22 20:03:59 +00:00
parent 359d424475
commit 3edcf20d33
40 changed files with 487 additions and 6 deletions

View File

@ -554,11 +554,22 @@
</junit>
</target>
<target name="webdocs" description="Build website documentation">
<exec executable="make" failonerror="true">
<arg value="-C" />
<arg value="${basedir}/src/docs" />
<arg value="BUILDROOT=${build.dir}" />
<arg value="VERSION=${version}" />
<arg value="website" />
</exec>
</target>
<target name="docs" description="Build documentation">
<exec executable="make" failonerror="true">
<arg value="-C" />
<arg value="${basedir}/src/docs" />
<arg value="BUILDROOT=${build.dir}" />
<arg value="VERSION=${version}" />
</exec>
</target>

View File

@ -15,6 +15,9 @@
BUILDROOT=../../build
BUILD_DIR=$(BUILDROOT)/docs
WEBSITE_DIR=$(BUILDROOT)/webdocs
VERSION=Unknown
all: man userguide devguide
@ -25,10 +28,33 @@ devguide: $(BUILD_DIR)/SqoopDevGuide.html
MANSOURCES=$(shell echo man/sqoop*.txt)
MANPAGES=$(MANSOURCES:.txt=.1.gz)
REVDATE=$(shell date)
website:
mkdir -p $(WEBSITE_DIR)
asciidoc --unsafe -a revnumber=$(VERSION) \
-b docbook \
user/SqoopUserGuide.txt
xmlto -o $(WEBSITE_DIR) -m web/html.xsl html-nochunks user/SqoopUserGuide.xml
asciidoc --unsafe -a revnumber=$(VERSION) \
-b docbook \
dev/SqoopDevGuide.txt
xmlto -o $(WEBSITE_DIR) -m web/html.xsl html-nochunks dev/SqoopDevGuide.xml
asciidoc --unsafe -a revnumber=$(VERSION) \
-b docbook \
web/index.txt
xmlto -o $(WEBSITE_DIR) -m web/html.xsl html-nochunks web/index.xml
cp web/docbook.css $(WEBSITE_DIR)
rsync -a web/images $(WEBSITE_DIR)/
rm user/SqoopUserGuide.xml
rm dev/SqoopDevGuide.xml
rm web/index.xml
man: $(MANPAGES)
%.1.gz : %.txt
asciidoc --unsafe -b docbook -d manpage $<
asciidoc --unsafe -b docbook -d manpage -a "author=Sqoop Team" $<
xmlto man $*.xml -o man
gzip $*.1
rm $*.xml
@ -37,12 +63,14 @@ man: $(MANPAGES)
$(BUILD_DIR)/SqoopUserGuide.html: user/*.txt
asciidoc -a toc -a toclevels=1 -a "toc-title=Table of Contents" \
-a revnumber=$(VERSION) -a "revdate=$(REVDATE)" \
user/SqoopUserGuide.txt
mkdir -p $(BUILD_DIR)
mv user/SqoopUserGuide.html $(BUILD_DIR)
$(BUILD_DIR)/SqoopDevGuide.html: dev/*.txt
asciidoc -a toc -a toclevels=1 -a "toc-title=Table of Contents" \
-a revnumber=$(VERSION) -a "revdate=$(REVDATE)" \
dev/SqoopDevGuide.txt
mkdir -p $(BUILD_DIR)
mv dev/SqoopDevGuide.html $(BUILD_DIR)

View File

@ -16,6 +16,11 @@
limitations under the License.
////
Sqoop Developer's Guide v{revnumber}
====================================
include::intro.txt[]
include::preface.txt[]

View File

@ -21,7 +21,7 @@
Supported Releases
------------------
This documentation applies to Sqoop v1.0.0 (June 2010).
This documentation applies to Sqoop v{revnumber}.
Sqoop Releases
--------------

View File

@ -16,6 +16,10 @@
limitations under the License.
////
Sqoop User Guide (v{revnumber})
===============================
include::intro.txt[]

View File

@ -21,7 +21,7 @@
Supported Releases
------------------
This documentation applies to Sqoop v1.0.0 (June 2010).
This documentation applies to Sqoop v{revnumber}.
Sqoop Releases
--------------
@ -30,6 +30,7 @@ Sqoop is an open source software product of Cloudera, Inc.
Software development for Sqoop occurs at http://github.com/cloudera/sqoop.
At that site you can obtain:
- New releases of Sqoop as well as its most recent source code
- An issue tracker
- A wiki that contains Sqoop documentation

View File

@ -19,11 +19,14 @@
Getting Support
---------------
Some general information is available at the
http://wiki.github.com/cloudera/sqoop/[Sqoop wiki].
Report bugs in Sqoop to the issue tracker at
http://github.com/cloudera/sqoop/issues[].
For general questions and answers, a support forum is available at
http://getsatisfaction.com/cloudera/products/cloudera_sqoop[].
Questions and discussion regarding the usage of Sqoop should be directed to the
http://groups.google.com/a/cloudera.org/group/sqoop-user[sqoop-user mailing list].
Before contacting either forum, run your Sqoop job with the
+\--verbose+ flag to acquire as much debugging information as

View File

@ -41,7 +41,7 @@ Display the version:
----
$ sqoop version
Sqoop 1.0.0
Sqoop {revnumber}
git commit id 46b3e06b79a8411320d77c984c3030db47dd1c22
Compiled by aaron@jargon on Mon May 17 13:43:22 PDT 2010
----

View File

@ -0,0 +1,30 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
version="1.0"
exclude-result-prefixes="exsl">
<xsl:template name="breadcrumbs">
<xsl:param name="this.node" select="."/>
<div class="breadcrumbs">
<xsl:for-each select="$this.node/ancestor::*">
<span class="breadcrumb-link">
<a>
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="."/>
<xsl:with-param name="context" select="$this.node"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="." mode="title.markup"/>
</a>
</span>
<xsl:text> &gt; </xsl:text>
</xsl:for-each>
<!-- And display the current node, but not as a link -->
<span class="breadcrumb-node">
<xsl:apply-templates select="$this.node" mode="title.markup"/>
</span>
</div>
</xsl:template>
</xsl:stylesheet>

248
src/docs/web/docbook.css Normal file
View File

@ -0,0 +1,248 @@
/*
* Copyright (c) 2001, 2003 The FreeBSD Documentation Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: doc/share/misc/docbook.css,v 1.14 2008/11/21 07:28:34 keramida Exp $
*/
BODY ADDRESS {
line-height: 1.3;
margin: .6em 0;
}
BODY BLOCKQUOTE {
margin-top: .75em;
line-height: 1.5;
margin-bottom: .75em;
}
HTML BODY {
margin: 1em 4% 1em 4%;
line-height: 1.2;
font-family: verdana;
}
a {
text-decoration: none;
color: #1c84bf;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: #597e93;
}
div.titlepage .title {
font-size: 26px;
}
.LEGALNOTICE {
font-size: small;
font-variant: small-caps;
}
BODY DIV {
margin: 0;
}
DL {
margin: .8em 0;
line-height: 1.2;
}
BODY FORM {
margin: .6em 0;
}
H1, H2, H3, H4, H5, H6,
DIV.EXAMPLE P B,
.QUESTION,
DIV.TABLE P B,
DIV.PROCEDURE P B {
color: #148BCF;
}
BODY H1, BODY H2, BODY H3, BODY H4, BODY H5, BODY H6 {
line-height: 1.3;
margin-left: 0;
}
BODY H1, H2, H3, H4, H5, H6 {
margin: 6px 0 0 0;
}
BODY HR {
border-width: 0 0 1px 0;
border-style: solid;
border-color: #0068BB;
}
BODY IMG.NAVHEADER {
margin: 0 0 0 -4%;
}
OL {
margin: 0 0 0 5%;
line-height: 1.2;
}
BODY PRE {
margin: .75em 0;
line-height: 1.0;
font-family: monospace;
}
BODY TD, BODY TH {
line-height: 1.2;
}
UL, BODY DIR, BODY MENU {
margin: 0 0 0 5%;
line-height: 1.2;
}
HTML {
margin: 0;
padding: 0;
}
BODY P B.APPLICATION {
color: #000000;
}
.navfooter td, .literal, .FILENAME {
color: #007a00;
font-family: monospace;
}
.GUIMENU, .GUIMENUITEM, .GUISUBMENU,
.GUILABEL, .INTERFACE,
.SHORTCUT, .SHORTCUT .KEYCAP {
font-weight: bold;
}
.GUIBUTTON {
background-color: #CFCFCF;
padding: 2px;
}
.ACCEL {
background-color: #F0F0F0;
text-decoration: underline;
}
.PROGRAMLISTING {
padding: 1ex;
background-color: #eee;
border: 1px solid #ccc;
}
@media screen { /* hide from IE3 */:/
a[href]:hover { background: #ffa }
}
.NOTE, .SCREEN {
color: #222;
background: #fff;
border: 1px solid #ccc;
padding: 0.4em 0.4em;
}
.SCREEN {
background: #eee;
}
.TIP {
color: #004F00;
background: #fff;
border: 1px solid green;
padding: 0.4em 0.4em;
}
table.CDH {
padding:0px 0px 8px
}
table.CDH th {
background: #EDF2F9;
border-right: 0.5pt solid #adb6cd;
border-bottom: 0.5pt solid #adb6cd;
padding:2px 8px 1px;
}
table.CDH td {
font-size: 12px;
}
div.breadcrumbs {
border-top: 2px solid #0068BB;
background: #EDF2F9;
font-style: bold;
font-size: small;
padding: 0.6em 0.6em;
}
span.breadcrumb-node {
font-style: italic;
}
/* Match the the breadcrumbs at the top */
div.footer-text {
border-bottom: 2px solid #0068BB;
background: #EDF2F9;
font-size: small;
padding: 0.2em 0.2em;
text-align: center;
}
.IMPORTANT, .caution {
font-style:italic;
border: 1px solid #a00;
border-left: 12px solid #c00;
padding: 0.1em 1em;
}
.WARNING {
color: #9F1313;
background: #fff;
border: 1px solid #e59595;
padding: 0.4em 0.4em;
width: 85%;
}
.EXAMPLE {
width: 100%;
}
.tip, .note, .caution {
margin:4px 0 4px;
}
img {
border: 0;
}

29
src/docs/web/footer.xsl Normal file
View File

@ -0,0 +1,29 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
version="1.0"
exclude-result-prefixes="exsl">
<xsl:template name="user.footer.content">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-2275969-4");
pageTracker._setDomainName(".cloudera.com");
pageTracker._trackPageview();
} catch(err) {}
</script>
<div class="footer-text">
<span align="center"><a href="index.html"><img src="images/home.png"
alt="Documentation Home" /></a></span>
<br/>
This document was built from Sqoop source available at
<a href="http://github.com/cloudera/sqoop">http://github.com/cloudera/sqoop</a>.
</div>
</xsl:template>
</xsl:stylesheet>

23
src/docs/web/header.xsl Normal file
View File

@ -0,0 +1,23 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
version="1.0"
exclude-result-prefixes="exsl">
<xsl:import href="breadcrumbs.xsl"/>
<xsl:template name="user.head.content">
</xsl:template>
<xsl:template name="user.header.content">
<div style="clear:both; margin-bottom: 4px" />
<div align="center">
<a href="index.html"><img src="images/home.png"
alt="Documentation Home" /></a>
</div>
<span class="breadcrumbs">
<xsl:call-template name="breadcrumbs"/>
</span>
</xsl:template>
</xsl:stylesheet>

66
src/docs/web/html.xsl Normal file
View File

@ -0,0 +1,66 @@
<?xml version='1.0'?>
<!-- $FreeBSD: doc/share/xsl/freebsd-html.xsl,v 1.1 2003/01/03 05:06:14 trhodes Exp $ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
<xsl:import href="header.xsl"/>
<xsl:import href="footer.xsl"/>
<xsl:template name="body.attributes" />
<xsl:param name="html.stylesheet" select="'docbook.css'"/>
<xsl:param name="use.id.as.filename" select="1"/>
<xsl:param name="generate.legalnotice.link" select="'1'"/>
<xsl:param name="generate.section.toc.level" select="100"></xsl:param>
<xsl:param name="toc.section.depth" select="10"/>
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<xsl:param name="chunk.section.depth" select="100"></xsl:param>
<xsl:param name="chunk.first.sections" select="1"></xsl:param>
<xsl:param name="navig.showtitles" select="1"></xsl:param>
<xsl:param name="admon.graphics" select="1"></xsl:param>
<xsl:param name="admon.graphics.extension">.png</xsl:param>
<xsl:param name="admon.graphics.path">images/</xsl:param>
<xsl:param name="navig.graphics" select="1"></xsl:param>
<xsl:param name="navig.graphics.extension">.png</xsl:param>
<xsl:param name="navig.graphics.path">images/</xsl:param>
<xsl:param name="header.rule" select="0"></xsl:param>
<xsl:param name="footer.rule" select="0"></xsl:param>
<xsl:param name="suppress.header.navigation" select="1"></xsl:param>
<xsl:param name="generate.index" select="1"></xsl:param>
<xsl:param name="spacing.paras" select="0"></xsl:param>
<xsl:param name="html.cleanup" select="1"></xsl:param>
<xsl:param name="table.borders.with.css" select="1"></xsl:param>
<!-- xsl:param name="id.warnings" select="1"></xsl:param -->
<xsl:param name="generate.toc">
appendix toc,title
article toc,title,figure,equation
book toc,title,figure,example,equation
chapter toc,title
part toc,title
preface toc,title
qandadiv toc
qandaset toc
reference toc,title
sect1 toc
sect2 toc
sect3 toc
sect4 toc
sect5 toc
section toc
set toc,title
</xsl:param>
</xsl:stylesheet>

View File

@ -0,0 +1,5 @@
Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook
icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency
from the Jimmac icons to get round MS IE and FOP PNG incompatibilies.
Stuart Rackham

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/docs/web/images/tip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/docs/web/images/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

28
src/docs/web/index.txt Normal file
View File

@ -0,0 +1,28 @@
////
Licensed to Cloudera, Inc. under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
Cloudera, Inc. 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.
////
Sqoop Documentation (v{revnumber})
==================================
The following pages are the documentation for Sqoop v{revnumber}:
- link:SqoopUserGuide.html[Sqoop User Guide]
- link:SqoopDevGuide.html[Sqoop Developer's Guide]