Patches for How-To documentation(tomcat.xml) and building examples
"Ganesh Jayaraman" <[email protected]>
| Newsgroups | gmane.text.xml.xindice.devel |
|---|---|
| Message-ID | <[email protected]> |
Please find attached patches for 1. How-Tos - Installation +++ src/documentation/content/xdocs/community/howto/installation/tomcat.xml 2. Class path for eclipse project +++ .classpath 3. Building and running examples +++ java/examples/guide/run +++ java/examples/build.xml I would like to know if there is any plan to prepare documentation for version 1.2. I wanted to update the Developer guide, but it might confuse the readers as the tab says "1.0". Please let me know! Thanks, Ganesh
install_n_examples.patch
(application/octet-stream, 11.7 KB)
Index: java/examples/guide/run
===================================================================
--- java/examples/guide/run (revision 580659)
+++ java/examples/guide/run (working copy)
@@ -20,12 +20,35 @@
CMD_HOME=`dirname $0`
CMD_NAME=`basename $0`
echo $CMD_HOME
-JARS=`ls -1 $CMD_HOME/../../lib/*.jar`
+
+JARS=`ls -1 $CMD_HOME/../../../lib/*.jar`
JAR_LIST=""
for jar in $JARS ; do
JAR_LIST="$JAR_LIST `basename $jar`"
CLASSPATH=$jar:$CLASSPATH ;
done
-
+
+JARS=`ls -1 $CMD_HOME/../../../lib/endorsed/*.jar`
+for jar in $JARS ; do
+ JAR_LIST="$JAR_LIST `basename $jar`"
+ CLASSPATH=$jar:$CLASSPATH ;
+done
+
+if [ -z "$CMD_HOME/../../../dist" ];
+ then
+ JARS=`ls -1 $CMD_HOME/../../../dist/*.jar`
+ for jar in $JARS ; do
+ JAR_LIST="$JAR_LIST `basename $jar`"
+ CLASSPATH=$jar:$CLASSPATH ;
+ done
+fi
+
+JARS=`ls -1 $CMD_HOME/../../../*.jar`
+for jar in $JARS ; do
+ JAR_LIST="$JAR_LIST `basename $jar`"
+ CLASSPATH=$jar:$CLASSPATH ;
+done
+CLASSPATH=$CMD_HOME/../../../build/classes-guide:$CLASSPATH ;
+
java -Dcmd.home=$CMD_HOME -classpath $CLASSPATH $@
Index: java/examples/build.xml
===================================================================
--- java/examples/build.xml (revision 580659)
+++ java/examples/build.xml (working copy)
@@ -31,12 +31,12 @@
<!-- source directories -->
<property name="root.dir" value="../.."/>
- <property name="jar.dir" value="${root.dir}/java/lib"/>
- <property name="dist.dir" value="${root.dir}/dist"/>
+ <property name="jar.dir" value="${root.dir}/lib"/>
<!-- destination directories -->
<property name="build.dir" value="${root.dir}/build"/>
-
+ <property name="dist.dir" value="${root.dir}/dist"/>
+
<!-- Compilation properties -->
<property name="compile.debug" value="on"/>
<property name="compile.optimize" value="off"/>
@@ -50,9 +50,12 @@
<fileset dir="${jar.dir}">
<include name="*.jar"/>
</fileset>
- <fileset dir="${dist.dir}">
+ <fileset dir="${jar.dir}/endorsed">
<include name="*.jar"/>
</fileset>
+ <fileset dir="${root.dir}">
+ <include name="*.jar"/>
+ </fileset>
</path>
<target name="init"
@@ -112,13 +115,15 @@
<lib dir="${jar.dir}">
<include name="commons-logging-*.jar" />
<include name="xmldb-api-*.jar"/>
- <include name="xmldb-xupdate*.jar"/>
- <include name="xalan-*.jar"/>
- <include name="xerces-*.jar"/>
+ <include name="xmldb-xupdate-*.jar"/>
<include name="xmlrpc-*.jar"/>
- <include name="xml-apis*.jar"/>
</lib>
- <lib dir="${dist.dir}">
+ <lib dir="${jar.dir}/endorsed">
+ <include name="xalan-*.jar"/>
+ <include name="xercesImpl-*.jar"/>
+ <include name="xml-apis-*.jar"/>
+ </lib>
+ <lib dir="${root.dir}">
<include name="xindice-*.jar"/>
</lib>
<manifest>
Index: src/documentation/content/xdocs/community/howto/installation/tomcat.xml
===================================================================
--- src/documentation/content/xdocs/community/howto/installation/tomcat.xml (revision 580659)
+++ src/documentation/content/xdocs/community/howto/installation/tomcat.xml (working copy)
@@ -23,17 +23,18 @@
<!--
- Version: $Revision$ $Date$
+ - Author: Ganesh Babu J ([email protected])
-->
<howto>
<header>
<title>Xindice Tomcat How-To</title>
- <version>$Revision$</version>
+ <version>1.2</version>
<authors>
<person name="Dave Viner" email="[email protected]"/>
<person name="Vadim Gritsenko" email="[email protected]"/>
</authors>
- <last-modified-content-date date="2004-01-01"/>
+ <last-modified-content-date date="2007-09-29"/>
</header>
<audience title="Intended audience">
@@ -67,11 +68,24 @@
<steps title="Steps">
<section>
+ <title>Place holders used in the Steps</title>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <code>{XINDICE_HOME}</code> - Directory where you have unzipped your Xindice source files.
+ </li>
+ <li>
+ <code>{JAVA_VERSION}</code> - Installed JDK Version.
+ </li>
+ </ul>
+ </section>
+ <section>
<title>Copy the WAR file</title>
<p>
If you've followed the prerequisites, then you will have a working version
of Tomcat installed, and the sources of Xindice compiled. Now, copy the
- <code>xindice-*.war</code> file from dist to the
+ <code>xindice-*.war</code> file from {XINDICE_HOME} to the
<code>%CATALINA_HOME%/webapps</code>.
</p>
<warning>
@@ -81,49 +95,29 @@
</warning>
<p>Here's what that looks like in Windows:</p>
<source>
-D:\xindice\current\xml-xindice>dir dist
- Volume in drive D is Data
- Volume Serial Number is A3EB-9689
+ > cd {XINDICE_HOME}
+ > dir xindice-*
+
+ Directory of {XINDICE_HOME}
- Directory of D:\xindice\current\xml-xindice\dist
+ 09/27/2007 09:24 PM 628,694 xindice-1.2-dev.jar
+ 09/27/2007 09:24 PM 5,184,315 xindice-1.2-dev.war
+ 09/27/2007 09:24 PM 1,791 xindice-1.2-dev.xml
+ 09/27/2007 09:24 PM 6,535 xindice-dom-1.2-dev.jar
+ 4 File(s) 5,821,335 bytes
+ 0 Dir(s) 3,745,992,704 bytes free
-01/01/2004 03:34 PM <DIR> .
-01/01/2004 03:34 PM <DIR> ..
-01/01/2004 03:34 PM 464,594 xindice-1.1b3.jar
-01/01/2004 03:35 PM 4,313,587 xindice-1.1b3.war
-01/01/2004 03:34 PM 253 xindice-1.1b3.xml
- 3 File(s) 4,778,434 bytes
- 2 Dir(s) 42,307,837,952 bytes free
-
-D:\xindice\current\xml-xindice>copy dist\xindice-1.1b3.war %CATALINA_HOME%\webapp
-s\xindice.war
+ > copy xindice-1.2-dev.war %CATALINA_HOME%\webapps\xindice.war
1 file(s) copied.
-
-D:\xindice\current\xml-xindice>
</source>
- <note>
- In this example, I have built Xindice in <code>D:\xindice\current</code>.
- If you compile the source in another location, just substitute that path for
- <code>D:\xindice\current</code>.
- </note>
<p> </p>
<p>If you are using Linux, your session might resemble:</p>
<source>
-root@gogo:/local/xml-xindice# ls -oa dist
-total 4668
-drwxr-xr-x 2 root 4096 Nov 25 20:10 .
-drwxr-xr-x 13 root 4096 Nov 25 00:01 ..
--rw-r--r-- 1 root 464594 Jan 1 15:34 xindice-1.1b3.jar
--rw-r--r-- 1 root 4313587 Jan 1 15:35 xindice-1.1b3.war
--rw-r--r-- 1 root 253 Jan 1 15:34 xindice-1.1b3.xml
-root@gogo:/local/xml-xindice# cp dist/xindice-1.1b3.war $CATALINA_HOME/webapps/xindice.war
-root@gogo:/local/xml-xindice#
+ $ cd {XINDICE_HOME}
+ $ ls xindice-*
+ xindice-1.2-dev.jar xindice-1.2-dev.war xindice-1.2-dev.xml xindice-dom-1.2-dev.jar
+ $ cp xindice-1.2-dev.war $CATALINA_HOME/webapps/xindice.war
</source>
- <note>
- In this Linux session, the Xindice root directory is in
- <code>/local/xml-xindice</code>. You should substitute your actual
- <code>XINDICE_HOME</code> path for <code>/local/xml-xindice</code>.
- </note>
</section>
<section>
@@ -132,7 +126,7 @@
Tomcat will automatically deploy copied war file with the default settings.
To modify those defaults, <code>CATALINA_HOME/conf/server.xml</code> file
should be edited. Suggested changes for the server.xml file are contained
- in the <code>XINDICE_HOME/dist/xindice-1.1b3.xml</code> file.
+ in the <code>{XINDICE_HOME}/xindice-1.2-dev.xml</code> file.
</p>
</section>
@@ -145,14 +139,12 @@
</p>
<p>Here's what that looks like in Windows</p>
<source>
-D:\xindice\current\xml-xindice>cd %CATALINA_HOME%\bin
-
-D:\jakarta-tomcat-4.1.12\bin>startup
-Using CATALINA_BASE: D:\jakarta-tomcat-4.1.12
-Using CATALINA_HOME: D:\jakarta-tomcat-4.1.12
-Using CATALINA_TMPDIR: D:\jakarta-tomcat-4.1.12\temp
-Using JAVA_HOME: C:\j2sdk1.4.1_01
-D:\jakarta-tomcat-4.1.12\bin>
+ > cd %CATALINA_HOME%\bin
+ > startup
+ Using CATALINA_BASE: D:\jakarta-tomcat-4.1.12
+ Using CATALINA_HOME: D:\jakarta-tomcat-4.1.12
+ Using CATALINA_TMPDIR: D:\jakarta-tomcat-4.1.12\temp
+ Using JAVA_HOME: C:\j2sdk{JAVA_VERSION}
</source>
<note>
In this example, I have installed Tomcat in <code>D:\jakarta-tomcat-4.1.12</code>.
@@ -164,12 +156,12 @@
<p> </p>
<p>Here's what that might look like on Linux</p>
<source>
-root@gogo:/var/tomcat4/bin# ./catalina.sh start
-Using CATALINA_BASE: /var/tomcat4
-Using CATALINA_HOME: /var/tomcat4
-Using CATALINA_TMPDIR: /var/tomcat4/temp
-Using JAVA_HOME: /usr/java/jdk1.3.1_06
-root@gogo:/var/tomcat4/bin#
+ $ cd $CATALINA_HOME/bin
+ $ ./catalina.sh start
+ Using CATALINA_BASE: /var/tomcat4
+ Using CATALINA_HOME: /var/tomcat4
+ Using CATALINA_TMPDIR: /var/tomcat4/temp
+ Using JAVA_HOME: /usr/java/jdk{JAVA_VERSION}
</source>
<note>
The name of the Tomcat installation directory may differ for your Linux
@@ -237,8 +229,8 @@
<p>
In addition, you should be able to verify that xindice is running by
loading this URL in your browser <code>http://localhost:8080/xindice</code>.
- If it works, you should see something that says
- "<code>THIS IS AN UGLY DEBUG TOOL!</code>".
+ If it works, you should see the Xindice
+ "<code>List Databases</code>" page which allows you to browse the contents of the database.
</p>
</section>
<p>
Index: .classpath
===================================================================
--- .classpath (revision 580659)
+++ .classpath (working copy)
@@ -23,11 +23,6 @@
<classpathentry kind="src" output="build/classes-tests" path="java/tests/src"/>
<classpathentry kind="src" output="build/classes-address" path="java/examples/addressbook/src/java"/>
<classpathentry kind="src" output="build/classes-guide" path="java/examples/guide/src"/>
- <classpathentry exported="true" kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.3.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/endorsed/xalan-2.5.2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/endorsed/xerces-2.6.0.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/endorsed/xml-apis.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xmldb-api-20030701.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xmldb-api-sdk-20030701.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xmldb-common-20030701.jar"/>
@@ -39,5 +34,13 @@
<classpathentry exported="true" kind="lib" path="tools/lib/junit-addons-1.2.jar"/>
<classpathentry kind="lib" path="tools/lib/xmlunit-1.0.jar"/>
<classpathentry kind="lib" path="tools/lib/ant.jar"/>
+ <classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+ <classpathentry kind="lib" path="lib/endorsed/xalan-2.7.0.jar"/>
+ <classpathentry kind="lib" path="lib/endorsed/xercesImpl-2.9.0.jar"/>
+ <classpathentry kind="lib" path="lib/endorsed/xml-apis-1.3.04.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/commons-fileupload-1.2.jar"/>
+ <classpathentry kind="lib" path="lib/commons-io-1.3.2.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-core-2.2.0.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>