Setting Up Development Environment for CS520This guide is for setting up a development environment for CS520 under Windows XP/Vista/7. A screen capture video illustrating this process is available here. PostgreSQL, Java and TomcatInstall PostgreSQL as described in PostgreSQL Database Server Installation. Download and install the latest Java SE JDK from Sun/Oracle - we only need the JDK, not JavaFX, NetBeans or Java EE. Set a JAVA_HOME environment variable to the directory where JDK is installed. Download the latest Tomcat 7 binary release from the Apache Project. Note that there are several packages available for download. You should download the ZIP file under the "Core" distribution. After downloading the file, unzip it to a local directory, e.g. c:\apache-tomcat-7.0.x. Eclipse and Eclipse PluginsDownload Eclipse IDE for Java EE Developers from Eclipse.org. Unzip it to a local directory, e.g. c:\eclipse, then start up Eclipse by double-click on eclipse.exe under the Eclipse folder. If you are using Eclipse for the first time, you will be asked to choose a folder to be Eclipse's workspace. Eclipse will store all your projects in that folder. In Eclipse, install the Subclipse plugin as follows:
Follow the same procedure to install the Log Viewer plugin:
And the TestNG plugin:
And the m2eclipse plugin:
And the m2eclipse-subclipse plugin:
And one more plugin which can be installed from m2e Marketplace:
CSNS2In Eclipse's New Project wizard, select Maven -> Checkout Maven Projects from SCM. In the next screen, select svn from the dropdown list, then enter the URL svn://cs3.calstatela.edu/cs520/<quarter>/<username>/csns2/trunk, e.g. svn://cs3.calstatela.edu/cs520/f11/cs520stu31/csns2/trunk, then click Finish. CSNS2 uses Maven to build the project. When you set up CSNS2 for the first time, Maven will download the libraries the project depends on over the internet, and this process may take quite a while, so be patient. You may monitor the process in Eclipse's Progress view. After CSNS2 is checked out and the dependencies downloaded, copy build.properties.sample to build.properties, and modify build.properties according to your setup. Right click on the project then select Maven -> Update Project Configuration... -> OK. To test CSNS2, create a PostgreSQL database csns2, then use the following three SQL scripts under the src/main/scripts folder of the project to populate the database:
Create another database csns2test and leave it empty. This database is used for automated testing. Run the project in Eclipse. If you can log into CSNS using one of the three existing accounts (the passwords are all abcd), the project is properly set up and you can start working on the code. |