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