1. Setting up the Development Environment

The following instructions will help you get your development environment ready for working with the source code. These instructions are specific to setting up for deployment to Orion server and Tomcat 5.5 developing with Java JDK 1.5. Liferay is compatible with Java 1.4 also and a wide array of application servers and containers. You will need to adjust your development environment according to your platform.

Before we can get started, the following conponents must be installed on your machine.

1.1. SVN

  1. Download and install SmartSVN.

  2. If you wish to browse the source tree, configure SmartSVN to use the https protocol to connect to svn.sourceforge.net. Authenticate as user anonymous with a blank password and specify /svnroot/lportal/portal as the UNIX path.

    If you are a developer with privileges to commit to the source tree, configure SmartSVN to use the https protocol to connect to svn.sourceforge.net. Authenticate with your private user and password and specify /svnroot/lportal/portal as the UNIX path.

  3. Check out the portal.

1.2. JDK 1.5.0

  1. Download and install JDK 1.5.0.

  2. Set an environment variable called %JAVA_HOME% to point to your JDK directory.

1.3. Jikes 1.22

  1. Download and unzip Jikes 1.22.

  2. Set an environment variable called %JIKES_HOME% to point to your Jikes directory.

  3. Add %JIKES_HOME%\bin to your %PATH% environment variable.

1.4. Ant 1.6.5

  1. Download and unzip the latest version of Ant.

  2. Set an environment variable called %ANT_HOME% to point to your Ant directory.

  3. Add %ANT_HOME%\bin to your %PATH% environment variable.

  4. Learn how tasks work in Ant. Tasks can be run at the root of the project directory and inside each subproject directory.

  5. Run ant start at least once to compile the source files and to generate all database scripts and skin images.

1.5. Orion 2.0.6

  1. Download and unzip Orion 2.0.6.

  2. Create a separate properties file named app.server.${user.name}.properties modeled after app.server.properties, which is in the checked out SVN directory. The variable ${user.name} is the user name you used to log into your operating system. Overload the properties with the proper directory for Orion. This properties file is later referenced by Ant so it knows where to deploy the application.

  3. Remove the config directory from Orion. Download config.zip and unzip the new config directory into Orion.

  4. Edit /config/datasources.xml to make sure the proper database pool is created.

  5. Populate your database with the portal schema and default data.

  6. Edit /config/server.xml to make sure the server can find the proper location of Jikes.

  7. Create a file named D:\svnroot\liferay\portal\util-java\classes\portal-ext.properties. Add the property portal.ctx with the value /portal.

  8. Go to D:\svnroot\liferay\portal. After running ant start at least once, run ant deploy to copy all the necessary files to Orion.

  9. If you are developing in a Windows environment, download run.bat to the Orion directory and execute the batch file after everything is properly deployed with Ant. If you are developing under a UNIX environment, download run.sh to the Orion directory and execute the script after everything is properly deployed with Ant.