Using Subversion with the WaterkenTM server under Eclipse
Introduction
This tutorial explains how to build a new Eclipse workspace for the Waterken server with the server code integrated with the Subversion source control system.
The Waterken server uses the Joe-E verifier to ensure that it uses authority in a way that minimizes the risk of breach. This tutorial does not include how to install the Joe-E verifier plugin and to use it to examine your own code for dangerous uses of authority. It does cover installation of the Joe-E files because the Waterken server uses some Joe-E libraries internally.
Step by step
Start new workspace for Waterken under Eclipse
Start Eclipse. Go to "File/Switch Workspace/Other". You may want to check "Copy Settings/WorkBench Layout" if you have a custom layout you like.
Eclipse will restart with an empty workspace. Click the right-most icon to go to the workspace view.
Configure proxy
If you are working behind a firewall, you may need to configure the HTTP proxy in Eclipse. In Eclipse 3.2, go to "Window/Preferences/Install_Update" and configure the proxy hostname and port. Under Eclipse 3.3, go to "Window/Preferences/General/Network Connection".
Reboot Eclipse if you had to set a proxy.
Install Subversion plugin into Eclipse
The Subclipse development team has an excellent step by step description of installing their plugin at their site.
- Click "Help/software Updates/Find and Install.../Search" for new features to install. Click "Next".
- Click "New Remote Site". In the dialog, use name "Subclipse", URL
<http://subclipse.tigris.org/update_1.2.x> - Select the Subclipse plugin and its subcomponents (you do not need the Integrations subcomponent).
- Click ok to the rest of the stuff: the license agreement, the "Finish", the "Go Ahead Even though Nobody Put a Silly Signature on the Code" button.
- Reboot Eclipse.
Yet another proxy setting
Subversion has its own place to look for proxy settings. Now that you have
installed the plugin, the subversion software itself has been automagically
installed. It needs its proxy settings configured as well. Find the "servers"
file, in Windows it can be found in your Application Data folder under
Subversion. In Linux, it can be found in ~/.subversion.
In the servers file, go to the [global] section. Find the two
lines (they show up in other sections as well, do not set the wrong ones!),
# http-proxy-host = proxy2.some-domain-name.com # http-proxy-port = 9000
Remove the # at the beginning of the line, and put in the proxy info.
Enter the Waterken repository
- Go to "Window/Open Perspective/ Other/ SVN Repository"
- Right-click in the "SVN Repos" tab, click "New", enter the Waterken server
repository:
<https://waterken.svn.sourceforge.net/svnroot/waterken/server/trunk/waterken>. Click "Next". - Disregard the certificate warning, (i.e., click "ok, accept permanently").
Build the development environment
- In the Subversion tab you should now have the waterken repository listed. This brings you to all the individual project folders.
- For each folder, right-click and choose "Checkout.../Checkout as a project
in the Workspace/Finish". Check them out in the following order (the order is
not important unless you try to do test-compiles during the checkout process,
the order is the order of compiler dependencies):
- joe-e
- ref_send
- web_send
- network
- log
- persistence
- remote
- server
- shared
- example
- dns
- genkey
- test
- At this point, you should have all the sources for the Waterken server installed. Switch from the Repository view to the Java view, and run "Project/Clean..." to ensure it all builds.
- Go back into the Subversion view and checkout the www folder just underneath the web_send folder. This is not a source folder, so you get additional dialogs. Simply choose "Checkout as a Project in the Workspace". Click "Finish".
- Do the same for the config folder.
Updating from the repository
To update, in the Java view, select the folders you want to sync/update, right-click, choose "Team/Update". This makes all the setup effort worth it, right?
Running the Waterken server
To run the server under Eclipse, you need to configure the Run or Debug
window. Click "Debug/Open Debug Window... Debug as a Java Application", "Name"
is "serve", "Main Project" is "server", "Main Class" is
"org.waterken.server.Serve". Go to the "Arguments" tab, set "Working Directory"
to "Other", click "Variables", choose "workspace_loc". Press "Debug". You
should see server messages appearing in the Console. Open a browser on
<http://localhost:8080/>
to see the welcome message from the server.
Congratulations! You are now on your own.