Set Up Development Environment for CS520This guide is for setting up a development environment for CS520 under Windows XP/Vista/7. All the software are available online for free. You may also get all the software and the screen capture videos from the MSDNAA software computer in the CS department office. The files are in the CS520 Software folder on the Windows Desktop. The total size of the files is about 370MB. You need to bring with you a flash drive or a writable CD. A screen capture video illustrating this process is available here. PostgreSQL, Eclipse, and TomcatInstall PostgreSQL as described in PostgreSQL Database Server Installation. Install Eclipse and Tomcat as described in Web Development with Eclipse and Tomcat. Additional Eclipse PluginsIn Eclipse, install the Subclipse plugin as follows:
Follow the same procedure to Install the Log Viewer plugin:
CSNSIn Eclipse, open SVN Repository Exploring perspective and enter the repository location svn://cs3.calstatela.edu/cs520/<quarter>/<username>, e.g. svn://cs3.calstatela.edu/cs520/f10/cs520stu31. Expand the repository location, right click the trunk folder, select Checkout, then Finish. The New Project Wizard consists of several steps:
The campus wireless network used to block the port used by Subversion, and if that's still the case, when you try to access the repository on campus from your laptop, you need to connect your laptop to the wired network. Networks outside the campus should work just fine. After the project is checked out, create a PostgreSQL database for CSNS, then use the following two SQL scripts under the db folder of the project to populate the database:
Copy build.properties.sample to build.properties, and modify build.properties according to your setup. Create an Ant Builder for the project by right clicking on the project, then select Properties -> Builders -> New -> Ant Builder. In the Builder Properties window,
There are two things you need to be careful when creating the Ant builder. First, after setting the target for Auto Build, click the OK button, not the Apply button. Probably due to some bug, clicking the Apply button will undo the target setting instead of applying the setting. Second, after the Ant builder is created, refresh the project by right click on the project then select Refresh. Refreshing the project is important because Ant is an "external tool" to Eclipse, which means that Eclipse is not aware of the changes made by Ant until the project is refreshed. Finally, right click on the project, then Run As -> Run on Server to run the project. If you can log into CSNS using one of the test accounts, the project is properly set up and you can start working on the code. |