2011/08/15 - Apache Xindice has been retired.

For more information, please explore the Attic.

apache > xml.apache > xindice
 

Compiling Xindice on Unix

Intended audience

This How-to is aimed at developers who want to compile Xindice from the source distribution or from a Subversion checkout on Unix platform.

Purpose

Following the steps of this how-to should allow you to compile Xindice on unix platform.

Prerequisites

Obtain a working version of the JDK 1.4 or higher. You can get the jdk from lots of places, one of which is Sun.

Obtain the Xindice sources from the download page or via Subversion checkout.

Steps

Place holders used in the Steps

  • {XINDICE_HOME} - Directory where you have untarred your Xindice source files.
  • {JAVA_VERSION} - Installed JDK Version.

Verify your environment

Make sure you have the JAVA_HOME environment variable set. If you are running Mac OS X, build script will attempt to guess it so you get away with skipping this step.

  $ echo $JAVA_HOME
  /usr/java/jdk{JAVA_VERSION}
      

Compile

Navigate to the location where you untarred your Xindice sources (or to your svn checkout of Xindice source code) and run the build.sh script. Your output will resemble:

  $ cd {XINDICE_HOME}      
  $ ./build.sh

  Apache Xindice Build System
  ---------------------------
  Buildfile: build.xml

  init:
     [echo] Building with Java {JAVA_VERSION}

  compile-src:
    [mkdir] Created dir: {XINDICE_HOME}/build/classes-dom
    [javac] Compiling 4 source files to {XINDICE_HOME}/build/classes-dom
    [mkdir] Created dir: {XINDICE_HOME}/build/classes
    [javac] Compiling 287 source files to {XINDICE_HOME}/build/classes

  compile-test:
    [mkdir] Created dir: {XINDICE_HOME}/build/classes-tests
    [mkdir] Created dir: {XINDICE_HOME}/build/test-results
    [javac] Compiling 62 source files to {XINDICE_HOME}/build/classes-tests
     [copy] Copying 65 files to {XINDICE_HOME}/build/classes-tests

  jar:
      [jar] Building jar: {XINDICE_HOME}/xindice-1.2.jar
      [jar] Building jar: {XINDICE_HOME}/xindice-dom-1.2.jar

  bin:
    [mkdir] Created dir: {XINDICE_HOME}/build/bin
     [copy] Copying 5 files to {XINDICE_HOME}/build/bin

  war:
     [copy] Copying 1 file to {XINDICE_HOME}
      [war] Building war: {XINDICE_HOME}/xindice-1.2.war

  BUILD SUCCESSFUL
  Total time: 5 seconds
      
Warning
NOTE: Certain flavors of Unix require a space after the #! in the first line of the shell script. In this case, edit the build.sh file and change the first line from "#!/bin/sh" to "#! /bin/sh".

Verify the compilation

If the compile was succeeded, you will find the output files in the current directory.

  $ ls xindice-*
  xindice-1.2.jar     xindice-1.2.war     xindice-1.2.xml     xindice-dom-1.2.jar
      

Feedback

If you run into problems, don't worry. Be sure to send feedback so that we can improve these documents for the next person.

by Dave Viner, Vadim Gritsenko

1.2