Compiling the Source Code

Tool Requirements:

  1. Ant must be installed. (It should be already.)

  2. Maven must be installed. (It should be already.)

  3. Subversion must be installed.

Compilation steps:

  1. Retrieve the source code from Kuali: Download Kuali source zip distribution from the Kuali website or retrieve the source code from the Subversion repository. You can find both of these in the Recommended Software Sources section.

  2. To begin working with the source code:

    1. To work with one of the Kuali distributions: i. Unzip the software into /opt/software/kuali/src OR

    2. Check out the source code from the Subversion repository.

      • To retrieve and compile the source code from the source code repository, log in as root and enter this:

        cd /opt/software/kuali
        mkdir src
        cd src
        svn co https://test.kuali.org/svn/rice/branches/rice-release-1-0-2-br/
        cd ..
        pwd
        /opt/software/kuali
        chmod -R 777 /opt/software/kuali/src
        su - rice
        cd ~rice → JUST TO VERIFY YOU ARE IN RICE’S HOME DIRECTORY
      • To compile the source code from the Binary distribution, first uncompress the software:

        cd /opt/software/distribution/
        mkdir src
        unzip rice-1.0.3-src.zip -d src
        chmod -R 777 /opt/software
        
        su - rice
        cd ~rice → JUST TO VERIFY YOU ARE IN RICE’S HOME DIRECTORY

    3. Create a file with VI named kuali-build.properties. This file should be in the root directory of the non-authoritative user that runs the Tomcat server.

      The contents should be:

      maven.home.directory=/root/of/maven/installation…
      maven.home.directory=/usr/local/maven
    4. Change directory:

      1. For the source code from the Subversion repository:

        cd /opt/software/kuali/src/rice-release-1-0-2-br
      2. For the source code from the Binary distribution:

        cd /opt/software/distribution/src
    5. Install the Oracle JDBC driver into the Maven repository.

      Warning

      You must run the Ant command to install the Oracle JDBC into the Maven repository from the root of the source code directory. In the Quick Start Recommended Best Practices sections, use these directories:

      • For the source code repository, checkout: /opt/software/kuali/src/rice-release-1-0-2-br

      • For the source code distribution: /opt/software/distribution/src

      An Apache Ant script called install-oracle-jar installs this dependency; however, due to licensing restrictions you must download the driver from the Oracle website. Please refer to the Sources for Required Software section to find the download location for this software.

      Once you have downloaded the JDBC driver, copy it to the /java/drivers directory. The Apache Ant script, located in the source code directory, will look for ojdbc14.jar in {java root}/drivers and install the necessary file.

      To install the Oracle JDBC driver in the Maven repository, run this command:

      ant install-oracle-jar

      Default directory - /java/drivers – Ant looks there as a default. This can be overridden by executing this command:

      ant -Ddrivers.directory=/my/better/directory install-oracle-jar
    6. To build the WAR file from source, enter:

      ant dist-war
    7. At this point, you have built the WAR file. It is in a subdirectory called target. The WAR file is named rice-dev.war.

      To verify that the WAR file was built:

      cd /opt/software/kuali/src/rice-release-1-0-2-br/target
      ls -la
      total 44972
      drwxrwxr-x  3 rice rice     4096 Jun  1 00:11 .
      drwxrwxrwx 19 root root     4096 May 31 23:59 ..
      drwxrwxr-x  3 rice rice     4096 Jun  1 00:11 ant-build
      -rw-rw-r--  1 rice rice 45987663 Jun  1 00:11 kr-dev.war
    8. Copy the WAR file from the target subdirectory to the Tomcat webapps directory.

      cp -p kr-dev.war /usr/local/tomcat/webapps/kualirice.war