Project WebSynergy Milestone 4 Administration Guide

Setting a Development Environment for WebSynergy

If you are beginning a WebSynergy-based project, chances are you will need to get your developers up and running before your production systems are ready. In order for a developer to do his or her work, an instance of WebSynergy needs to be running on his or her machine. Additionally, to prevent file-locking issues, a developer's version of WebSynergy should not use the embedded database, so a separate database will need to be installed.

WebSynergy makes use of many open source tools for development. This has two benefits: 1) It removes any barriers to entry, as there are no expensive tools to purchase in order to make use of WebSynergy, and 2) It allows WebSynergy to remain as tool-agnostic as possible. If developers wish to use an IDE to work on WebSynergy, great. If developers want to use a text editor and the command line, that's great too. Developers can choose the tools they are most comfortable with to write code on WebSynergy platform.

There are, however, some tools that are required in order to develop with WebSynergy. These are at a minimum:

If you will be customizing WebSynergy via the Extension Environment (please see the WebSynergy Developer's Guide for further details), you may need:

Developing With Apache Ant 1.7.0 or Above

Apache Ant is a build tool that is used extensively by both the Liferay source and the extension environment. You can download the latest version of Ant from http://ant.apache.org. After downloading, uncompress the archive into a folder. You then need to set the ANT_HOME environment variable to add binaries to your PATH.

ProcedureTo Set the ANT_HOME Variable on Windows

  1. Go to Start -> Control Panel, and double-click the System icon.

  2. Go to Advanced, and then click the Environment Variables button.

  3. Under System Variables, select New to create the ANT_HOME environment variable.

  4. Set the variable name to ANT_HOME and the variable value to apache-install-dir\apache-ant-1.7.0 and click OK.

    For example, the installation directory might be C:\Java\apache-ant-1.7.0.

  5. Select New again to create the ANT_OPTS environment variable.

  6. Set the variable name to ANT_OPTS and the variable value to -Xms256M -Xmx512M and click OK.

  7. Select the PATH environment variable and select Edit.

  8. Add %ANT_HOME%\bin to the end or beginning of the PATH.

  9. Click OK and then click OK again.

  10. To test the setting, type ant at a command prompt and press Return.

    • If a Build not found error message appears, you have correctly installed Ant.

    • If you do not see an error message, check the environment variable settings and make sure they are pointing to the correct directory locations.

ProcedureTo Set the ANT_HOME Variable on a Linux or Macintosh System

  1. In your home folder, open the .bash_profile file in the root directory.

  2. Add the following lines to the file, substituting the directory where you installed Ant:

    ANT_HOME=/apache-install-dir/apache-ant-1.7.0
    ANT_OPTS="-Xms256M -Xmx512M"
    PATH=$PATH:$HOME/bin:$ANT_HOME/bin
    export ANT_HOME ANT_OPTS PATH
  3. To test the setting, type ant at a command prompt and press Return.

    • If a Build not found error message appears, you have correctly installed Ant.

    • If you do not see an error message, check the environment variable settings and make sure they are pointing to the correct directory locations.