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

« back to all changes in this revision

Viewing changes to xdocs/howto/doccontrib.xml

  • 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
<?xml version="1.0" encoding="ISO-8859-1"?>
 
2
<!DOCTYPE document [
 
3
  <!ENTITY project SYSTEM "project.xml">
 
4
]>
 
5
<document url="doccontrib.html">
 
6
 
 
7
  &project;
 
8
<copyright>
 
9
   Copyright 1999-2006 The Apache Software Foundation
 
10
 
 
11
   Licensed under the Apache License, Version 2.0 (the "License");
 
12
   you may not use this file except in compliance with the License.
 
13
   You may obtain a copy of the License at
 
14
 
 
15
       http://www.apache.org/licenses/LICENSE-2.0
 
16
 
 
17
   Unless required by applicable law or agreed to in writing, software
 
18
   distributed under the License is distributed on an "AS IS" BASIS,
 
19
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
20
   See the License for the specific language governing permissions and
 
21
   limitations under the License.
 
22
</copyright>
 
23
<properties>
 
24
<title>How to Contribute to the Documentation</title>
 
25
<author email="rsowders@usgs.gov">Robert Sowders</author>
 
26
<date>$Date: 2006-06-29 01:56:49 +0200 (Thu, 29 Jun 2006) $</date>
 
27
</properties>
 
28
<body>
 
29
<section name="Introduction">
 
30
<p>
 
31
    This document describes how you can easily contribute to the 
 
32
documentation.  I'm going to try to make it easy for everyone to help out with 
 
33
the documentation of Tomcat, more specifically the documentation for the 
 
34
connectors.  This is written from a windows user perspective as I believe they 
 
35
will most benefit from it.  For people using Unix it should be easy for them to 
 
36
apply these steps.  Just substitute Unix syntax where needed.
 
37
</p>
 
38
<p>
 
39
    The documentation is produced using xml with xsl style sheets.  This 
 
40
effectivly seperates the content of the documents from the style, so all that 
 
41
contributers need to worry about the content.  It is much easier to use than 
 
42
html.
 
43
</p>
 
44
<p>
 
45
    It's all really quite simple.  Here is what you will need:
 
46
<ul>
 
47
<li>
 
48
<b>A recent version of Ant</b>
 
49
</li>
 
50
<li>
 
51
<b>The source code for the connectors from subversion</b>
 
52
</li>
 
53
<li>
 
54
<b>Any ascii text editor</b>
 
55
</li>
 
56
</ul>
 
57
</p>
 
58
</section>
 
59
<section name="Getting Started Step by Step">
 
60
<p>
 
61
    After you get these tools they are simple to set up.
 
62
</p>
 
63
    <subsection name="STEP 1. Get Ant">
 
64
<p>
 
65
    Install <a href="http://ant.apache.org/">Ant</a>. The only advice I 
 
66
have is to choose a simple installation path.  Now set an environment variable 
 
67
for ANT_HOME, and then add the location of the Ant/bin directory to your PATH 
 
68
variable.  Consult your Operating system documentation for information on how 
 
69
to do this.  When you are finished verify that you can run ant from the command 
 
70
line.
 
71
</p>
 
72
<p>
 
73
    Ant is used to build the documentation, among other things, and it must be 
 
74
able to see a file called <b>build.xml</b>.  This file is located in the 
 
75
<b>SVN_HOME\tomcat\connectors\trunk\jk\xdocs</b> directory.  In the 
 
76
<b>build.xml</b> file there is a target named <b>all</b> that will be used to build 
 
77
the docs.
 
78
</p>
 
79
</subsection>
 
80
<subsection name="STEP 2.  Get the sources">
 
81
<p>
 
82
    Get the sources for
 
83
<a href="http://svn.apache.org/repos/asf/tomcat/connectors/">tomcat-connectors</a>
 
84
from the subversion repository.  If you'll 
 
85
be editing from a windows platform you will need a windows subversion client.  There 
 
86
are several available.  I like <a href="http://tortoisesvn.tigris.org/">turtoiseSVN</a>.  
 
87
Unix users should install the subversion client of their choice,
 
88
if they don't already have one.
 
89
</p>
 
90
<p>
 
91
    You are ready to download the sources now.  Change directory to the 
 
92
location where you want your repository to be.  For simplicity we will call this 
 
93
your <b>SVN_HOME</b>.  Mine is located in C:\build.
 
94
</p>
 
95
<p>
 
96
    Run the following command to <b>checkout</b> the sources for the first time.
 
97
You should only need to do this once.
 
98
<screen>
 
99
<read> </read>
 
100
<read>C:\build\>svn checkout http://svn.apache.org/repos/asf/tomcat/connectors/
 
101
tomcat-connectors</read>
 
102
<read> </read>
 
103
</screen>
 
104
</p>
 
105
<p>
 
106
    You should now be watching all the downloads come in.  Now that you have 
 
107
the sources on your machine the hard part is over.  From now on, to update your 
 
108
sources all you have to do is cd into any directory in your repository and run 
 
109
the <b>svn update</b> command.
 
110
    <screen>
 
111
<note>    To update your xdocs directory simply cd into the xdocs directory 
 
112
and:</note>
 
113
<read>C:\build\tomcat-connectors\jk\>cd xdocs</read>
 
114
<read>C:\build\tomcat-connectors\jk\xdocs\>svn update</read>
 
115
</screen>
 
116
</p>
 
117
</subsection>
 
118
<subsection name="STEP 3.  Test your build environment">
 
119
<p>
 
120
    Open a command prompt window and cd to the directory where you downloaded 
 
121
the source.  Now cd into the jk directory and then into the xdocs directory so
 
122
that <b>Ant</b> can see the 
 
123
<b>build.xml</b> file. Then from a command prompt, run the following:
 
124
<screen>
 
125
<read> </read>
 
126
<read>C:\build\tomcat-connectors>cd jk</read>
 
127
<read>C:\build\tomcat-connectors\jk>cd xdocs</read>
 
128
<read>C:\build\tomcat-connectors\jk\xdocs>ant all</read>
 
129
<read> </read>
 
130
</screen>
 
131
</p>.
 
132
<p>
 
133
    You should see the ant compiler messages scrolling by rapidly and then stop 
 
134
with the following:
 
135
<screen>
 
136
<read>[style] Transforming into C:\build\tomcat-connectors\jk\build\docs></read>
 
137
<read>[style] Processing C:\build\tomcat-connectors\jk\xdocs\faq.xml 
 
138
to</read>
 
139
<read>C:\build\tomcat-connectors\jk\build\docs\faq.html</read>
 
140
<read>[style] Loading stylesheet C:\build\tomcat-connectors\jk\xdocs\style.xsl</read>
 
141
<read>[style] Processing C:\build\tomcat-connectors\jk\xdocs\index.xml 
 
142
to</read>
 
143
<read>C:\build\tomcat-connectors\jk\build\docs\index.html</read>
 
144
<read>[copy] Copying 8 files to C:\build\tomcat-connectors\jk\build\docs</read>
 
145
<read> </read>
 
146
<read>BUILD SUCCESSFUL</read>
 
147
<read>Total time: 10 seconds</read>
 
148
<read>C:\build\tomcat-connectors\jk></read>
 
149
</screen>
 
150
</p>
 
151
<p>
 
152
    All the xml files present in the xdocs directory structure were transformed 
 
153
to html and copied to the <b>SVN_HOME\tomcat-connectors\jk\build\docs</b>
 
154
directory.  Open one of the 
 
155
html files in your browser and see how it looks.
 
156
</p>
 
157
</subsection>
 
158
<subsection name="STEP 4.   The editing process.">
 
159
<p>
 
160
    I find it easier to use two windows while doing my updates.  One I call my 
 
161
<b>build</b> window.  I keep this one in the <b>SVN_HOME\tomcat-connectors\jk\xdocs</b>
 
162
directory and I only run two commands in this window:
 
163
<screen>
 
164
<read> </read>
 
165
<note>   First I run</note>
 
166
<read>ant clean</read>
 
167
<note>   Then I run</note>
 
168
<read>ant all</read>
 
169
<read> </read>
 
170
</screen>
 
171
</p>
 
172
<p>
 
173
    My second window I call my <b>edit</b> window and I keep that one in the 
 
174
<b>SVN_HOME\tomcat-connectors\jk\xdocs</b> directory where I'm doing my
 
175
edits, diffs and svn updates.
 
176
</p>
 
177
<p>
 
178
    Before you start editing you should always update your local repository to 
 
179
prevent conflicts.
 
180
<screen>
 
181
<note>    You only need to update the xdocs directory</note>
 
182
<read>C:\build\tomcat-connectors\jk>cd xdocs</read>
 
183
<read>C:\build\tomcat-connectors\jk\xdocs></read>
 
184
<read>C:\build\tomcat-connectors\jk\xdocs>svn update</read>
 
185
</screen>
 
186
</p>
 
187
<p>
 
188
    Now that your repository is up to date you can begin editing.  Find 
 
189
something in the documentation to edit.  When you find something remember the 
 
190
name of the file.  In your <b>edit</b> window find and edit the xml source file 
 
191
with the same name.  After you are done return to the  <b>build</b> window, and 
 
192
in the <b>SVN_HOME\tomcat-connectors\jk\xdocs</b> directory run:
 
193
<screen>
 
194
<read> </read>
 
195
<read>C:\build\tomcat-connectors\jk\xdocs> ant clean</read>
 
196
<read> </read>
 
197
</screen>
 
198
</p>
 
199
<p>
 
200
    This will delete all the previous html files and make the area ready for 
 
201
updated material.  Now to make fresh documents that incorporate your changes 
 
202
run:
 
203
<screen>
 
204
<read> </read>
 
205
<read>C:\build\tomcat-connectors\jk\xdocs>ant all</read>
 
206
<read> </read>
 
207
</screen>
 
208
</p>
 
209
<p>
 
210
    Use your browser to view the edits you just made, they will be in the 
 
211
<b>SVN_HOME\tomcat-connectors\jk\build\docs</b> sub-tree.  If it looks
 
212
good and is ready to go, 
 
213
all that is left to do is to create a patch and submit it.
 
214
</p>
 
215
</subsection>
 
216
<subsection name="STEP 5.  Creating a patch and submitting it.">
 
217
<p>
 
218
    From your <b>edit</b> window cd into the directory that contains the xml 
 
219
file you are working on, and run the <b>svn update</b> command.  For example, 
 
220
to produce a diff of the index.xml file and call it patch.txt, you 
 
221
would cd into the directory containing the index.xml file and:
 
222
<screen>
 
223
<read>C:\build\tomcat-connectors\jk\xdocs\>svn diff index.xml >  
 
224
patch.txt.</read>
 
225
<read> </read>
 
226
</screen>
 
227
</p>
 
228
<p>
 
229
    Now that you have your patch you are ready to send it in.
 
230
</p>
 
231
<p>
 
232
    Patches to the documentation are handled just like a bug report.  You 
 
233
should submit your patches to <a 
 
234
href="http://issues.apache.org/bugzilla/">http://issues.apache.org/bugzilla/</a>
 
235
 and include a good one line subject.  If this is your first time to use the 
 
236
bug database then you should read  <a 
 
237
href="http://issues.apache.org/bugzilla/bugwritinghelp.html">http://issues.apach
 
238
e.org/bugzilla/bugwritinghelp.html.</a>  You will need to create a user 
 
239
account.  At the web site paste your patch into the web form and don't forget 
 
240
to describe what it is your patch is for.  Sooner or later a someone with 
 
241
commit privileges will review your suggestion.
 
242
</p>
 
243
</subsection>
 
244
</section>
 
245
<section name="Subversion Basics">
 
246
<p>
 
247
    After you have checked out the sources the first time it is much easier to 
 
248
use subversion.  You can cd into any directory of the repository and run <b>svn 
 
249
update</b> to get the latest sources for that directory.  For editing 
 
250
purposes you should always update your repository before you start editing to 
 
251
reduce conflicts.
 
252
</p>
 
253
<p>
 
254
    You will need to run <b>svn diff</b> to generate patches for submission.  
 
255
Again cd into the directory containing the file you are editing and run <b>svn 
 
256
diff name_of_the_file_you_edited > patch.txt</b> to generate a patch for 
 
257
submission.
 
258
</p>
 
259
<p>
 
260
    Pay attention to the terminal window during the update.
 
261
</p>
 
262
<p>
 
263
    Lines begining with a <b>A</b> indicate files that have been added.
 
264
</p>
 
265
<p>
 
266
    Lines begining with a <b>D</b> indicate files that have been deleted.
 
267
</p>
 
268
<p>
 
269
    Lines begining with a <b>U</b> mean the local copy was patched to update it 
 
270
to the current version in the master repository.
 
271
</p>
 
272
<p>
 
273
    Lines begining with a <b>G</b> mean your local copy is different from the 
 
274
master copy, and the changes were successfully merged into your copy.
 
275
</p>
 
276
<p>
 
277
    Lines begining with a <b>C</b> mean there was a conflict in merging the 
 
278
changes and you need to review the file and merge the changes manually.  Search 
 
279
for  >>>> and merge the changes.
 
280
</p>
 
281
<p>
 
282
    Lines begining with a <b>?</b> indicate files that reside on your local 
 
283
system which are not part of the repository.  You will normally see this when 
 
284
you are creating new files for submission.
 
285
</p>
 
286
</section>
 
287
 
 
288
<section name="Updating Web site">
 
289
<p>
 
290
    Only Committers are able to update the web site (http://tomcat.apache.org/connectors-doc/).
 
291
    To do it:
 
292
    <ul>
 
293
    <li>Connect to people.apache.org.</li>
 
294
    <li>umask 002</li>
 
295
    <li>Copy the changed files to /www/tomcat.apache.org/connectors-doc/.</li>
 
296
    <li>or use ant from a checkout tomcat/connectors/jk/xdocs repository:<br />
 
297
        ant -Dbuild.dir=/www/tomcat.apache.org -Ddist.name=connectors-doc 
 
298
    </li>
 
299
    <li>The changes need around 4 hours to be synced to tomcat.apache.org.</li>
 
300
    </ul>
 
301
</p>
 
302
</section>
 
303
<section name="Guides and Resources">
 
304
<p>
 
305
    A little help to get you started if you need it
 
306
</p>
 
307
<ul>
 
308
<li>
 
309
<a href="http://www.xml.org/xml/resources_focus_beginnerguide.shtml">XML 
 
310
Beginner's Guide</a>
 
311
</li>
 
312
<li>
 
313
<a href="http://issues.apache.org/bugzilla/">Bugzilla</a>
 
314
</li>
 
315
<li>
 
316
<a href="http://issues.apache.org/bugzilla/bugwritinghelp.html">Bugzilla Bug 
 
317
Writing Guide</a>
 
318
</li>
 
319
<li>
 
320
<a href="http://ant.apache.org/">Ant</a>
 
321
</li>
 
322
<li>
 
323
<a href="http://subversion.tigris.org/">Subversion Home</a>
 
324
</li>
 
325
<li>
 
326
<a href="http://svn.apache.org/repos/asf/tomcat/connectors/jk/xdocs/">JK Docs repository</a>
 
327
</li>
 
328
</ul>
 
329
</section>
 
330
</body>
 
331
</document>