~ubuntu-branches/ubuntu/oneiric/libapache-mod-jk/oneiric

« back to all changes in this revision

Viewing changes to docs/howto/doccontrib.html

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2006-08-05 16:30:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805163053-myf66gm6j1a21ps6
Tags: 1:1.2.18-1ubuntu1
Merge from Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Tomcat Connector - How to Contribute to the Documentation</title><meta value="Robert Sowders" name="author"><meta value="rsowders@usgs.gov" name="email"><link rel="stylesheet" type="text/css" href="../style.css"></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%" border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--TOMCAT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt="Apache Tomcat" align="left" src="../images/tomcat.gif"></a><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="http://www.apache.org/images/asf-logo.gif"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade="noshade"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Generic Howto</strong></p><ul><li><a href="quick.html">For the impatient</a></li><li><a href="workers.html">All about workers</a></li><li><a href="loadbalancers.html">Load Balancing</a></li></ul><p><strong>Webservers</strong></p><ul><li><a href="apache.html">Apache</a></li><li><a href="iis.html">IIS</a></li><li><a href="domino.html">Domino</a></li><li><a href="nes.html">SunOne (Netscape)</a></li></ul><p><strong>Get Involved</strong></p><ul><li><a href="doccontrib.html">Contribute documentation</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td valign="top" align="left"><h1>Tomcat Connector</h1><h2>How to Contribute to the Documentation</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/doccontrib.html"><img alt="Printer Friendly Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
 
2
                    </a></small></td></tr></table><table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
 
3
<p>
 
4
    This document describes how you can easily contribute to the 
 
5
documentation.  I'm going to try to make it easy for everyone to help out with 
 
6
the documentation of Tomcat, more specifically the documentation for the 
 
7
connectors.  This is written from a windows user perspective as I believe they 
 
8
will most benefit from it.  For people using Unix it should be easy for them to 
 
9
apply these steps.  Just substitute Unix syntax where needed.
 
10
</p>
 
11
<p>
 
12
    The documentation is produced using xml with xsl style sheets.  This 
 
13
effectivly seperates the content of the documents from the style, so all that 
 
14
contributers need to worry about the content.  It is much easier to use than 
 
15
html.
 
16
</p>
 
17
<p>
 
18
    It's all really quite simple.  Here is what you will need:
 
19
<ul>
 
20
<li>
 
21
<b>A recent version of Ant</b>
 
22
</li>
 
23
<li>
 
24
<b>The source code for the connectors from subversion</b>
 
25
</li>
 
26
<li>
 
27
<b>Any ascii text editor</b>
 
28
</li>
 
29
</ul>
 
30
</p>
 
31
</blockquote></td></tr></table><table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Getting Started Step by Step"><strong>Getting Started Step by Step</strong></a></font></td></tr><tr><td><blockquote>
 
32
<p>
 
33
    After you get these tools they are simple to set up.
 
34
</p>
 
35
    <table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="STEP 1. Get Ant"><strong>STEP 1. Get Ant</strong></a></font></td></tr><tr><td><blockquote>
 
36
<p>
 
37
    Install <a href="http://ant.apache.org/">Ant</a>. The only advice I 
 
38
have is to choose a simple installation path.  Now set an environment variable 
 
39
for ANT_HOME, and then add the location of the Ant/bin directory to your PATH 
 
40
variable.  Consult your Operating system documentation for information on how 
 
41
to do this.  When you are finished verify that you can run ant from the command 
 
42
line.
 
43
</p>
 
44
<p>
 
45
    Ant is used to build the documentation, among other things, and it must be 
 
46
able to see a file called <b>build.xml</b>.  This file is located in the 
 
47
<b>SVN_HOME\tomcat\connectors\trunk\jk\xdocs</b> directory.  In the 
 
48
<b>build.xml</b> file there is a target named <b>all</b> that will be used to build 
 
49
the docs.
 
50
</p>
 
51
</blockquote></td></tr></table>
 
52
<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="STEP 2.  Get the sources"><strong>STEP 2.  Get the sources</strong></a></font></td></tr><tr><td><blockquote>
 
53
<p>
 
54
    Get the sources for
 
55
<a href="http://svn.apache.org/repos/asf/tomcat/connectors/">tomcat-connectors</a>
 
56
from the subversion repository.  If you'll 
 
57
be editing from a windows platform you will need a windows subversion client.  There 
 
58
are several available.  I like <a href="http://tortoisesvn.tigris.org/">turtoiseSVN</a>.  
 
59
Unix users should install the subversion client of their choice,
 
60
if they don't already have one.
 
61
</p>
 
62
<p>
 
63
    You are ready to download the sources now.  Change directory to the 
 
64
location where you want your repository to be.  For simplicity we will call this 
 
65
your <b>SVN_HOME</b>.  Mine is located in C:\build.
 
66
</p>
 
67
<p>
 
68
    Run the following command to <b>checkout</b> the sources for the first time.
 
69
You should only need to do this once.
 
70
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr> </nobr></code><br><code class="screen"><nobr>C:\build\&gt;svn checkout http://svn.apache.org/repos/asf/tomcat/connectors/
 
71
tomcat-connectors</nobr></code><br><code class="screen"><nobr> </nobr></code><br></td></tr></table></div></p>
 
72
</p>
 
73
<p>
 
74
    You should now be watching all the downloads come in.  Now that you have 
 
75
the sources on your machine the hard part is over.  From now on, to update your 
 
76
sources all you have to do is cd into any directory in your repository and run 
 
77
the <b>svn update</b> command.
 
78
    <p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><div class="screen">    To update your xdocs directory simply cd into the xdocs directory 
 
79
and:</div><code class="screen"><nobr>C:\build\tomcat-connectors\jk\&gt;cd xdocs</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs\&gt;svn update</nobr></code><br></td></tr></table></div></p>
 
80
</p>
 
81
</blockquote></td></tr></table>
 
82
<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="STEP 3.  Test your build environment"><strong>STEP 3.  Test your build environment</strong></a></font></td></tr><tr><td><blockquote>
 
83
<p>
 
84
    Open a command prompt window and cd to the directory where you downloaded 
 
85
the source.  Now cd into the jk directory and then into the xdocs directory so
 
86
that <b>Ant</b> can see the 
 
87
<b>build.xml</b> file. Then from a command prompt, run the following:
 
88
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr> </nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors&gt;cd jk</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk&gt;cd xdocs</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs&gt;ant all</nobr></code><br><code class="screen"><nobr> </nobr></code><br></td></tr></table></div></p>
 
89
</p>.
 
90
<p>
 
91
    You should see the ant compiler messages scrolling by rapidly and then stop 
 
92
with the following:
 
93
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr>[style] Transforming into C:\build\tomcat-connectors\jk\build\docs&gt;</nobr></code><br><code class="screen"><nobr>[style] Processing C:\build\tomcat-connectors\jk\xdocs\faq.xml 
 
94
to</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\build\docs\faq.html</nobr></code><br><code class="screen"><nobr>[style] Loading stylesheet C:\build\tomcat-connectors\jk\xdocs\style.xsl</nobr></code><br><code class="screen"><nobr>[style] Processing C:\build\tomcat-connectors\jk\xdocs\index.xml 
 
95
to</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\build\docs\index.html</nobr></code><br><code class="screen"><nobr>[copy] Copying 8 files to C:\build\tomcat-connectors\jk\build\docs</nobr></code><br><code class="screen"><nobr> </nobr></code><br><code class="screen"><nobr>BUILD SUCCESSFUL</nobr></code><br><code class="screen"><nobr>Total time: 10 seconds</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk&gt;</nobr></code><br></td></tr></table></div></p>
 
96
</p>
 
97
<p>
 
98
    All the xml files present in the xdocs directory structure were transformed 
 
99
to html and copied to the <b>SVN_HOME\tomcat-connectors\jk\build\docs</b>
 
100
directory.  Open one of the 
 
101
html files in your browser and see how it looks.
 
102
</p>
 
103
</blockquote></td></tr></table>
 
104
<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="STEP 4.   The editing process."><strong>STEP 4.   The editing process.</strong></a></font></td></tr><tr><td><blockquote>
 
105
<p>
 
106
    I find it easier to use two windows while doing my updates.  One I call my 
 
107
<b>build</b> window.  I keep this one in the <b>SVN_HOME\tomcat-connectors\jk\xdocs</b>
 
108
directory and I only run two commands in this window:
 
109
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr> </nobr></code><br><div class="screen">   First I run</div><code class="screen"><nobr>ant clean</nobr></code><br><div class="screen">   Then I run</div><code class="screen"><nobr>ant all</nobr></code><br><code class="screen"><nobr> </nobr></code><br></td></tr></table></div></p>
 
110
</p>
 
111
<p>
 
112
    My second window I call my <b>edit</b> window and I keep that one in the 
 
113
<b>SVN_HOME\tomcat-connectors\jk\xdocs</b> directory where I'm doing my
 
114
edits, diffs and svn updates.
 
115
</p>
 
116
<p>
 
117
    Before you start editing you should always update your local repository to 
 
118
prevent conflicts.
 
119
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><div class="screen">    You only need to update the xdocs directory</div><code class="screen"><nobr>C:\build\tomcat-connectors\jk&gt;cd xdocs</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs&gt;</nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs&gt;svn update</nobr></code><br></td></tr></table></div></p>
 
120
</p>
 
121
<p>
 
122
    Now that your repository is up to date you can begin editing.  Find 
 
123
something in the documentation to edit.  When you find something remember the 
 
124
name of the file.  In your <b>edit</b> window find and edit the xml source file 
 
125
with the same name.  After you are done return to the  <b>build</b> window, and 
 
126
in the <b>SVN_HOME\tomcat-connectors\jk\xdocs</b> directory run:
 
127
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr> </nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs&gt; ant clean</nobr></code><br><code class="screen"><nobr> </nobr></code><br></td></tr></table></div></p>
 
128
</p>
 
129
<p>
 
130
    This will delete all the previous html files and make the area ready for 
 
131
updated material.  Now to make fresh documents that incorporate your changes 
 
132
run:
 
133
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr> </nobr></code><br><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs&gt;ant all</nobr></code><br><code class="screen"><nobr> </nobr></code><br></td></tr></table></div></p>
 
134
</p>
 
135
<p>
 
136
    Use your browser to view the edits you just made, they will be in the 
 
137
<b>SVN_HOME\tomcat-connectors\jk\build\docs</b> sub-tree.  If it looks
 
138
good and is ready to go, 
 
139
all that is left to do is to create a patch and submit it.
 
140
</p>
 
141
</blockquote></td></tr></table>
 
142
<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="STEP 5.  Creating a patch and submitting it."><strong>STEP 5.  Creating a patch and submitting it.</strong></a></font></td></tr><tr><td><blockquote>
 
143
<p>
 
144
    From your <b>edit</b> window cd into the directory that contains the xml 
 
145
file you are working on, and run the <b>svn update</b> command.  For example, 
 
146
to produce a diff of the index.xml file and call it patch.txt, you 
 
147
would cd into the directory containing the index.xml file and:
 
148
<p class="screen"><div align="left"><table bgcolor="#000000" cellpadding="2" cellspacing="0" border="1" width="80%"><tr><td align="left" bgcolor="#000000"><code class="screen"><nobr>C:\build\tomcat-connectors\jk\xdocs\&gt;svn diff index.xml &gt;  
 
149
patch.txt.</nobr></code><br><code class="screen"><nobr> </nobr></code><br></td></tr></table></div></p>
 
150
</p>
 
151
<p>
 
152
    Now that you have your patch you are ready to send it in.
 
153
</p>
 
154
<p>
 
155
    Patches to the documentation are handled just like a bug report.  You 
 
156
should submit your patches to <a href="http://issues.apache.org/bugzilla/">http://issues.apache.org/bugzilla/</a>
 
157
 and include a good one line subject.  If this is your first time to use the 
 
158
bug database then you should read  <a href="http://issues.apache.org/bugzilla/bugwritinghelp.html">http://issues.apach
 
159
e.org/bugzilla/bugwritinghelp.html.</a>  You will need to create a user 
 
160
account.  At the web site paste your patch into the web form and don't forget 
 
161
to describe what it is your patch is for.  Sooner or later a someone with 
 
162
commit privileges will review your suggestion.
 
163
</p>
 
164
</blockquote></td></tr></table>
 
165
</blockquote></td></tr></table><table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Subversion Basics"><strong>Subversion Basics</strong></a></font></td></tr><tr><td><blockquote>
 
166
<p>
 
167
    After you have checked out the sources the first time it is much easier to 
 
168
use subversion.  You can cd into any directory of the repository and run <b>svn 
 
169
update</b> to get the latest sources for that directory.  For editing 
 
170
purposes you should always update your repository before you start editing to 
 
171
reduce conflicts.
 
172
</p>
 
173
<p>
 
174
    You will need to run <b>svn diff</b> to generate patches for submission.  
 
175
Again cd into the directory containing the file you are editing and run <b>svn 
 
176
diff name_of_the_file_you_edited &gt; patch.txt</b> to generate a patch for 
 
177
submission.
 
178
</p>
 
179
<p>
 
180
    Pay attention to the terminal window during the update.
 
181
</p>
 
182
<p>
 
183
    Lines begining with a <b>A</b> indicate files that have been added.
 
184
</p>
 
185
<p>
 
186
    Lines begining with a <b>D</b> indicate files that have been deleted.
 
187
</p>
 
188
<p>
 
189
    Lines begining with a <b>U</b> mean the local copy was patched to update it 
 
190
to the current version in the master repository.
 
191
</p>
 
192
<p>
 
193
    Lines begining with a <b>G</b> mean your local copy is different from the 
 
194
master copy, and the changes were successfully merged into your copy.
 
195
</p>
 
196
<p>
 
197
    Lines begining with a <b>C</b> mean there was a conflict in merging the 
 
198
changes and you need to review the file and merge the changes manually.  Search 
 
199
for  &gt;&gt;&gt;&gt; and merge the changes.
 
200
</p>
 
201
<p>
 
202
    Lines begining with a <b>?</b> indicate files that reside on your local 
 
203
system which are not part of the repository.  You will normally see this when 
 
204
you are creating new files for submission.
 
205
</p>
 
206
</blockquote></td></tr></table><table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Updating Web site"><strong>Updating Web site</strong></a></font></td></tr><tr><td><blockquote>
 
207
<p>
 
208
    Only Committers are able to update the web site (http://tomcat.apache.org/connectors-doc/).
 
209
    To do it:
 
210
    <ul>
 
211
    <li>Connect to people.apache.org.</li>
 
212
    <li>umask 002</li>
 
213
    <li>Copy the changed files to /www/tomcat.apache.org/connectors-doc/.</li>
 
214
    <li>or use ant from a checkout tomcat/connectors/jk/xdocs repository:<br>
 
215
        ant -Dbuild.dir=/www/tomcat.apache.org -Ddist.name=connectors-doc 
 
216
    </li>
 
217
    <li>The changes need around 4 hours to be synced to tomcat.apache.org.</li>
 
218
    </ul>
 
219
</p>
 
220
</blockquote></td></tr></table><table width="100%" cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Guides and Resources"><strong>Guides and Resources</strong></a></font></td></tr><tr><td><blockquote>
 
221
<p>
 
222
    A little help to get you started if you need it
 
223
</p>
 
224
<ul>
 
225
<li>
 
226
<a href="http://www.xml.org/xml/resources_focus_beginnerguide.shtml">XML 
 
227
Beginner's Guide</a>
 
228
</li>
 
229
<li>
 
230
<a href="http://issues.apache.org/bugzilla/">Bugzilla</a>
 
231
</li>
 
232
<li>
 
233
<a href="http://issues.apache.org/bugzilla/bugwritinghelp.html">Bugzilla Bug 
 
234
Writing Guide</a>
 
235
</li>
 
236
<li>
 
237
<a href="http://ant.apache.org/">Ant</a>
 
238
</li>
 
239
<li>
 
240
<a href="http://subversion.tigris.org/">Subversion Home</a>
 
241
</li>
 
242
<li>
 
243
<a href="http://svn.apache.org/repos/asf/tomcat/connectors/jk/xdocs/">JK Docs repository</a>
 
244
</li>
 
245
</ul>
 
246
</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade="noshade"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
 
247
        Copyright &copy; 1999-2005, Apache Software Foundation
 
248
        </em></font></div></td></tr></table></body></html>
 
 
b'\\ No newline at end of file'