Setting Up Environment

JOSIF Main Page | Getting Started | Setting Up Environment

Setting Up Your Work Environment

Introduction

This page provides introductory notes on how to set up a developers environment for this project. Please note that organisations have different standard practices for configurations of software to use. This page is intended as guidance only and is offered simply as a guide to what has been found to work.

Developers should note that the The TIP Workbench installer significantly speeds up the process of getting started with JOSIF. It installs an Eclipse instance with Tigerstripe and a number of other tools already installed. Using the installer will make a number of steps in this page unnecessary.

TIP Workbench Installation describes the steps to install Tigerstripe using the TIP Workbench installer.

Developer's Workstation

In principle the intention is to create a build environment which can be used interchangeably on 32 bit Windows and *nix systems. This configuration has been tested on 32 bit Windows Vista and will be tested on Linux (Centos 5.2) (TODO).

If you are using the TIP Installer, then only the following 2 steps are needed:

  • Installing a JDK 1.6
  • Installing Maven 2.2.1

Java JDK

Minimum required Java JDK 1.6 (or SE 6.0 with new naming conventions)
The latest Java JDK's can be downloaded for *nix and Windows installation from Oracle at [Java SE downloads|http://www.oracle.com/technetwork/java/javase/downloads/index.html
]

Use latest Java 6 JDK. Do not use a JRE.

Set (windows) class path to point to JDK

  • right click on desktop Computer icon
  • select properties
  • select advanced system settings
  • select environment variables
  • edit your Path variable to add ;C:\Program Files\Java\jdk1.6.0_18\bin;
  • adjust jdk1.6.0_18 to suit which JDK installed

Don't forget to test. In a command line window, type

  • java –version
  • javac -version

(TODO - instructions for Linux)

Maven 2

Maven 2.2.1 is requried for the build.
Installation instructions for installing Maven 2 are provided at http://maven.apache.org/

Download apache-maven-2.2.1

Install at C:\Program Files\Apache_Software_Foundation\apache-maven-2.2.1 (or alternate location if you wish).

Set environment variables:

  • edit class path to add C:\Program Files\Apache_Software_Foundation\apache-maven-2.2.1\bin;( see example for java)
  • set M2_HOME to C:\Program Files\Apache_Software_Foundation\apache-maven-2.2.1
  • set MAVEN_OPTS to -XX:MaxPermSize=256m -Xmx1024m

Don't forget to test. In command line window, type

  • mvn -version

(TODO - instructions for Linux)

Old Setup

These steps should not longer be used if the TIP Installer is used. All the settings present here are already correctly done for you.

Subversion Client

You will need a stand alone subversion client for working outside of eclipse. On windows you can use

The Collabnet Command line client is less intrusive to your windows system if you prefer to use standard svn commands rather than a gui integrated into windows explorer. It is also less likely to conflict with Eclipse's subversion plugins.

Eclipse

Version

Minimum required Eclipse for Tigerstripe is Eclipse Helios obtainable from http://www.eclipse.org/downloads/

Recommend using the version 'Eclipse IDE for Java EE Developers (189 MB)'

Install location

On windows systems is advisable to install eclipse as close to the root of your drive as possible to avoid class path length problems. The TIP Maven build system also relies on the Eclipse+Tigerstripe installation not having any spaces in the class path to eclipse.exe. So dont install in C:\Program Files.

My own convention is to install the eclipse with tigerstripe in C:\eclipsets

eclipse.ini configuration

Note many developers report needing to increase Eclipse's working memory when working on large projects. This can be done by modifying the
<eclispe.home>/eclipse.ini file to increase -Xmx and -Xmx and -XX:MaxPermSize from the defaults. Exact values appear to be more of an art than a science however the following is a starting point. (Any further insights welcome).

eclipse.ini:

-startup<BR>
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar<BR>
--launcher.library<BR>
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519<BR>
-product<BR>
org.eclipse.epp.package.jee.product<BR>
--launcher.XXMaxPermSize<BR>
256M<BR>
-showsplash<BR>
org.eclipse.platform<BR>
--launcher.XXMaxPermSize<BR>
256m<BR>
-vmargs<BR>
-Dosgi.requiredJavaVersion=1.5<BR>
-Xms128m<BR>
-Xmx512m<BR>
-XX:MaxPermSize=256m<BR>

REVISED NOTE - you need to increase the memory from the above settings;

-vmargs<BR>
-XX:MaxPermSize=500m<BR>
-Dfile.encoding=UTF-8<BR>
-Dosgi.requiredJavaVersion=1.5<BR>
-Xms500m<BR>
-Xmx768m<BR>

Please note that the first time Eclipse starts up it will be very slow to start. Subsequent starts should be much faster.

check for updates

After installing Eclipse run the Help > Check For Updates wizard to update eclipse to the latest plugin versions

Eclipse Subclipse Subversion Client

There are several Subversion Clients for Eclipse. The recommended client for this project is Subclipse. Installation and usage instructions can be found at http://subclipse.tigris.org/. You should follow the instructions to install the 1.6 release using the Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x. I Recommend you install all the required and optional components from the site.

In Eclipse there are several choices of subversion interfaces which can be selected from

Eclipse Toolbar > Windows > Preferences > Team > SVN > SVN Interface

javaHL (JNI) 1.6.3 seems to work OK

Tigerstripe

The interface definition and modelling work in this project leverages the Tigerstripe Project, sponsored by Cisco Systems.

The current version of tigerstripe being used by this project is Tigerstripe 0.6.x on Eclipse Helios.

The easiest way to install Tigestripe is to use the interim update site as described in Tigerstripe Downloads

Select <end-user Tigerstripe workbench> and this will install Tigerstripe with its dependencies.

TestNG Plugin

For the Eclipse plug-in, we suggest using the update site: http://beust.com/eclipse

Select Help / Software updates / Find and Install.
Search for new features to install.
New remote site.
For Eclipse 3.4 and above, enter http://beust.com/eclipse.
Make sure the check box next to URL is checked and click Next.
Eclipse will then guide you through the process.

Velocity Web Edit

Velocity Web Edit is a velocity macro editor plugin for Eclipse. This provides additional help in editing the velocity macros which are used by the Tigerstripe plugins. To deploy this plugin, download the VelocityWebEdit-1.0.8.zip file, unpack it and copy the content of the plugins folder into the Eclipse plugins directory.

APT Editor

The Maven Site Plugin is used to create web sites for each sub project. Maven uses simple markup language called Almost Plain Text (APT) for composing site documentation. There is a simple APT editor plugin for Eclipse This allows you to render the APT text in the Eclipse IDE as you write it. Download the APTEditor_1.0.6.jar from the site and drop it into the Eclipse plugins directory.

Automated Build System

The automated build system has not yet been configured for this project